[Top][All Lists]

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

[bug #29642] gdb: breakpoints in triggered in other threads result in SI

From: Carl Fredrik Hammar
Subject: [bug #29642] gdb: breakpoints in triggered in other threads result in SIGTRAP
Date: Thu, 22 Apr 2010 14:38:31 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100308 Iceweasel/3.5.8 (like Firefox/3.5.8)


                 Summary: gdb: breakpoints in triggered in other threads
result in SIGTRAP
                 Project: The GNU Hurd
            Submitted by: hammy
            Submitted on: Thu 22 Apr 2010 04:38:30 PM CEST
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Reproducibility: None
              Size (loc): None
         Planned Release: None
                  Effort: 0.00
Wiki-like text discussion box: 



When debugging a multithreaded program with gdb, breakpoints triggered in
separate threads results in a SIGTRAP as if it was a regular terminating
signal.  For instance, with the program:

#include <pthread.h>

void *
foo (void *arg)
  return NULL;

main (int argc, char *argv[])
  pthread_t t;

  pthread_create (&t, NULL, foo, NULL);
  pthread_join (t, NULL);

the bug can be like this:

(gdb) break main
Breakpoint 1 at 0x8048507: file /home/cfhammar/src/hurd-test/gdb-threads.c,
line 14.
(gdb) break foo
Breakpoint 2 at 0x80484f7: file /home/cfhammar/src/hurd-test/gdb-threads.c,
line 6.
(gdb) run
Starting program: /home/cfhammar/test/hurd-test/gdb-threads 
[New Thread 423.5]

Breakpoint 1, main (argc=1, argv=0x15ffdc8)
    at /home/cfhammar/src/hurd-test/gdb-threads.c:14
14        pthread_create (&t, NULL, foo, NULL);
(gdb) continue
[New Thread 423.6]

Program received signal SIGTRAP, Trace/breakpoint trap.
0x01057d8c in mach_msg_trap ()
No such file or directory.
Current language:  auto
The current source language is "auto; currently asm".

There are no problems when all the breakpoints are in main().  I have
only tested with gdb 7.0.1-2 from Debian.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]