This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

threads/2372: GDB doesnt step/next correctly if threads are created while program is stopped


>Number:         2372
>Category:       threads
>Synopsis:       GDB doesnt step/next correctly if threads are created while program is stopped
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 29 11:28:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     mihai.stanescu@gmail.com
>Release:        2.7.1
>Organization:
>Environment:
Gentoo with kernel 2.6.22, GNU gdb 6.7.1
>Description:

I attach to a multithreaded application and set a breakpoint in child thread. After gdb is stopped i wait a little and try to step to next instruction. GDB doesnt stop and actually executes a continue. 

This is the output of gdb
(gdb) next
[Thread 0xa96ffb90 (LWP 30225) exited]
[New Thread 0xa8efeb90 (LWP 30226)]
<<< after some time(while i wrote this message) >> 
[Thread 0xad066b90 (LWP 30059) exited]
Thread Event Breakpoint: gdb should not stop!
(gdb) bt
#0  0xb6377830 in __nptl_death_event () from /lib/libpthread.so.0
#1  0xb637832b in start_thread () from /lib/libpthread.so.0
#2  0xb61b603e in clone () from /lib/libc.so.6

This is an old problem and can be reproduced at least since 6.2 


Bug has 90% chances of happening and is very very anoying because my program is very big and some situations are very hard 

Bug doesnt happen if i use "advance" command instead of next. Problem is i need to step in functions and i have no alternative way. 
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]