Re: Cross-platform, multithreaded debugging (x86 to ARM) with gdb and gdbserver not recognizing threads

Paul Pluzhnikov
2009-12-17T18:53:01Z

On Thu, Dec 17, 2009 at 10:38 AM, Jason Machacek <jmachacek@stratos.com> wrote:

> Sorry about that, I misread your last message.  libpthread.so isn't
> stripped:
>
> $ /opt/crosstool/gcc-3.4.4-glibc-2.3.2/arm-linux/bin/arm-linux-nm
> libpthread-0.10.so | egrep 'version|threads_events'
> 0000de40 r __linuxthreads_version
> 00018e68 b __pthread_threads_events

AFAIU, this is the host copy of libpthread.

One common mistake is stripping it *on target*. Hence I asked to copy it
back and run nm on what is actually on target.

Of course you could just 'ls -l' or md5sum to verify that host and target
copies are identical.

> Yes, I did mean that I statically linked my application with libc.a.
> Perhaps I'll reexamine my build environment as this may be the root of
> my problems with GDB.  When running GDB natively on my target, I had no
> problems debugging my application despite it being statically linked.

Was it on the same target you are using now? (That would rule out stripped
libpthread, or libpthread/libthread_db mismatch, as gdb and gdbserver
should be similarly broken.)

Cheers,
--
Paul Pluzhnikov