MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / syscall_execve

Function syscall_execve

source/kernel/syscall.cpp:168–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168static U32 syscall_execve(CPU* cpu, U32 eipCount) {
169 std::vector<BString> args;
170 std::vector<BString> envs;
171 BString path = cpu->memory->readString(ARG1);
172
173 readStringArray(cpu->memory, ARG2, args);
174 readStringArray(cpu->memory, ARG3, envs);
175
176 SYS_LOG1(SYSCALL_PROCESS, cpu, "execve: path=%X(%s) argv=%X envp=%X", ARG1, path.c_str(), ARG2, ARG3);
177 U32 result = cpu->thread->process->execve(cpu->thread, path, args, envs);
178 SYS_LOG(SYSCALL_PROCESS, cpu, " result=%d(0x%X)\n", result, result);
179 return result;
180}
181
182static U32 syscall_chdir(CPU* cpu, U32 eipCount) {
183 BString path = cpu->memory->readString(ARG1);

Callers

nothing calls this directly

Calls 4

readStringArrayFunction · 0.85
execveMethod · 0.80
readStringMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected