NetBSD-Bugs archive

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

bin/47430: gdb can't debug threaded programs



>Number:         47430
>Category:       bin
>Synopsis:       gdb can't debug threaded programs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 10 20:15:00 +0000 2013
>Originator:     Patrick Welche
>Release:        NetBSD 6.99.16
>Organization:
        
>Environment:
-current/amd64 of 7th Jan 2013
>Description:
This began with:
  http://mail-index.netbsd.org/current-users/2012/03/19/msg019561.html

When trying to debug a multithreaded program, gdb receives many SIGTRAPS
and looses the plot. Best seen with an example:
>How-To-Repeat:
% gdb `which dig`
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/dig...(no debugging symbols found)...done.
(gdb) break main
Breakpoint 1 at 0x408c17
(gdb) run
Starting program: /usr/bin/dig 

Breakpoint 1, 0x0000000000408c17 in main ()
(gdb) n
Single stepping until exit from function main,
which has no line number information.

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007f7ff5638dfa in _sys___kevent50 () from /usr/lib/libc.so.12
(gdb) 
Single stepping until exit from function _sys___kevent50,
which has no line number information.
0x00007f7ff6005f21 in __kevent50 () from /usr/lib/libpthread.so.1
(gdb) 
Single stepping until exit from function __kevent50,
which has no line number information.
0x00007f7ff641df20 in ?? () from /usr/lib/libisc.so.5
(gdb) 
Cannot find bounds of current function
(gdb) 
Cannot find bounds of current function
(gdb) 
Cannot find bounds of current function
(gdb) 
Cannot find bounds of current function
(gdb) quit
A debugging session is active.

        Inferior 1 [process 1443] will be killed.

Quit anyway? (y or n) y
%

I would expect some dig output, and for dig to complete executing
successfully.
>Fix:



Home | Main Index | Thread Index | Old Index