From de276ddfa9a4168d55f09b1e21774404826161ee Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Fri, 13 Sep 2024 11:19:47 +0200 Subject: [PATCH] [BOX32][TRACE] Better trace for 32bits call to strtol and strtoul --- src/emu/x86int3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index 90e5fb5b..53e4baa3 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -212,6 +212,9 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) } else if(strstr(s, "strncasecmp")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %u)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(ulong*)from_ptr(R_ESP+12)); ret_fmt = 1; + } else if(strstr(s, "strtol")==s || strstr(s, "strtoul")==s) { + snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %p, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(int*)from_ptr(R_ESP+12)); + ret_fmt = 1; } else if(strstr(s, "memcmp")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %u)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(ulong*)from_ptr(R_ESP+12)); ret_fmt = 1;