mirror of
https://github.com/ptitSeb/box86.git
synced 2025-05-08 21:08:57 +08:00
Added lldb option to JITGDB
This commit is contained in:
parent
57c1ed7118
commit
b7dccd065f
@ -324,6 +324,7 @@ Will use yyyy as x86_64 interpretor, to launch x64_64 binaries
|
||||
* 2 : Launch `gdbserver` when a segfault, bus error or illegal instruction signal is trapped, attached to the offending process, and go in an endless loop, waiting.
|
||||
Use `gdb /PATH/TO/box86` and then `target remote 127.0.0.1:1234` to connect to the gdbserver (or use actual IP if not on the machine). After that, the procedure is the same as with ` BOX86_JITGDB=1`.
|
||||
This mode can be usefullwhen programs redirect all console output to a file (like Unity3D Games)
|
||||
* 3 : Launch `lldb` when a segfault, bus error or illegal instruction signal is trapped, attached to the offending process and go in an endless loop, waiting.
|
||||
|
||||
#### BOX86_NORCFILES
|
||||
If the env var exist, no rc files (like /etc/box86.box86rc and ~/.box86rc) will be loaded
|
||||
|
@ -1016,6 +1016,8 @@ exit(-1);
|
||||
sprintf(myarg, "%d", pid);
|
||||
if(jit_gdb==2)
|
||||
execlp("gdbserver", "gdbserver", "127.0.0.1:1234", "--attach", myarg, (char*)NULL);
|
||||
else if(jit_gdb==3)
|
||||
execlp("lldb", "lldb", "-p", myarg, (char*)NULL);
|
||||
else
|
||||
execlp("gdb", "gdb", "-pid", myarg, (char*)NULL);
|
||||
exit(-1);
|
||||
|
@ -741,11 +741,11 @@ void LoadLogEnv()
|
||||
p = getenv("BOX86_JITGDB");
|
||||
if(p) {
|
||||
if(strlen(p)==1) {
|
||||
if(p[0]>='0' && p[0]<='0'+2)
|
||||
if(p[0]>='0' && p[0]<='0'+3)
|
||||
jit_gdb = p[0]-'0';
|
||||
}
|
||||
if(jit_gdb)
|
||||
printf_log(LOG_INFO, "Launch %s on segfault\n", (jit_gdb==2)?"gdbserver":"gdb");
|
||||
printf_log(LOG_INFO, "Launch %s on segfault\n", (jit_gdb==2)?"gdbserver":((jit_gdb==3)?"lldb":"gdb"));
|
||||
}
|
||||
p = getenv("BOX86_SHOWSEGV");
|
||||
if(p) {
|
||||
|
@ -47,7 +47,7 @@ ENTRYBOOL(BOX86_NOVULKAN, box86_novulkan) \
|
||||
ENTRYBOOL(BOX86_FUTEX_WAITV, box86_futex_waitv) \
|
||||
ENTRYBOOL(BOX86_FIX_64BIT_INODES, fix_64bit_inodes) \
|
||||
ENTRYSTRING_(BOX86_BASH, bash) \
|
||||
ENTRYINT(BOX86_JITGDB, jit_gdb, 0, 2, 2) \
|
||||
ENTRYINT(BOX86_JITGDB, jit_gdb, 0, 3, 2) \
|
||||
ENTRYSTRING_(BOX86_BOX64, box64) \
|
||||
ENTRYSTRING_(BOX86_LD_PRELOAD, ld_preload) \
|
||||
ENTRYBOOL(BOX86_NOSANDBOX, box86_nosandbox) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user