gdbserver not working with pthreads

Matteo Fortini m.fortini at
Thu Sep 18 18:22:36 EST 2008

I'm using gdbserver & gdb-cross built on OpenEmbedded, both versions 6.6 
and 6.8 on FSL kernel with an MPC5121 cpu, glibc 2.6.1

Gdb on the target is working properly, and can debug threads the usual way.

When debugging with gdbserver/gdb the debugger loses control of the 
threads. I did set the sysroot variable right, and I don't get the ld 
not found error message.
 Basically, I cannot step into pthread_create, without losing control, 
with the software not running and gdb going timeout. Sometimes the 
gdbserver shell prints out "ptrace(): pid not found", or I get E01 reply 
on the gdb-cross. Putting breakpoints into threads works sometimes.
My ultimate goal would be to make it work with Eclipse, but it's a long 
way from having it working with such a system.

I attach the simple software I'm using to test it.

I also tried setting the target architecture to values other than 
powerpc:common, but it didn't help.

Thank you for any clue,
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test1.c
URL: <>

More information about the Linuxppc-embedded mailing list