This is the mail archive of the
mailing list for the GDB project.
Bug#2199: Problem in gdb-6.5 (remote) while stepping over pthread_create() on x86 and powerpc
- From: Markus Deuling <deuling at de dot ibm dot com>
- To: GDB Discuss <gdb at sources dot redhat dot com>
- Date: Wed, 29 Nov 2006 19:21:09 +0100
- Subject: Bug#2199: Problem in gdb-6.5 (remote) while stepping over pthread_create() on x86 and powerpc
I found a bug in gdb and opened a bug report on
I found the bug when stepping over pthread_create(). The 'next' over
pthread_create() looses its breakpoint after returning. This only seems
to occur if the new Thread uses a shared library using dlopen()/dlsym().
This appears both on x86 and powerpc while remote debugging. I added a
testcases to the bug report which shows this result.
Here is a dump of the gdb session on powerpc. I used gdb-6.5 vanilla:
(gdb) target remote :1111
Remote debugging using :1111
0x0ffd60f0 in ?? ()
(gdb) br main
Breakpoint 1 at 0x10000684: file main.c, line 16.
[New thread 6635]
[Switching to thread 6635]
Breakpoint 1, main () at main.c:16
16 for (cnt = 0; cnt < max_nr; cnt++)
18 val = pthread_create (&thread_id[cnt], NULL, &test, NULL);
[New thread 6636]
[New thread 6638]
[New thread 6639]
Program exited normally.
Here you can see that gdb doesn't stop after next'ing over the first
pthread_create() as it should.
This is reproducible on x86.
Has someone an idea what went wrong ?
GNU Toolchain for Linux on Cell BE