This is the mail archive of the 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]

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
(Bug #2199)

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.
(gdb) c
[New thread 6635]
[Switching to thread 6635]

Breakpoint 1, main () at main.c:16
16        for (cnt = 0; cnt < max_nr; cnt++)
(gdb) n
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 ?


Markus Deuling
GNU Toolchain for Linux on Cell BE

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