about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-03-10 13:51:38 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-03-10 13:51:38 +0100
commit6ae6ac02725d69d1c1510d05919f44dce975e503 (patch)
treec9a62fd64eb69d4342ea612f2f9b77ceb2bff3ef /src
parent5aa5015348ae5143cd707a4356140d0b2c7f3e07 (diff)
downloadbox64-6ae6ac02725d69d1c1510d05919f44dce975e503.tar.gz
box64-6ae6ac02725d69d1c1510d05919f44dce975e503.zip
[TRACE] Slighlty better log when emiting SIGILL
Diffstat (limited to 'src')
-rw-r--r--src/libtools/signals.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index a9336ed8..a15e7d66 100644
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -532,6 +532,7 @@ void adjustregs(x64emu_t* emu) {
         }
         ++idx;
     }
+    dynarec_log(LOG_INFO, "Checking opcode: rex=%02hhx is32bits=%d, is66=%d %02hhX %02hhX %02hhX %02hhX\n", rex.rex, rex.is32bits, is66, mem[idx+0], mem[idx+1], mem[idx+2], mem[idx+3]);
 #ifdef DYNAREC
 #ifdef ARM64
     if(mem[idx+0]==0xA4) {
@@ -1842,6 +1843,10 @@ void emit_signal(x64emu_t* emu, int sig, void* addr, int code)
         if(elf)
             elfname = ElfName(elf);
         printf_log(LOG_NONE, "Emit Signal %d at IP=%p(%s / %s) / addr=%p, code=%d\n", sig, (void*)R_RIP, x64name?x64name:"???", elfname?elfname:"?", addr, code);
+        if(sig==SIGILL) {
+            uint8_t* mem = (uint8_t*)R_RIP;
+            printf_log(LOG_NONE, "SIGILL: Opcode at ip is %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx\n", mem[0], mem[1], mem[2], mem[3], mem[4], mem[5]);
+        }
     }
     my_sigactionhandler_oldcode(sig, 0, &info, NULL, NULL, NULL);
 }