diff options
| author | KreitinnSoftware <80591934+KreitinnSoftware@users.noreply.github.com> | 2024-02-10 12:44:28 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-10 16:44:28 +0100 |
| commit | 632af46137df1d1249950910e9ab24ad5c67630b (patch) | |
| tree | 452c14064f58356500a009c0864c90316cdd5362 /src | |
| parent | b527ebbf5be0949df3b9dcf0806109acc8119476 (diff) | |
| download | box64-632af46137df1d1249950910e9ab24ad5c67630b.tar.gz box64-632af46137df1d1249950910e9ab24ad5c67630b.zip | |
[ANDROID] BOX64_SHOWBT Now show Emulated BT on Android (#1258)
Co-authored-by: Pablo Carlos <pablo@localhost.localdomain>
Diffstat (limited to 'src')
| -rw-r--r-- | src/libtools/signals.c | 7 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 2 |
2 files changed, 5 insertions, 4 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"}; diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 1c7c5a25..4e615629 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -3095,7 +3095,6 @@ EXPORT long my_ptrace(x64emu_t* emu, int request, pid_t pid, void* addr, uint32_ // Backtrace stuff -#ifndef ANDROID #include "elfs/elfdwarf_private.h" EXPORT int my_backtrace(x64emu_t* emu, void** buffer, int size) { @@ -3221,7 +3220,6 @@ EXPORT void my_backtrace_symbols_fd(x64emu_t* emu, uintptr_t* buffer, int size, (void)dummy; } } -#endif EXPORT int my_iopl(x64emu_t* emu, int level) { |