In GDB you could continue/step/etc. the debugging process in the background by attaching an & after the command (ex: continue&), allowing you access to the CLI while the process/thread runs. I have found this to be invaluable when debugging multi-process/multi-thread applications when I want to keep the "non-interesting" threads/processes running while I stepped through a single thread.
I was wondering is there anything equivalent in LLDB? Specifically, I would like to specify which execution model I want to use in a script.
An example of something I would like to do in an LLDB script:
# this is just background setup for attaching to multiple processes
# I've figured out how to do this in LLDB
attach 1
add-inferior
inferior 2
attach 2
# this is the step I don't know how to get to work consistently
continue&
inferior 1
# ... do debugging work on inferior 1, possibly switching to inferior 2 as needed
Things I've tried:
In LLDB, the closest thing I've found in the documentation are two "options" --no-stdin, or settings set target.process.disable-stdio true (I don't need stdin for my applications, though stdout would be nice). However, when I tried looking for either of these options in LLDB 6.0, they don't exist anymore, or at least not by these names.
Another thing I have found (couldn't find any documentation on this) is if I attached LLDB to an existing process ID, then when I issued process continue from the CLI it would always execute in the background. However, if I run an LLDB commands script or have LLDB run the process locally then it always executes "in the foreground" and I lose control of the CLI unless I interrupt the running command. It's important to me that I be able to do something like continue& in a script since I will have quite a few processes and manually switching to/continuing each target is very time consuming.