diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-10 18:02:21 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-10 18:02:21 +0100 |
| commit | 02161dc4d761cf209095b614534db908a140384a (patch) | |
| tree | 5c1684fba444768e3a5ac528474529e69e03d18f /src/wrapped/wrappedlibc.c | |
| parent | a62f6860247b57b3a27500cd88c9d42e388a782b (diff) | |
| download | box64-02161dc4d761cf209095b614534db908a140384a.tar.gz box64-02161dc4d761cf209095b614534db908a140384a.zip | |
Better functions name resolving when using TRACE, and fixed some printf stuff again
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index bba0a0ad..19e41805 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -604,11 +604,15 @@ EXPORT int my___vfprintf_chk(x64emu_t *emu, void* F, void* fmt, x64_va_list_t b) EXPORT int my__IO_vfprintf(x64emu_t *emu, void* F, void* fmt, x64_va_list_t b) __attribute__((alias("my_vfprintf"))); EXPORT int my_fprintf(x64emu_t *emu, void* F, void* fmt, void* b) { - myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 1); + myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 2); + PREPARE_VALIST; + return vfprintf(F, fmt, VARARGS); +} +EXPORT int my___fprintf_chk(x64emu_t *emu, void* F, int flag, void* fmt, void* b) { + myStackAlign(emu, (const char*)fmt, b, emu->scratch, R_EAX, 3); PREPARE_VALIST; return vfprintf(F, fmt, VARARGS); } -EXPORT int my___fprintf_chk(x64emu_t *emu, void* F, void* fmt, void* b) __attribute__((alias("my_fprintf"))); #if 0 EXPORT int my_wprintf(x64emu_t *emu, void* fmt, void* b, va_list V) { |