diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-10-04 12:28:11 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-10-04 12:28:11 +0200 |
| commit | 9f4eb36c99723f20e203bda0db07005284ae2eba (patch) | |
| tree | c4b1de9a09ef69c3ba597a82ead6c8017d9ecaaf /src/emu/x86int3.c | |
| parent | cbbafafb46b39b5ccb6f4c08d085317bcf09fba0 (diff) | |
| download | box64-9f4eb36c99723f20e203bda0db07005284ae2eba.tar.gz box64-9f4eb36c99723f20e203bda0db07005284ae2eba.zip | |
[BOX32][WRAPPER] More wrapped function to libc, and many fixes some existing ones
Diffstat (limited to 'src/emu/x86int3.c')
| -rwxr-xr-x | src/emu/x86int3.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index 7e54b0da..3455eda1 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -259,11 +259,11 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) 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)), *(size_t*)from_ptr(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_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)); 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)), *(size_t*)from_ptr(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_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))); pu32 = (uint32_t*)from_ptr(*(ptr_t*)from_ptr(R_ESP+4)); post = 3; } else if(strstr(s, "sprintf")==s) { @@ -320,6 +320,8 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) 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))); } 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))); } else if(strstr(s, "sscanf")==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))); } else if(!strcmp(s, "vsscanf")) { |