GDB normally stops all threads if a breakpoint is reached (or Ctrl+C is pressed in the GDB shell). I’m aware that commands like scheduler-locking and schedule-multiple exists, but I see no possibility to let a defined thread run in the background while another is debugged.
Share
You can use
set target-async onto enable asynchronous mode, if your target supports it. Then, you can specify background execution with commands. For example,can be used to run a single thread, and
to suspend execution of a single thread, or the whole program.
In conjunction with non-stop mode, you can examine a single thread while others continue to run in the background: