How to tell LLDB debugger not to handle SIGBUS?
12,297
You can control how lldb intercepts/passes signals with the "process handle" command. For your case, you'd want to do
(lldb) pro hand -p true -s false SIGBUS
NAME PASS STOP NOTIFY
========== ===== ===== ======
SIGBUS true false true
now the signals will be passed to your process without lldb getting in the way. The "NOTIFY" field indicates whether lldb should print that the signal was received - the default is that it will be printed in the debugger console but that doesn't seem to be happening right now. But the signal is correctly passed along, which is the important bit.
Related videos on Youtube
Author by
Ergwun
Professional software developer. Programming enthusiast.
Updated on October 20, 2022Comments
-
Ergwun over 1 year
I'm embedding MonoTouch in an Xcode project, and want to stop LLDB debugger from handling SIGBUS signals, since they are used by the mono runtime. How can I do that?
-
Martin R over 11 yearsAccording to stackoverflow.com/questions/10431579/…, "process handle SIGBUS -n true -p true -s false" should do the trick.
-
-
ed22 almost 9 yearsIs there any way to set this in XCode?
-
uliwitness over 8 yearsAdd a breakpoint e.g. on main() and then in its breakpoint action add an LLDB command with this line in it, then check the "continue after breakpoint" checkbox.
-
user239546 over 8 yearsTo do this automatically in Xcode, add the command to
~/.lldbinit-Xcode
. If you want this to apply even when usinglldb
from the command line, add the same to~/.lldbinit
-
Jacob Wallström over 4 yearsIt doesn't work to add it to
~/.lldbinit
because it gives the errorerror: No current target; cannot handle signals until you have a valid target and process.
-
Artyom Gevorgyan over 3 yearsI have a similar problem when debugging
swiftc
executable with lldb. On hitting some breakpoints, even though I have applied the suggested change to how lldb handles SIGCHLD (not SIGBUS), it keeps dying. What can I do? Maybe I should file a bug? -
Artyom Gevorgyan over 3 years
Process
Xstopped and restarted: thread 1 received signal: SIGCHLD
This is what I keep getting instead of a stop at breakpoint. -
Ben Voigt almost 3 years@ArtyomGevorgyan: Your program died. The debugger received SIGCHLD. Setting the debugger to break when your program receives SIGCHLD doesn't help because your program didn't receive SIGCHLD.