diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-11-06 19:13:08 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-11-06 19:13:08 +0100 |
| commit | 2dea11a9e3fed043e368d2e99067d69151c2e694 (patch) | |
| tree | a3d12d8c4f82c47ee2b2269404dcbc757ed85f19 | |
| parent | cd55c12e44f7cbfd048dbdd3cf9ef2b5b06bfa93 (diff) | |
| download | box64-2dea11a9e3fed043e368d2e99067d69151c2e694.tar.gz box64-2dea11a9e3fed043e368d2e99067d69151c2e694.zip | |
[TRACE] Better for 32bits wait wrapped function
| -rwxr-xr-x | src/emu/x86int3.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index 0d7b5de3..cd5b9e85 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -202,6 +202,11 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) } else if(strstr(s, "waitpid")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, 0x%x)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(uint32_t*)from_ptr(R_ESP+12)); perr = 1; + } else if(!strcmp(s, "wait")) { + snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))); + pu32 = from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)); + perr = 1; + if(pu32) post = 14; } else if(strstr(s, "clock_gettime")==s || strstr(s, "__clock_gettime")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); post = 1; @@ -431,6 +436,8 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) case 13: if(R_EAX==0x25E) snprintf(buff2, 63, "%s", "here"); break; + case 14: snprintf(buff2, 63, " [%d]", *(int*)pu32); + break; } if(perr==1 && (S_EAX)<0) snprintf(buff3, 63, " (errno=%d:\"%s\")", errno, strerror(errno)); |