[Converted from Gnats 2358] I have a simple program dynamically linked agains pthread. When i try to set a breakpoint in a child thread created with pthread_create i get Program terminated with signal SIGTRAP, Trace/breakpoint trap. I am using NPTL Release: > gdb 6.6 Environment: Gentoo distribution, all patches,kernel 2.6.22-gentoo-r8, also happens with newer kernels gcc (GCC) 4.1.2 (Gentoo 4.1.2) --------------- GNU C Library stable release version 2.6.1, by Roland McGrath et al. Compiled by GNU CC version 4.1.2 (Gentoo 4.1.2). Compiled on a Linux >>2.6.22-gentoo-r8<< system on 2007-11-06. Available extensions: C stubs add-on version 2.1.2 crypt add-on version 2.1 by Michael Glad and others Gentoo patchset 1.1 GNU Libidn by Simon Josefsson Native POSIX Threads Library by Ulrich Drepper et al Support for some architectures added on, not maintained in glibc core. BIND-8.2.3-T5B How-To-Repeat: Just compile the program with gcc -g -o pthreadtest pthreadtest.c -lpthreads run program with ./pthreadtest & gdb -p `pgrep pthreadtest` In gdb br 12 continue
From: Daniel Jacobowitz <drow@false.org> To: mihai.stanescu@gmail.com Cc: gdb-gnats@sources.redhat.com Subject: Re: threads/2358: Program terminated with signal SIGTRAP, Trace/breakpoint trap Date: Thu, 8 Nov 2007 08:01:25 -0500 On Thu, Nov 08, 2007 at 10:30:30AM -0000, mihai.stanescu@gmail.com wrote: > I have a simple program dynamically linked agains pthread. > > When i try to set a breakpoint in a child thread created with pthread_create i get > > Program terminated with signal SIGTRAP, Trace/breakpoint trap. This is the same as PR threads/2321. I think something must be wrong with Gentoo's latest glibc; it does not happen on any other system. -- Daniel Jacobowitz CodeSourcery
*** Bug 22297 has been marked as a duplicate of this bug. ***
> This is the same as PR threads/2321. I think something must be wrong > with Gentoo's latest glibc; it does not happen on any other system. > Marking as dup then.
Really marking as dup. *** This bug has been marked as a duplicate of bug 9426 ***