about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-06-15 17:10:02 +0200
committerptitSeb <sebastien.chev@gmail.com>2021-06-15 17:10:02 +0200
commit1978b165814080e818203edf05ea7ceefe79b834 (patch)
treeab5003b6ad77bbda3ddcc3b6021e1806ba9330db /src
parent0d079b8c0bb52c4a4aced7671bf107dbae2d9394 (diff)
downloadbox64-1978b165814080e818203edf05ea7ceefe79b834.tar.gz
box64-1978b165814080e818203edf05ea7ceefe79b834.zip
Improved and fixed Trace for some functions
Diffstat (limited to 'src')
-rwxr-xr-xsrc/emu/x64int3.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c
index 3ef7b58a..a1bc590e 100755
--- a/src/emu/x64int3.c
+++ b/src/emu/x64int3.c
@@ -97,10 +97,18 @@ void x64Int3(x64emu_t* emu)
                 s = GetNativeName((void*)addr);
                 if(addr==(uintptr_t)PltResolver) {
                     snprintf(buff, 256, "%s", " ... ");
-                } else if (strstr(s, "__open")==s || !strcmp(s, "open") || !strcmp(s, "open ")) {
+                } else if (!strcmp(s, "__open") || !strcmp(s, "open") || !strcmp(s, "open ")) {
                     tmp = (char*)(R_RDI);
                     snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d (,%d))", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (int)(R_ESI), (int)(R_EDX));
                     perr = 1;
+                } else if (!strcmp(s, "fopen") || !strcmp(s, "fopen64")) {
+                    tmp = (char*)(R_RDI);
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d)", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (int)(R_ESI));
+                    perr = 2;
+                } else if (!strcmp(s, "__openat64") || !strcmp(s, "openat64") || !strcmp(s, "__openat64_2")) {
+                    tmp = (char*)(R_RSI);
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, \"%s\", %d (,%d))", tid, *(void**)(R_RSP), s, (int)R_EDI, (tmp)?tmp:"(nil)", (int)(R_EDX), (int)(R_ECX));
+                    perr = 1;
                 } else if (strstr(s, "mkdir")==s) {
                     tmp = (char*)(R_RDI);
                     snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d)", tid, *(void**)(R_RSP), s, (tmp)?tmp:"(nil)", (int)(R_ESI));