about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-12-17 14:49:08 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-12-17 14:49:08 +0100
commit62eca11beef3f211a93235b18d556332fafc74de (patch)
treeff74d84917661e6c04f14832e03c2cf8123aaeda /src
parent13f5ec1524d6bb2891115fc4c9a68822e7265223 (diff)
downloadbox64-62eca11beef3f211a93235b18d556332fafc74de.tar.gz
box64-62eca11beef3f211a93235b18d556332fafc74de.zip
[BOX32][TRACE] Improved trace of wrapped functions
Diffstat (limited to 'src')
-rwxr-xr-xsrc/emu/x86int3.c207
1 files changed, 105 insertions, 102 deletions
diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c
index 66b5d6ef..72494a24 100755
--- a/src/emu/x86int3.c
+++ b/src/emu/x86int3.c
@@ -100,51 +100,51 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr)
                     }
                 } else
                 if(strstr(s, "SDL_PollEvent")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
-                    pu8 = from_ptrv(*(ptr_t*)from_ptr(R_ESP+4));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4));
+                    pu8 = from_ptriv(R_ESP+4);
                     post = 10;
                 } else if(strstr(s, "SDL_RWFromFile")==s || strstr(s, "SDL_RWFromFile")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else if(strstr(s, "SDL_WarpMouse")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%hd, %hd)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint16_t*)from_ptr(R_ESP+4), *(uint16_t*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%hd, %hd)", tid, from_ptriv(R_ESP), (char *)s, *(uint16_t*)from_ptr(R_ESP+4), *(uint16_t*)from_ptr(R_ESP+8));
                 } else  if(strstr(s, "glColor4f")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f, %f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8), *(float*)from_ptr(R_ESP+12), *(float*)from_ptr(R_ESP+16));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f, %f, %f)", tid, from_ptriv(R_ESP), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8), *(float*)from_ptr(R_ESP+12), *(float*)from_ptr(R_ESP+16));
                 } else  if(strstr(s, "glTexCoord2f")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptriv(R_ESP), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8));
                 } else  if(strstr(s, "glVertex2f")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptriv(R_ESP), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8));
                 } else  if(strstr(s, "glVertex3f")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8), *(float*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f, %f)", tid, from_ptriv(R_ESP), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8), *(float*)from_ptr(R_ESP+12));
                 } else  if(strstr(s, "__open64")==s || strcmp(s, "open64")==0) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d, %d)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), *(int*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12));
                     perr = 1;
                 } else  if(!strcmp(s, "opendir")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4));
                     perr = 2;
                 } else  if(strstr(s, "__open")==s || !strcmp(s, "open") || !strcmp(s, "my_open64")) {
-                    tmp = from_ptrv(*(ptr_t*)from_ptr(R_ESP+4));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d (,%d))", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (tmp)?tmp:"(nil)", *(int*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12));
+                    tmp = from_ptriv(R_ESP+4);
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d (,%d))", tid, from_ptriv(R_ESP), (char *)s, (tmp)?tmp:"(nil)", *(int*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12));
                     perr = 1;
                 } else  if(!strcmp(s, "shm_open")) {
-                    tmp = from_ptrv(*(ptr_t*)from_ptr(R_ESP+4));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (tmp)?tmp:"(nil)", *(int*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12));
+                    tmp = from_ptriv(R_ESP+4);
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d, %d)", tid, from_ptriv(R_ESP), (char *)s, (tmp)?tmp:"(nil)", *(int*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12));
                     perr = 1;
                 } else  if(strcmp(s, "mkdir")==0) {
-                    tmp = from_ptrv(*(ptr_t*)from_ptr(R_ESP+4));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (tmp)?tmp:"(nil)", *(int*)from_ptr(R_ESP+8));
+                    tmp = from_ptriv(R_ESP+4);
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %d)", tid, from_ptriv(R_ESP), (char *)s, (tmp)?tmp:"(nil)", *(int*)from_ptr(R_ESP+8));
                     perr = 1;
                 } else  if(!strcmp(s, "fopen")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                     perr = 2;
                 } else  if(!strcmp(s, "freopen")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %p)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), from_ptriv(R_ESP+12));
                     perr = 2;
                 } else  if(!strcmp(s, "fopen64")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                     perr = 2;
                 } else  if(!strcmp(s, "chdir")) {
                     pu32=(uint32_t*)from_ptrv(R_ESP+4);
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, pu32?((pu32==(uint32_t*)1)?"/1/":(char*)pu32):"/0/");
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptriv(R_ESP), (char *)s, pu32?((pu32==(uint32_t*)1)?"/1/":(char*)pu32):"/0/");
                 } else  if(!strcmp(s, "poll")) {
                     pu32=from_ptrv(*(ptr_t*)from_ptrv(R_ESP+4));
                     char tmp[50];
@@ -154,247 +154,250 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr)
                         snprintf(tmp, 49, "%s%d/0x%hx", ii?" ,":"", ((int*)pu32)[ii*2], ((uint16_t*)pu32)[ii*4+2]);
                         strncat(tmp2, tmp, 49);
                     }
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p[%s], %u, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(R_ESP+4), tmp2, from_ptri(uint32_t, R_ESP+8), from_ptri(int, R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p[%s], %u, %d)", tid, from_ptriv(R_ESP), (char *)s, from_ptrv(R_ESP+4), tmp2, from_ptri(uint32_t, R_ESP+8), from_ptri(int, R_ESP+12));
                     post = 12;
                     perr = 1;
                 } else  if(strstr(s, "getenv")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4));
                     post = 2;
                 } else  if(strstr(s, "putenv")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4));
                 } else  if(strstr(s, "pread")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %u, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(uint32_t*)from_ptr(R_ESP+12), *(int32_t*)from_ptr(R_ESP+16));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %u, %d)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12), *(int32_t*)from_ptr(R_ESP+16));
                     perr = 1;
                 } else  if(!strcmp(s, "read")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %u)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(uint32_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %u)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
                     perr = 1;
                 } else  if(strstr(s, "ioctl")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, 0x%x, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), *(int32_t*)from_ptr(R_ESP+8), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, 0x%x, %p)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), *(int32_t*)from_ptr(R_ESP+8), from_ptriv(R_ESP+12));
                     perr = 1;
                 } else  if(strstr(s, "setsockopt")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %d, %d, %p, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), *(int32_t*)from_ptr(R_ESP+8), *(int32_t*)from_ptr(R_ESP+12), from_ptrv(*(ptr_t*)from_ptr(R_ESP+16)), *(int32_t*)from_ptr(R_ESP+20));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %d, %d, %p, %d)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), *(int32_t*)from_ptr(R_ESP+8), *(int32_t*)from_ptr(R_ESP+12), from_ptriv(R_ESP+16), *(int32_t*)from_ptr(R_ESP+20));
                     perr = 1;
                 } else  if(strstr(s, "connect")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(int32_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %d)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), *(int32_t*)from_ptr(R_ESP+12));
                     perr = 1;
                 } else  if(strstr(s, "__errno_location")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s()", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s);
+                    snprintf(buff, 255, "%04d|%p: Calling %s()", tid, from_ptriv(R_ESP), (char *)s);
                     post = 9;
                 } else  if(strstr(s, "statvfs64")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else  if(strstr(s, "index")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %i(%c))", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int32_t*)from_ptr(R_ESP+8), *(int32_t*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %i(%c))", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+4), *(int32_t*)from_ptr(R_ESP+8), *(int32_t*)from_ptr(R_ESP+8));
                 } else  if(strstr(s, "rindex")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %i(%c))", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int32_t*)from_ptr(R_ESP+8), *(int32_t*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"), %i(%c))", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+4), *(int32_t*)from_ptr(R_ESP+8), *(int32_t*)from_ptr(R_ESP+8));
                 } else  if(strstr(s, "__xstat64")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), (char *)from_ptriv(R_ESP+8), from_ptriv(R_ESP+12));
                     perr = 1;
                 } else  if(strcmp(s, "__xstat")==0) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), (char *)from_ptriv(R_ESP+8), from_ptriv(R_ESP+12));
                     perr = 1;
                 } else  if(strstr(s, "__lxstat64")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p(\"%s\"), %p)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), (char *)from_ptriv(R_ESP+8), from_ptriv(R_ESP+12));
                     perr = 1;
                 } else  if(strstr(s, "sem_timedwait")==s) {
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p[%d sec %d ns])", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), pu32?pu32[0]:-1, pu32?pu32[1]:-1);
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p[%d sec %d ns])", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), pu32?pu32[0]:-1, pu32?pu32[1]:-1);
                     perr = 1;
                 } else  if(strstr(s, "waitpid")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, 0x%x)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(uint32_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, 0x%x)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
                     perr = 1;
                 } else  if(!strcmp(s, "wait")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
-                    pu32 = from_ptrv(*(ptr_t*)from_ptr(R_ESP+4));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4));
+                    pu32 = from_ptriv(R_ESP+4);
                     perr = 1;
                     if(pu32) post = 14;
                 } else  if(strstr(s, "clock_gettime")==s || strstr(s, "__clock_gettime")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p)", tid, from_ptriv(R_ESP), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8));
                     post = 1;
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8));
                 } else  if(strstr(s, "semop")==s) {
                     int16_t* p16 = *(int16_t**)from_ptr(R_ESP+8);
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int*)from_ptr(R_ESP+4), p16, *(int*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %d)", tid, from_ptriv(R_ESP), (char *)s, *(int*)from_ptr(R_ESP+4), p16, *(int*)from_ptr(R_ESP+12));
                     perr = 1;
                 } else  if(!strcmp(s, "mmap64")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %ld)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptri(ulong_t, R_ESP+8), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16), from_ptri(int, R_ESP+20),from_ptri(int64_t, R_ESP+24));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %ld)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptri(ulong_t, R_ESP+8), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16), from_ptri(int, R_ESP+20),from_ptri(int64_t, R_ESP+24));
                     perr = 3;
                 } else  if(!strcmp(s, "mmap")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptri(ulong_t, R_ESP+8), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16), from_ptri(int, R_ESP+20), from_ptri(int, R_ESP+24));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, %d, 0x%x, %d, %d)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptri(ulong_t, R_ESP+8), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16), from_ptri(int, R_ESP+20), from_ptri(int, R_ESP+24));
                     perr = 3;
                 } else  if(strstr(s, "strcasecmp")==s || strstr(s, "__strcasecmp")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                     ret_fmt = 1;
                 } else  if(strstr(s, "wcsncasecmp")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(int*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %d)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), *(int*)from_ptr(R_ESP+12));
                     ret_fmt = 1;
                 } else  if(strstr(s, "gtk_signal_connect_full")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p, %p, %p, %p, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), "gtk_signal_connect_full", (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20), *(void**)from_ptr(R_ESP+24), *(int32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p, %p, %p, %p, %d, %d)", tid, from_ptriv(R_ESP), "gtk_signal_connect_full", (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), from_ptriv(R_ESP+12), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20), *(void**)from_ptr(R_ESP+24), *(int32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32));
                 } else  if(strstr(s, "strcmp")==s || strstr(s, "__strcmp")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                     ret_fmt = 1;
                 } else  if(strstr(s, "strncmp")==s || strstr(s, "__strncmp")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %lu)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(ulong_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %lu)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), *(ulong_t*)from_ptr(R_ESP+12));
                     ret_fmt = 1;
                 } else  if(strstr(s, "strncasecmp")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %lu)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(ulong_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %lu)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), *(ulong_t*)from_ptr(R_ESP+12));
                     ret_fmt = 1;
                 } else  if(strstr(s, "strtol")==s || strstr(s, "strtoul")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %p, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(int*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %p, %d)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), *(int*)from_ptr(R_ESP+12));
                     ret_fmt = 1;
                 } else  if(strstr(s, "memcmp")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %lu)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptri(ulong_t, R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %lu)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), from_ptri(ulong_t, R_ESP+12));
                     ret_fmt = 1;
                 } else  if(strstr(s, "strstr")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p\"%.127s\", \"%.127s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p\"%.127s\", \"%.127s\")", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else  if(strstr(s, "strlen")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"))", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), ((R_ESP+4))?((char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))):"nil");
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p(\"%s\"))", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), ((R_ESP+4))?((char*)from_ptriv(R_ESP+4)):"nil");
                 } else  if(strstr(s, "strchr")==s || strstr(s, "strrchr")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p\"%.127s\", 0x%x'%c')", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(char*)from_ptr(R_ESP+8), *(char*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p\"%.127s\", 0x%x'%c')", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), (char*)from_ptriv(R_ESP+4), *(char*)from_ptr(R_ESP+8), *(char*)from_ptr(R_ESP+8));
                 } else  if(strstr(s, "vsnprintf")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, %u, %08X...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, %u, %08X...)", tid, from_ptriv(R_ESP), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     post = 3;
                 } else  if(strstr(s, "__vsnprintf_chk")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, %u, %d, %d, %08X...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(uint32_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16),from_ptrv(*(ptr_t*)from_ptr(R_ESP+20)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, %u, %d, %d, %08X...)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16),from_ptriv(R_ESP+20));
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     post = pu32?3:0;
                 } else  if(strstr(s, "vsprintf")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", %p)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), from_ptriv(R_ESP+12));
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     post = 3;
                 } else  if(strstr(s, "__vsprintf_chk")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %d, %zu, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int*)from_ptr(R_ESP+8), *(size_t*)from_ptr(R_ESP+12), (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+16)), *(void**)from_ptr(R_ESP+20));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %d, %zu, \"%s\", %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), *(int*)from_ptr(R_ESP+8), *(size_t*)from_ptr(R_ESP+12), (char*)from_ptriv(R_ESP+16), *(void**)from_ptr(R_ESP+20));
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     post = 3;
                 } else  if(strstr(s, "__snprintf_chk")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, %d, %d, \"%s\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptri(ulong_t, R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+20)), *(void**)from_ptr(R_ESP+24));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, %d, %d, \"%s\", %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptri(ulong_t, R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), (char*)from_ptriv(R_ESP+20), *(void**)from_ptr(R_ESP+24));
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     post = 3;
                 } else  if(strstr(s, "snprintf")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptri(ulong_t, R_ESP+8), (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %zu, \"%s\", ...)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptri(ulong_t, R_ESP+8), (char*)from_ptriv(R_ESP+12));
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     post = 3;
                 } else  if(strstr(s, "sprintf")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, %08X...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, %08X...)", tid, from_ptriv(R_ESP), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8));
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     post = 3;
                 } else  if(strstr(s, "printf")==s) {
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     if(((uintptr_t)pu32)<0x5) // probably a _chk function
                         pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\"...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, pu32?((char*)(pu32)):"nil");
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\"...)", tid, from_ptriv(R_ESP), (char *)s, pu32?((char*)(pu32)):"nil");
                 } else  if(strstr(s, "__printf_chk")==s) {
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptri(int, R_ESP+4), pu32?((char*)(pu32)):"nil");
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, \"%s\", ...)", tid, from_ptriv(R_ESP), (char *)s, from_ptri(int, R_ESP+4), pu32?((char*)(pu32)):"nil");
                 } else  if(strstr(s, "wprintf")==s) {
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                     if(((uintptr_t)pu32)<0x5) // probably a _chk function
                         pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%S\"...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, pu32?((wchar_t*)(pu32)):L"nil");
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%S\"...)", tid, from_ptriv(R_ESP), (char *)s, pu32?((wchar_t*)(pu32)):L"nil");
                 } else  if(strstr(s, "__vswprintf")==s) {
                     if(*(size_t*)from_ptr(R_ESP+12)<2) {
-                        snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, %p, %p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(ulong_t*)from_ptr(R_ESP+8), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20));
+                        snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, %p, %p, %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), *(ulong_t*)from_ptr(R_ESP+8), from_ptriv(R_ESP+12), *(void**)from_ptr(R_ESP+16), *(void**)from_ptr(R_ESP+20));
                     } else {
-                        snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, \"%S\", %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(ulong_t*)from_ptr(R_ESP+8), *(wchar_t**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16));
+                        snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, \"%S\", %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), *(ulong_t*)from_ptr(R_ESP+8), *(wchar_t**)from_ptr(R_ESP+12), *(void**)from_ptr(R_ESP+16));
                         pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
                         post = 6;
                     }
                 } else  if(strstr(s, "puts")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\"...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\"...)", tid, from_ptriv(R_ESP), (char *)s, (char*)from_ptriv(R_ESP+4));
                 } else  if(strstr(s, "fputs")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %p...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", %p...)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else  if(strstr(s, "fgets")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %d, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int*)from_ptr(R_ESP+8), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %d, %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), *(int*)from_ptr(R_ESP+8), from_ptriv(R_ESP+8));
                     post = 2;
                     perr = 2;
                 } else  if(strstr(s, "__uselocale")==s || strstr(s, "uselocale")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4));
                     perr = 3;
                 } else  if(strstr(s, "fprintf")==s) {
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8));
                     if(((uintptr_t)pu32)<0x5) // probably a __fprint_chk
                         pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+12));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), pu32?((char*)(pu32)):"nil");
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, \"%s\", ...)", tid, from_ptriv(R_ESP), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), pu32?((char*)(pu32)):"nil");
                 } else  if(strstr(s, "vfprintf")==s) {
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+8));
                     if(((uintptr_t)pu32)<0x5) // probably a _chk function
                         pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+12));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), pu32?((char*)(pu32)):"nil");
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%08X, \"%s\", ...)", tid, from_ptriv(R_ESP), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), pu32?((char*)(pu32)):"nil");
                 } else  if(strstr(s, "vkGetInstanceProcAddr")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else  if(strstr(s, "vkGetDeviceProcAddr")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else  if(strstr(s, "glXGetProcAddress")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char*)from_ptriv(R_ESP+4));
                 } else if (!strcmp(s, "glTexImage2D")) {
                     snprintf(buff, 256, "%04d|%p: Calling %s(0x%x, %d, 0x%x, %d, %d, %d, 0x%x, 0x%x, %p)", tid, from_ptrv(*(ptr_t*)from_ptrv(R_ESP)), (char *)s, *(uint32_t*)from_ptrv(R_ESP+4), *(int*)from_ptrv(R_ESP+8), *(int*)from_ptrv(R_ESP+12), *(int*)from_ptrv(R_ESP+16), *(int*)from_ptrv(R_ESP+20), *(int*)from_ptrv(R_ESP+24), *(uint32_t*)from_ptrv(R_ESP+28), *(uint32_t*)from_ptrv(R_ESP+32), from_ptrv(*(ptr_t*)from_ptrv(R_ESP+36)));
                 } else  if(strstr(s, "fscanf")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\", ...)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else  if(strstr(s, "sscanf")==s || !strcmp(s, "__isoc99_sscanf")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", ...)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else  if(!strcmp(s, "vsscanf")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", ...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", ...)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else if(strstr(s, "XCreateWindow")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %d, %d, %u, %u, %u, %d, %u, %p, 0x%x, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(uint32_t*)from_ptr(R_ESP+20), *(uint32_t*)from_ptr(R_ESP+24), *(uint32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32), *(uint32_t*)from_ptr(R_ESP+36), from_ptrv(*(ptr_t*)from_ptr(R_ESP+40)), *(uint32_t*)from_ptr(R_ESP+44), from_ptrv(*(ptr_t*)from_ptr(R_ESP+48)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %d, %d, %u, %u, %u, %d, %u, %p, 0x%x, %p)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), *(int*)from_ptr(R_ESP+12), *(int*)from_ptr(R_ESP+16), *(uint32_t*)from_ptr(R_ESP+20), *(uint32_t*)from_ptr(R_ESP+24), *(uint32_t*)from_ptr(R_ESP+28), *(int32_t*)from_ptr(R_ESP+32), *(uint32_t*)from_ptr(R_ESP+36), from_ptriv(R_ESP+40), *(uint32_t*)from_ptr(R_ESP+44), from_ptriv(R_ESP+48));
                 } else if(strstr(s, "XLoadQueryFont")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else if(strstr(s, "XRRSetScreenSize")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, %d, %d, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptri(ulong_t, R_ESP+8), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16), from_ptri(int, R_ESP+20), from_ptri(int, R_ESP+24));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %u, %d, %d, %d, %d)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), from_ptri(ulong_t, R_ESP+8), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16), from_ptri(int, R_ESP+20), from_ptri(int, R_ESP+24));
                 } else if(strstr(s, "XextAddDisplay")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, \'%s\', %p, %d, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+16)), from_ptri(int, R_ESP+20), from_ptrv(*(ptr_t*)from_ptr(R_ESP+24)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, \'%s\', %p, %d, %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptriv(R_ESP+8), from_ptriv(R_ESP+12), from_ptriv(R_ESP+16), from_ptri(int, R_ESP+20), from_ptriv(R_ESP+24));
                 } else if(strstr(s, "_XGetRequest")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %hhu, %u)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptri(uint8_t, R_ESP+8), from_ptri(ulong_t, R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %hhu, %u)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptri(uint8_t, R_ESP+8), from_ptri(ulong_t, R_ESP+12));
                 } else if(strstr(s, "_XReply")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %d, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %d, %d)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptriv(R_ESP+8), from_ptri(int, R_ESP+12), from_ptri(int, R_ESP+16));
                 } else if(strstr(s, "pthread_mutex_init")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptriv(R_ESP+8));
                 } else if(strstr(s, "pthread_mutex_lock")==s || strstr(s, "pthread_mutex_unlock")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4));
                 } else if(strstr(s, "pthread_setname_np")==s) {
                     post = 7;
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), (char*)from_ptriv(R_ESP+8));
                 } else if(strstr(s, "pthread_create")==s) {
                     post = 7;
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+16)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, %p, %p, %p)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8), from_ptriv(R_ESP+12), from_ptriv(R_ESP+16));
                 } else if(!strcmp(s, "fmodf")) {
                     post = 4;
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptriv(R_ESP), (char *)s, *(float*)from_ptr(R_ESP+4), *(float*)from_ptr(R_ESP+8));
                 } else if(!strcmp(s, "fmod")) {
                     post = 4;
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(double*)from_ptr(R_ESP+4), *(double*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%f, %f)", tid, from_ptriv(R_ESP), (char *)s, *(double*)from_ptr(R_ESP+4), *(double*)from_ptr(R_ESP+12));
                 } else if(strstr(s, "pthread_once")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p[%d], %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(int*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p[%d], %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), *(int*)from_ptriv(R_ESP+4), from_ptriv(R_ESP+8));
                 } else if(!strcmp(s, "posix_memalign")) {
                     post = 8;
                     pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4));
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, 0x%x)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), *(uint32_t*)from_ptr(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, 0x%x, 0x%x)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
                 } else  if(strstr(s, "SDL_GL_LoadLibrary")==s) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char*)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char*)from_ptriv(R_ESP+4));
                 } else if(strstr(s, "SDL_GetWindowSurface")==s) {
                     post = 5;
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4));
                 } else  if(strstr(s, "___tls_get_addr")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p[%d, %d])", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(R_EAX), ((int*)from_ptrv(R_EAX))[0], ((int*)from_ptrv(R_EAX))[1]);
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p[%d, %d])", tid, from_ptriv(R_ESP), (char *)s, from_ptrv(R_EAX), ((int*)from_ptrv(R_EAX))[0], ((int*)from_ptrv(R_EAX))[1]);
                 } else if (!strcmp(s, "FT_Outline_Get_CBox")) {
                     pu32 = *(uint32_t**)from_ptrv(R_ESP+8);
-                    snprintf(buff, 256, "%04d|%p: Calling %s(%p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 256, "%04d|%p: Calling %s(%p, %p)", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                     post = 11;
                 } else if(strstr(s, "udev_monitor_new_from_netlink")==s) {
                     post = 5;
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), (char *)from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptriv(R_ESP), (char *)s, (char *)from_ptriv(R_ESP+4), (char *)from_ptriv(R_ESP+8));
                 } else if(!strcmp(s, "recv")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, 0x%x, %d)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptri(int, R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptri(uint32_t, R_ESP+12), from_ptri(int, R_ESP+16));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, 0x%x, %d)", tid, from_ptriv(R_ESP), (char *)s, from_ptri(int, R_ESP+4), from_ptriv(R_ESP+8), from_ptri(uint32_t, R_ESP+12), from_ptri(int, R_ESP+16));
+                    post = 13;
+                } else if(!strcmp(s, "fnmatch")) {
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p\"%s\", %p\"%s\", %d)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptriv(R_ESP+4), from_ptriv(R_ESP+8), from_ptriv(R_ESP+8), from_ptri(int, R_ESP+12));
                     post = 13;
                 } else  if(!strcmp(s, "syscall")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %p, %p...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+12)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+16)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%d, %p, %p, %p...)", tid, from_ptriv(R_ESP), (char *)s, *(int32_t*)from_ptr(R_ESP+4), from_ptriv(R_ESP+8), from_ptriv(R_ESP+12), from_ptriv(R_ESP+16));
                     perr = 1;
                 } else  if(!strcmp(s, "snd_device_name_get_hint")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(from_ptri(ptr_t, R_ESP+4)), from_ptrv(from_ptri(ptr_t, R_ESP+8)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(%p, \"%s\")", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptriv(R_ESP+8));
                     post = 2;
                 } else  if(!strcmp(s, "getaddrinfo")) {
-                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %p, %p)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, from_ptrv(from_ptri(ptr_t, R_ESP+4)), from_ptrv(from_ptri(ptr_t, R_ESP+8)), from_ptrv(from_ptri(ptr_t, R_ESP+12)), from_ptrv(from_ptri(ptr_t, R_ESP+16)));
+                    snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\", %p, %p)", tid, from_ptriv(R_ESP), (char *)s, from_ptriv(R_ESP+4), from_ptriv(R_ESP+8), from_ptriv(R_ESP+12), from_ptriv(R_ESP+16));
                 } else {
-                    snprintf(buff, 255, "%04d|%p: Calling %s (%08X, %08X, %08X...)", tid, from_ptrv(*(ptr_t*)from_ptr(R_ESP)), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
+                    snprintf(buff, 255, "%04d|%p: Calling %s (%08X, %08X, %08X...)", tid, from_ptriv(R_ESP), (char *)s, *(uint32_t*)from_ptr(R_ESP+4), *(uint32_t*)from_ptr(R_ESP+8), *(uint32_t*)from_ptr(R_ESP+12));
                 }
                 if(!cycle_log) {
                     mutex_lock(&emu->context->mutex_trace);