Question: How can I configure / tell Xcode's LLDB to not stop on - and pass a certain singal for a Commandline Tool?
Background:
We are using 3rd party code that relies on SIGUSR1.
Running in Xcode 13, LLDB stops on that signal and eats it (i.e. does not pass it).
Our targtet is a command-line tool, not an NSApplication.
I have found this answer to a very similar question (only difference AFAICS is that it is a NSApplication). It says to use this command:
process handle SIGUSR1 -n true -p true -s false
in a Symbolic Breakpoint, setting main()
as symbol.
But that gives us:
error: invalid target, create a target using the 'target create' command
I have tried with a "normal" breakpoint in main():
And with a Symbolic Breakpoint, using main()
as symbol:
Both breakpoints log the described error, so that proves:
- the breakpoint does work
- the command is processed but causes the error
The Xcode scheme used is setup for debug
and the correct executable:
When using the command in LLDB - console (instead of Xcode), it works fine, so the command seems to be OK.
HowTo Simple Reproduce:
In Xcode, "new Project" -> "Comman Line Tool"
Name it "TestLLDB" and save anywhere
set breakpoint in
main()
line 13 (NSLog...)Edit the the breakpoint and add "Debugger Command" Action: "process handle SIGUSR1 -n true -p true -s false"
Run the project
check the console for the above error