diff options
Diffstat (limited to 'src/libtools')
| -rw-r--r-- | src/libtools/signals.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c index dfec9f62..079a5780 100644 --- a/src/libtools/signals.c +++ b/src/libtools/signals.c @@ -1550,13 +1550,15 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for } } print_cycle_log(log_minimum); -#ifndef ANDROID + if((box64_showbt || sig==SIGABRT) && log_minimum<=box64_log) { // show native bt #define BT_BUF_SIZE 100 int nptrs; void *buffer[BT_BUF_SIZE]; char **strings; + + #ifndef ANDROID nptrs = backtrace(buffer, BT_BUF_SIZE); strings = backtrace_symbols(buffer, nptrs); if(strings) { @@ -1565,6 +1567,7 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for free(strings); } else printf_log(log_minimum, "NativeBT: none (%d/%s)\n", errno, strerror(errno)); + #endif extern int my_backtrace_ip(x64emu_t* emu, void** buffer, int size); // in wrappedlibc extern char** my_backtrace_symbols(x64emu_t* emu, uintptr_t* buffer, int size); // save and set real RIP/RSP @@ -1619,7 +1622,7 @@ dynarec_log(/*LOG_DEBUG*/LOG_INFO, "Repeated SIGSEGV with Access error on %p for GO(RIP); #undef GO } -#endif + if(log_minimum<=box64_log) { static const char* reg_name[] = {"RAX", "RCX", "RDX", "RBX", "RSP", "RBP", "RSI", "RDI", " R8", " R9","R10","R11", "R12","R13","R14","R15"}; static const char* seg_name[] = {"ES", "CS", "SS", "DS", "FS", "GS"}; |