diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-01-01 16:13:39 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-01-01 16:13:39 +0100 |
| commit | ee5398b3be5d45ec39e21b503d4ee8023a665141 (patch) | |
| tree | e44a6f4233c65c22b41d9219772e548613fb7acc /src/emu | |
| parent | 3d3ab0fedc2b98f7adb84e898ffb32f24a2a1a6a (diff) | |
| download | box64-ee5398b3be5d45ec39e21b503d4ee8023a665141.tar.gz box64-ee5398b3be5d45ec39e21b503d4ee8023a665141.zip | |
Refactored (again) lib init/fini mecanism
Diffstat (limited to 'src/emu')
| -rwxr-xr-x | src/emu/x64emu.c | 2 | ||||
| -rwxr-xr-x | src/emu/x64int3.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/x64emu.c b/src/emu/x64emu.c index d23e10e7..6442adf7 100755 --- a/src/emu/x64emu.c +++ b/src/emu/x64emu.c @@ -182,9 +182,9 @@ void CallAllCleanup(x64emu_t *emu) printf_log(LOG_DEBUG, "Calling atexit registered functions\n"); for(int i=my_context->clean_sz-1; i>=0; --i) { printf_log(LOG_DEBUG, "Call cleanup #%d\n", i); + --my_context->clean_sz; RunFunctionWithEmu(emu, 0, (uintptr_t)(my_context->cleanups[i].f), my_context->cleanups[i].arg, my_context->cleanups[i].a ); } - my_context->clean_sz = 0; box_free(my_context->cleanups); my_context->cleanups = NULL; } diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c index 704ddd5a..d0d71c89 100755 --- a/src/emu/x64int3.c +++ b/src/emu/x64int3.c @@ -80,7 +80,7 @@ static uint8_t Peek8(uintptr_t addr, uintptr_t offset) { return *(uint8_t*)(addr+offset); } -extern int errno; + void x64Int3(x64emu_t* emu, uintptr_t* addr) { if(Peek8(*addr, 0)=='S' && Peek8(*addr, 1)=='C') // Signature for "Out of x86 door" |