From e863acf0a88958dec00e7d1ee3ce891aa5ddd6b6 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 28 Aug 2025 11:04:23 +0200 Subject: [BOX32][TRACE] Improved trace for nanosleep --- src/emu/x86int3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index 9bcfd328..ceec800b 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -403,6 +403,9 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) } else if(!strcmp(s, "__errno_location")) { snprintf(buff, 255, "%04d|%p: Calling %s()", tid, from_ptriv(R_ESP), (char *)s); perr = 4; + } else if (!strcmp(s, "nanosleep")) { + pu32 = *(uint32_t**)from_ptrv(R_ESP+4); + snprintf(buff, 256, "%04d|%p: Calling %s(%p[%d, %d], %p)", tid, from_ptriv(R_ESP), (char *)s, (void*)from_ptriv(R_ESP+4), pu32?pu32[0]:0, pu32?pu32[1]:0, (void*)from_ptriv(R_ESP+8)); } else { snprintf(buff, 255, "%04d|%p: Calling %s (%08X, %08X, %08X...)", tid, from_ptriv(R_ESP), (char *)s, from_ptri(uint32_t, R_ESP+4), from_ptri(uint32_t, R_ESP+8), from_ptri(uint32_t, R_ESP+12)); } -- cgit 1.4.1