public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* threads/2358: Program terminated with signal SIGTRAP, Trace/breakpoint trap
@ 2007-11-08 10:38 mihai.stanescu
  0 siblings, 0 replies; 2+ messages in thread
From: mihai.stanescu @ 2007-11-08 10:38 UTC (permalink / raw)
  To: gdb-gnats


>Number:         2358
>Category:       threads
>Synopsis:       Program terminated with signal SIGTRAP, Trace/breakpoint trap
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 08 10:38:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Mihai stanescu
>Release:        > gdb 6.6
>Organization:
>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
>Description:
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 
>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

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-csrc; name="pthreadtest.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="pthreadtest.c"

I2luY2x1ZGUgPHB0aHJlYWQuaD4KI2luY2x1ZGUgPHNjaGVkLmg+CiNpbmNsdWRlIDxzdGRpby5o
PgojaW5jbHVkZSA8dW5pc3RkLmg+CgoKdm9pZCoKbXlUaHJlYWQodm9pZCogYXJnKQp7CiAgICB3
aGlsZSgxKSB7CiAgICAgICAgc2xlZXAoNSk7CiAgICAgICAgcHJpbnRmKCJTdWNjZXNzLCBjcmVh
dGVkIHRocmVhZCBleGl0aW5nXG4iKTsKICAgIH0KICAgIHJldHVybiAoMCk7Cn0KCgppbnQKbWFp
bihpbnQgYXJnYywKICAgIGNoYXIqKiBhcmd2KQp7CgoKaW50IHByaW9yaXR5ID0gIDEwOwppbnQg
c3RhdHVzOwpwdGhyZWFkX3QgdGhyZWFkSWQ7CgoKcHJpbnRmKCJXaWxsIGNyZWF0ZSB0aHJlYWQg
d2l0aCBwcmlvcml0eSAlZFxuIiwgcHJpb3JpdHkpOwpzdGF0dXMgPSBwdGhyZWFkX2NyZWF0ZSgm
dGhyZWFkSWQsIE5VTEwsIG15VGhyZWFkLCAwKTsKcHJpbnRmKCJUaHJlYWQgY3JlYXRpb24gcmV0
dXJuZWQgJWRcbiIsIHN0YXR1cyk7Cgp2b2lkICp2YWx1ZTsKcHRocmVhZF9qb2luKHRocmVhZElk
LCAmdmFsdWUpOwoKcHJpbnRmKCJNYWluIHRocmVhZCBleGl0aW5nXG4iKTsKICAgcmV0dXJuICgw
KTsKfQo=


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: threads/2358: Program terminated with signal SIGTRAP, Trace/breakpoint trap
@ 2007-11-08 13:08 Daniel Jacobowitz
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2007-11-08 13:08 UTC (permalink / raw)
  To: nobody; +Cc: gdb-prs

The following reply was made to PR threads/2358; it has been noted by GNATS.

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-08 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-08 10:38 threads/2358: Program terminated with signal SIGTRAP, Trace/breakpoint trap mihai.stanescu
2007-11-08 13:08 Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).