diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-12-05 21:36:11 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-12-05 21:36:11 +0100 |
| commit | 1dce5ef39f6fc5f54dfab2a050a4edec8eb2bcf8 (patch) | |
| tree | 35d33074c59861d079f458605a4bd2f59aca1619 /src | |
| parent | 2c69b57617f5315616458fdbfd236eadcce1dcae (diff) | |
| download | box64-1dce5ef39f6fc5f54dfab2a050a4edec8eb2bcf8.tar.gz box64-1dce5ef39f6fc5f54dfab2a050a4edec8eb2bcf8.zip | |
[INTERPRETER] Trigger a trap exception when CC is encountered
Diffstat (limited to 'src')
| -rw-r--r-- | src/emu/x64int3.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/emu/x64int3.c b/src/emu/x64int3.c index 5d0546b9..227f06fd 100644 --- a/src/emu/x64int3.c +++ b/src/emu/x64int3.c @@ -27,6 +27,7 @@ #include "box64context.h" #include "librarian.h" #include "elfload_dump.h" +#include "signals.h" #include <elf.h> #include "elfloader.h" @@ -325,9 +326,9 @@ void x64Int3(x64emu_t* emu, uintptr_t* addr) } return; } - if(0 && my_context->signals[SIGTRAP]) - raise(SIGTRAP); - else + if(1 && my_context->signals[SIGTRAP]) + emit_signal(emu, SIGTRAP, (void*)R_RIP, 128); + else printf_log(LOG_INFO, "%04d|Warning, ignoring unsupported Int 3 call @%p\n", GetTID(), (void*)R_RIP); //emu->quit = 1; } |