QtCreator / Ubuntu 22.04 / LLDB / __clone3()
-
Greetings !
I've installed latest QtCreator (12.0) on Ubuntu 22.04
with clang-17.I've built and trying to debug console multi-threaded utility.
The strange thing on my side is debugger make stops on every __clone3() call although I didn't set the breakpoint there.
As I understand it happens because of new thread is created here.
This is a bit annoying thing for me. Maybe somebody have idea how to avoid these stops ?
Thanks a lot !
-
@Dmytro-Bogovych
I don't know anything about Creator 12, or whether there is a setting for this there. But I believe I recall the underlying gdb is set to break on creating a new process (clone3()
should be for this, but I think that includes thread creation?). You can do a gdbset
command (e.g.follow-fork-mode
?) to alter this sort of behaviour if this is the cause and you cannot find a dedicated setting for it. -
@JonB Thanks for suggestions !
However:- this is LLDB - not GDB.
- LLDB has similar settings (thanks again for this idea) - settings set target.process.follow-fork-mode <child | parent> . I have tried this setting (via .lldbinit and debugger log view both) - but no success.
-
@Dmytro-Bogovych OK. But have you tried lldb outside of Creator for this? Find out which one it is an issue in.
-
I've found the lldb stops on SIGSTOP signal.
After command in debugger log viewprocess handle SIGSTOP -n true -p true -s false
lldb runs ok on thread starting - it doesn't break anymore.
However I don't understand how to add this command to run automatically on the start of debugger. Nor "Additional startup commands" not file ~/.lldbinit didn't help.
I can put this command into Debugging Helper Customization text box. In this case command works - however regular breakpoints don't work :)