diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-08-28 17:12:00 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-08-28 17:12:00 +0200 |
| commit | b7be225846153a1ed44b149b6600fb86c3fa0b42 (patch) | |
| tree | 5d8ccd52428f0f1e788dd80c612826d89d7a10a5 /src/emu | |
| parent | 041eb4e69d833a4bf5f68df59c1fe20385b5ad9f (diff) | |
| download | box64-b7be225846153a1ed44b149b6600fb86c3fa0b42.tar.gz box64-b7be225846153a1ed44b149b6600fb86c3fa0b42.zip | |
[BOX32] More 32bits wrapped functions
Diffstat (limited to 'src/emu')
| -rw-r--r-- | src/emu/x64emu_private.h | 3 | ||||
| -rwxr-xr-x | src/emu/x86int3.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/emu/x64emu_private.h b/src/emu/x64emu_private.h index 35bfd97e..a8690343 100644 --- a/src/emu/x64emu_private.h +++ b/src/emu/x64emu_private.h @@ -133,6 +133,9 @@ typedef struct x64emu_s { void* uc_link; // to handle setcontext (can be x64_ucontext_t or a i386_ucontext_t) int type; // EMUTYPE_xxx define + #ifdef BOX32 + int libc_err; // copy of errno from libc + #endif } x64emu_t; #define EMUTYPE_NONE 0 diff --git a/src/emu/x86int3.c b/src/emu/x86int3.c index 73f5b3ae..cd53335d 100755 --- a/src/emu/x86int3.c +++ b/src/emu/x86int3.c @@ -136,7 +136,7 @@ void x86Int3(x64emu_t* emu, uintptr_t* addr) snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\", \"%s\")", tid, *(void**)from_ptr(R_ESP), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4)), from_ptrv(*(ptr_t*)from_ptr(R_ESP+8))); perr = 2; } else if(!strcmp(s, "chdir")) { - pu32=*(uint32_t**)from_ptr(R_ESP+4); + pu32=(uint32_t*)from_ptrv(R_ESP+4); snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, *(void**)from_ptr(R_ESP), s, pu32?((pu32==(uint32_t*)1)?"/1/":(char*)pu32):"/0/"); } else if(strstr(s, "getenv")==s) { snprintf(buff, 255, "%04d|%p: Calling %s(\"%s\")", tid, *(void**)from_ptr(R_ESP), s, from_ptrv(*(ptr_t*)from_ptr(R_ESP+4))); |