NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
toolchain/59027: gdb not able to debug forked child
>Number: 59027
>Category: toolchain
>Synopsis: gdb not able to debug forked child
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 24 11:50:00 +0000 2025
>Originator: Peter Skvarka
>Release: 10.1
>Organization:
Soft in Engines
>Environment:
NetBSD bsd.lan 10.1 NetBSD 10.1 (GENERIC)
>Description:
Gdb cannot step through through code in forked child's code.
Cannot stop on breakpoint in forked child code.
>How-To-Repeat:
In my case it happens in multithreaded application. Note that application fork() is called from main thread in time when other threads already exists
How to repeat:
put breakpoint on fork() call, for example:
b sourcename.cpp:LINENUM
gdb stops on fork()
then:
set follow-fork-mode child
and try to step through forked child code.
The result is:
It is possible to step only one or two lines and the gdb jumps to forked parent.
I tried also to call "set follow-fork-mode child" after gdb started and before program is run, behavior is the same.
======================================
Relating problem: gdb does not stop on breakpoint in forked child code.
>Fix:
No ideas
Home |
Main Index |
Thread Index |
Old Index