diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-06-25 13:51:53 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-06-25 13:51:53 +0200 |
| commit | 57f1f82d761e38ff1177edb4d7fcb6c86f367cac (patch) | |
| tree | 47f05d5393f2047cecfce9780c4267b7fc25d6f4 /src/libtools | |
| parent | 53f84817ba66cef2697d38061253be899dfe868f (diff) | |
| download | box64-57f1f82d761e38ff1177edb4d7fcb6c86f367cac.tar.gz box64-57f1f82d761e38ff1177edb4d7fcb6c86f367cac.zip | |
[DYNAREC] Added CPU Dump on Signal to help debugging (only if signal inside a DynaBlock for now)
Diffstat (limited to 'src/libtools')
| -rwxr-xr-x | src/libtools/signals.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index 92f973b4..744a9a6e 100755 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -998,6 +998,16 @@ exit(-1); getAddrFunctionName((uintptr_t)(db?db->x64_addr:0)), (db?db->need_test:0)?"need_stest":"clean", db?db->hash:0, hash, (void*)my_context->signals[sig]); +#if defined(ARM64) + static const char* reg_name[] = {"RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI", " R8", " R9","R10","R11", "R12","R13","R14","R15"}; + if(db) + for (int i=0; i<16; ++i) { + if(!(i%4)) printf_log(log_minimum, "\n"); + printf_log(log_minimum, "%s:0x%016lx ", reg_name[i], p->uc_mcontext.regs[10+i]); + } +#else + #warning TODO +#endif #else printf_log(log_minimum, "%04d|%s @%p (%s) (x64pc=%p/%s:\"%s\", rsp=%p), for accessing %p (code=%d)", GetTID(), signame, pc, name, (void*)x64pc, elfname?elfname:"???", x64name?x64name:"???", rsp, addr, info->si_code); #endif |