mirror of
https://github.com/ptitSeb/box64.git
synced 2024-11-30 10:11:10 +00:00
[ANDROID] BOX64_SHOWBT Now show Emulated BT on Android (#1258)
Co-authored-by: Pablo Carlos <pablo@localhost.localdomain>
This commit is contained in:
parent
b527ebbf5b
commit
632af46137
@ -326,6 +326,7 @@ set(ELFLOADER_SRC
|
||||
"${BOX64_ROOT}/src/elfs/elfloader.c"
|
||||
"${BOX64_ROOT}/src/elfs/elfparser.c"
|
||||
"${BOX64_ROOT}/src/elfs/elfload_dump.c"
|
||||
"${BOX64_ROOT}/src/elfs/elfdwarf_private.c"
|
||||
"${BOX64_ROOT}/src/emu/x64compstrings.c"
|
||||
"${BOX64_ROOT}/src/emu/x64emu.c"
|
||||
"${BOX64_ROOT}/src/emu/x64int3.c"
|
||||
@ -364,7 +365,6 @@ set(ELFLOADER_SRC
|
||||
if(NOT ANDROID)
|
||||
list(APPEND ELFLOADER_SRC
|
||||
"${BOX64_ROOT}/src/libtools/obstack.c"
|
||||
"${BOX64_ROOT}/src/elfs/elfdwarf_private.c"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -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"};
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user