diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-05-10 22:26:06 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-05-10 22:26:06 +0200 |
| commit | adf4fb5ae058cb9c42c9fde462dc7076daa93cc4 (patch) | |
| tree | 1cf195ca97c4cfcfe53a04d7a21aa24b310e4972 /src/emu | |
| parent | 1f4cc1cf884e0c7befdfea601def2291e54459be (diff) | |
| download | box64-adf4fb5ae058cb9c42c9fde462dc7076daa93cc4.tar.gz box64-adf4fb5ae058cb9c42c9fde462dc7076daa93cc4.zip | |
[TRACE] Improved/Fixed vfprintf detailled trace
Diffstat (limited to 'src/emu')
| -rwxr-xr-x | src/emu/x64int3.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c index be3679cc..5147fb15 100755 --- a/src/emu/x64int3.c +++ b/src/emu/x64int3.c @@ -206,13 +206,17 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr) pu64 = (uint64_t*)R_RDI; post = 3; snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu, %d, %zu, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI, R_EDX, R_RCX, (tmp)?tmp:"(nil)", (void*)(R_R9)); + } else if (strstr(s, "__vfprintf_chk")) { + tmp = (char*)(R_RDX); + pu64 = (uint64_t*)R_RDI; + snprintf(buff, 256, "%04d|%p: Calling %s(%p, %d, \"%s\", ... )", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_ESI, (tmp)?tmp:"(nil)"); } else if (strstr(s, "snprintf")==s) { tmp = (char*)(R_RDX); pu64 = (uint64_t*)R_RDI; post = 3; snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI, (tmp)?tmp:"(nil)", (void*)(R_RCX)); - } else if (strstr(s, "vfprintf")==s) { - tmp = (char*)(R_RSI); + } else if (!strcmp(s, "vfprintf")) { + tmp = (char*)((R_RSI>2)?R_RSI:R_RDX); snprintf(buff, 256, "%04d|%p: Calling %s(%p, \"%s\", ...)", tid, *(void**)(R_RSP), s, (void*)R_RDI, (tmp)?tmp:"(nil)"); } else if (!strcmp(s, "getcwd")) { post = 2; |