gdb - stepping in multithread application

Peter Skvarka <[email protected]> Mon, 10 Mar 2025 10:57:09 +0100
Newsgroups gmane.os.netbsd.devel.toolchain
Organization Soft in Engines
Message-ID <[email protected]>
Hello,
I have multithread application.
After main thread creates secondary thread and then main thread stops on 
breakpoint then when I try to step in main thread then some steps jumps 
also to secondary thread and then back to main thread etc.
Only solution I know is to use gdb command "break until" on next line 
and put such breakpoint only into thread which I want step through.

Does exist any gdb setup (or command) which keeps steps through thread 
where I began stepping and ignores switching of threads ?
(Result of step does not enter into another thread with exception of 
stopping on breakpoint in another thread)

Peter