about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-04-02 13:35:40 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-04-02 13:35:40 +0200
commit4f451ff65365619f15073ebbbe5bc995a9a057c7 (patch)
tree692b14f1ce52a20da82371599f386adb607156c8
parent7822f29140cc4323943c0416d7ee0fd8eec6819c (diff)
downloadbox64-4f451ff65365619f15073ebbbe5bc995a9a057c7.tar.gz
box64-4f451ff65365619f15073ebbbe5bc995a9a057c7.zip
Better trace for mmap64
-rwxr-xr-xsrc/emu/x64int3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c
index cbfadb5c..da3e1a70 100755
--- a/src/emu/x64int3.c
+++ b/src/emu/x64int3.c
@@ -107,6 +107,9 @@ void x64Int3(x64emu_t* emu)
                 } else  if(strstr(s, "my___printf_chk")) {
                     tmp = (char*)(R_RSI);
                     snprintf(buff, 255, "%04d|%p: Calling %s(%d, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, R_EDI, (tmp)?tmp:"(nil)", (void*)(R_RDX));
+                } else  if(strstr(s, "mmap64")) {
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %lu, 0x%x, 0x%x, %d, %ld)", tid, *(void**)(R_RSP), s, 
+                        (void*)R_RDI, R_RSI, (int)(R_RDX), (int)R_RCX, (int)R_R8, R_R9);
                 } else  if(!strcmp(s, "sscanf")) {
                     tmp = (char*)(R_RSI);
                     snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\" (,%p))", tid, *(void**)(R_RSP), s, (void*)R_RDI, (tmp)?tmp:"(nil)", (void*)(R_RDX));