Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
GDB "non-stop mode" in Qt Creator
toralf last edited by
Is there any way I can use gdb's "non-stop mode" - see https://sourceware.org/gdb/onlinedocs/gdb/Non_002dStop-Mode.html - when debugging in Qt Creator?
I tried adding
set non-stop on
to Additional Startup Commands in Options->Debugger->GDB, but after this, debug sessions seemed to get completely stuck; execution wasn't interrupted at break-points, and the Stop Debugger button was unable to stop the gdb process. The following was displayed in the status view
NOTE: INFERIOR STILL RUNNING IN STATE InferiorRunOk. >100^error,msg="Target is executing." dCOOKIE FOR TOKEN 100 ALREADY EATEN (InferiorRunOk). TWO RESPONSES FOR ONE COMMAND? sExecutable failed: Target is executing.
I'm using Qt Creator 3.2.2.
roamer last edited by
By try and error, I found out that you should switch to the right "Thread" in the threads drop-down list to be able to use gdb properly.
What I did was to enter the command "set non-stop on" in "Additional Startup Commands" of the debugger configuration and catch the right thread.
That being said I am no expert on this matter, as matter of fact I got to know this "non-stop mode" for five minutes. So don't blame me if it does not respond for you. (for me it did with Qt Creator 3.6.0 and gdb 7.9)