Coming from the Linux/gdb world, the gdb by default interrupts the execution of the program upon detecting a SEGV, before the default handler cleans the process up.
How can lldb do the similar trick? Currently the process just exits, making it impossible to query the backtrace etc.
Edit: proccess handle -p true -n true -s true
attempted - with no result :(
(lldb) process handle -p true -n true -s true SIGSEGV
NAME PASS STOP NOTIFY
========== ===== ===== ======
SIGSEGV true true true
(lldb) run
Process 97630 launched: '/Volumes/My Finder Extensions 1/My_Daemon.app/Contents/PlugIns/My_ShellExt.appex/Contents/MacOS/My_ShellExt' (x86_64)
Process 97630 exited with status = 0 (0x00000000) Terminated due to signal 9
Edit: more information:
(lldb) bt all
error: invalid thread
I suspect lldb
does not play nice with corrupted stacks - I'm trying to track down a problem involving a _NSExtensionMain
entry point, or something down the line from there.