Skip to content

Commit

Permalink
[BOX32][TRACE] Better trace for 32bits strncasecmp calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Sep 13, 2024
1 parent 0f0762a commit d618cfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/emu/x86int3.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr)
} else if(strstr(s, "strncmp")==s || strstr(s, "__strncmp")==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, "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, "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;
Expand Down

0 comments on commit d618cfd

Please sign in to comment.