diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-09-19 13:20:02 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-09-19 13:20:02 +0200 |
| commit | e4debaf4ba7ac7da6321883492b08d755386dacc (patch) | |
| tree | 7bf5526f890100d74e4dc3954e5d2c84cf71147b /src | |
| parent | 4eeba053d57701bae9591e2b8e732d39a3a682f6 (diff) | |
| download | box64-e4debaf4ba7ac7da6321883492b08d755386dacc.tar.gz box64-e4debaf4ba7ac7da6321883492b08d755386dacc.zip | |
[TRACE] Some better trace for a few function call
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64int3.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c index b0f452a2..2f2ce756 100644 --- a/src/emu/x64int3.c +++ b/src/emu/x64int3.c @@ -256,6 +256,8 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr) } else if (!strcmp(s, "vfprintf") || !strcmp(s, "my_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, "g_source_set_name")) { + snprintf(buff, 256, "%04d|%p: Calling %s(%p, \"%s\")", tid, *(void**)(R_RSP), s, (void*)R_RDI, (char*)R_RSI); } else if (!strcmp(s, "getcwd")) { post = 2; snprintf(buff, 256, "%04d|%p: Calling %s(%p, %zu)", tid, *(void**)(R_RSP), s, (void*)R_RDI, R_RSI); @@ -263,6 +265,9 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr) tmp = (char*)(R_RDI); perr = 1; snprintf(buff, 256, "%04d|%p: Calling %s(\"%s\", %d)", tid, *(void**)(R_RSP), s, tmp?tmp:"nil", R_ESI); + } else if (!strcmp(s, "xcb_wait_for_event") || !strcmp(s, "xcb_poll_for_queued_event") || !strcmp(s, "xcb_poll_for_event")) { + post = 9; + snprintf(buff, 256, "%04d|%p: Calling %s(%p)", tid, *(void**)(R_RSP), s, (void*)R_RDI); } else if (!strcmp(s, "glXGetProcAddress") || !strcmp(s, "SDL_GL_GetProcAddress") || !strcmp(s, "glXGetProcAddressARB")) { tmp = (char*)(R_RDI); snprintf(buff, 256, "%04d|%p: Calling %s(\"%s\")", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)"); @@ -351,6 +356,11 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr) snprintf(buff2, 64, "[%s%s] ", buff5, (n==S_EAX)?"":"..."); } break; + case 9: if(R_RAX) { + uint8_t type = *(uint8_t*)(R_RAX); + snprintf(buff2, 64, "[type=%d]", type); + } + break; } if(perr==1 && (S_EAX)<0) snprintf(buff3, 64, " (errno=%d:\"%s\")", errno, strerror(errno)); |