X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=inline;f=Kernel%2Fbinary.c;h=c676e55cf1645c6f60ed8ef13aada5fb6adc835f;hb=ae3a0bf446529bfb50eb91a0fb90b72140d9f2ed;hp=9534aaaf46db1700abafbb2629632a627a356467;hpb=95a9132bcc024715a0a87cb323d58967ea5b1803;p=tpg%2Facess2.git diff --git a/Kernel/binary.c b/Kernel/binary.c index 9534aaaf..c676e55c 100644 --- a/Kernel/binary.c +++ b/Kernel/binary.c @@ -91,7 +91,6 @@ int Proc_Spawn(const char *Path) } /** - * \fn int Proc_Execve(char *File, char **ArgV, char **EnvP) * \brief Replace the current user image with another * \param File File to load as the next image * \param ArgV Arguments to pass to user @@ -118,6 +117,7 @@ int Proc_Execve(const char *File, const char **ArgV, const char **EnvP) argenvBytes += strlen(ArgV[argc])+1; for( envc = 0; EnvP && EnvP[envc]; envc++ ) argenvBytes += strlen(EnvP[envc])+1; + LOG("argc = %i, envc = %i", envc); argenvBytes = (argenvBytes + sizeof(void*)-1) & ~(sizeof(void*)-1); argenvBytes += (argc+1)*sizeof(void*) + (envc+1)*sizeof(void*); @@ -136,6 +136,7 @@ int Proc_Execve(const char *File, const char **ArgV, const char **EnvP) { argvSaved[i] = strBuf; strcpy(argvSaved[i], ArgV[i]); + LOG("argv[%i] = '%s'", i, strBuf); strBuf += strlen(ArgV[i])+1; } argvSaved[i] = NULL; @@ -143,6 +144,7 @@ int Proc_Execve(const char *File, const char **ArgV, const char **EnvP) for( i = 0; i < envc; i++ ) { envpSaved[i] = strBuf; + LOG("envp[%i] = '%s'", i, strBuf); strcpy(envpSaved[i], EnvP[i]); strBuf += strlen(EnvP[i])+1; } @@ -375,7 +377,7 @@ tVAddr Binary_MapIn(tBinary *Binary, const char *Path, tVAddr LoadMin, tVAddr Lo } } - Log_Debug("Binary", "PID %i - Mapped '%s' to 0x%x", Threads_GetPID(), Path, base); + Log_Debug("Binary", "PID %i - Mapped '%s' to %p", Threads_GetPID(), Path, base); VFS_Close(fd); LEAVE('p', base);