tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: gdb - stepping in multithread application



On Mon, Mar 10, 2025 at 10:57:09AM +0100, Peter Skvarka wrote:
> 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.

I see this on my NetBSD 10.0 boxes (evbarm, GENERIC64 kernel).  If I run
a multithreaded program in gdb, `next` commands do not stop my program
on the next statement of the current program but at some statement in a
second thread.  It was not always so.

David

-- 
David Young
dyoung%pobox.com@localhost    Urbana, IL    (217) 721-9981


Home | Main Index | Thread Index | Old Index