diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-07-17 12:41:38 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-07-17 12:41:38 +0200 |
| commit | 555a1184e4f94e57509bdd33807cc930fe61c7bd (patch) | |
| tree | a108e644d557e839ac857fc64460bb92022c5d3e /src | |
| parent | f6b31f65ac64e25a1b20beaec6b57785f4a187b6 (diff) | |
| download | box64-555a1184e4f94e57509bdd33807cc930fe61c7bd.tar.gz box64-555a1184e4f94e57509bdd33807cc930fe61c7bd.zip | |
Better trace for getenv and setenv
Diffstat (limited to 'src')
| -rwxr-xr-x | src/emu/x64int3.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c index 7413ebcc..6a3f41b3 100755 --- a/src/emu/x64int3.c +++ b/src/emu/x64int3.c @@ -151,7 +151,10 @@ void x64Int3(x64emu_t* emu) snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (char*)R_RSI); } else if (strstr(s, "getenv")==s) { tmp = (char*)(R_RDI); + post = 2; snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)"); + } else if (strstr(s, "setenv")==s) { + snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %d)", tid, *(void**)(R_RSP), s, (char*)R_RDI, (char*)R_RSI, R_EDX); } else if (!strcmp(s, "poll")) { struct pollfd* pfd = (struct pollfd*)(R_RDI); snprintf(buff, 255, "%04d|%p: Calling %s(%p[%d/%d/%d, ...], %d, %d)", tid, *(void**)(R_RSP), s, pfd, pfd->fd, pfd->events, pfd->revents, R_ESI, R_EDX); |