diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-03 20:17:12 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-03 20:19:34 +0200 |
| commit | 3179357666cca066ac58a01ffe81601275ba5636 (patch) | |
| tree | fa997ec7ba92d99b0a88511056381c0ee9a9e554 /src | |
| parent | cb7433d70a9d7165eca0070b5a2e8d7a0e048180 (diff) | |
| download | box64-3179357666cca066ac58a01ffe81601275ba5636.tar.gz box64-3179357666cca066ac58a01ffe81601275ba5636.zip | |
[BOX32] Better trace for 32bits posix_memalign
Diffstat (limited to 'src')
| -rwxr-xr-x | src/emu/x86int3.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index 3dbc5461..c214770a 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -282,6 +282,10 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) } else if(!strcmp(s, "fmod")) { post = 4; snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, *(double*)from_ptr(R_ESP+4), *(double*)from_ptr(R_ESP+12)); + } else if(!strcmp(s, "posix_memalign")) { + post = 8; + pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); + snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, 0x%x)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(uint32_t*)from_ptr(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12)); } else if(strstr(s, "SDL_GetWindowSurface")==s) { post = 5; snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))); @@ -320,7 +324,8 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) break; case 6: snprintf(buff2, 63, "(%S)", pu32?((wchar_t*)pu32):L"nil"); break; - case 7: if(R_EAX) snprintf(buff2, 63, " (error=\"%s\")", strerror(R_EAX)); + case 7: if(R_EAX) snprintf(buff2, 63, " (error=\"%s\")", strerror(R_EAX)); break; + case 8: if(!R_EAX) snprintf(buff2, 63, " [%p]", from_ptrv(*pu32)); break; } if(perr==1 && ((int)R_EAX)<0) snprintf(buff3, 63, " (errno=%d:\"%s\")", errno, strerror(errno)); |