This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Cross-platform, multithreaded debugging (x86 to ARM) with gdb and gdbserver not recognizing threads
On Thu, Dec 17, 2009 at 10:01 AM, Jason Machacek <jmachacek@stratos.com> wrote:
>> - Is libpthread.so.0 on target stripped?
>
> It doesn't appear to be. ?I made a copy of libthread_db-1.0.so and ran
> 'strip' on it, and the file size dropped. ?Is this the correct approach?
It's not libthread_db, it's the libpthread that matters.
You want to copy /lib/libpthread.so.0 (which should be a symlink to
/lib/libpthread-2.3.2.so) from target to host, and then:
arm-linux-nm libpthread.so.0 | egrep 'version|threads_events'
You should see one of: nptl_version, __linuxthreads_version or
__pthread_threads_events.
If you see 'no symbols' instead, then your libpthread is stripped, and
that explains your problems.
> and libc.so.6 is statically linked into my application.
It is impossible to statically link libc.so.6 into an application. Perhaps
you mean that your app is linked with libc.a ?
In general GDB may have harder time debugging statically-linked threaded
executables, and you should always prefer to link against system libraries
dynamically.
Cheers,
--
Paul Pluzhnikov