EmbeddedRelated.com
Forums

gdb on arm-linux which actually groks pthreads?

Started by msg November 2, 2006
Greetings:

Until recently I had not needed to debug code using
pthreads on arm-linux; now I discover that gdb
5.3 and gdb 6.5 both built with thread support
and built against our glibc2.2.2 (sorry, can't
upgrade) produce no output for threads-related
commands.  gdbserver 5.3 lists only 'thread 1'
regardless of the number of created threads.
I can't build gdbserver 6.5 against our glibc.

Our kernel is 2.4.27 (sorry, can't upgrade).

Has anyone made gdb work for threads in this
environment?

Regards,

Michael

msg wrote:
<snip>

REGARDING GDB on ARM -- not threads aware:

> now I discover that gdb > 5.3 and gdb 6.5 both built with thread support > and built against our glibc2.2.2 (sorry, can't > upgrade) produce no output for threads-related > commands. gdbserver 5.3 lists only 'thread 1' > regardless of the number of created threads. > I can't build gdbserver 6.5 against our glibc. > > Our kernel is 2.4.27 (sorry, can't upgrade).
I gave up and got glibc-3.2.6 and now gdb-6.3 and gdb-6.5 handle threads properly; gdb-5.3 does not (it still outputs SIG32 traps instead). I have yet to determine if the libc change breaks any binaries. This note is for the record as this issue is not documented on the web or in Usenet archives. Regards, Michael
msg wrote:


> I gave up and got glibc-3.2.6
Sorry, typo: should be glibc-2.3.6 Michael
msg wrote:


> <snip> > > REGARDING GDB on ARM -- not threads aware: > >> now I discover that gdb >> 5.3 and gdb 6.5 both built with thread support >> and built against our glibc2.2.2 (sorry, can't >> upgrade) produce no output for threads-related >> commands.
<snip>
> I gave up and got glibc-2.3.6 and now gdb-6.3 > and gdb-6.5 handle threads properly; > > I have yet to determine if the libc change > breaks any binaries.
It supports old binaries but breaks new builds against all libraries built against glibc-2.2.2; the worst problem is 'hidden' syms for deprecated features which can't be linked in new builds. It is an untenable requirement to need to rebuild all of the libraries, many of which lack sources, so I now need to use a script to setup symlinks for a glibc-2.2.2 environment for compiling and a glibc-2.3.6 environment for threads-aware debugging. Regards, Michael