This is the mail archive of the gdb@sourceware.org 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]

Re: Q: GDB - Threads


On Tue, Jun 2, 2009 at 8:27 AM, Vellemans, Noel
<Noel.Vellemans@visionbms.com> wrote:

> Still not able to debug a MT-application :-(
> Anyone that can help me 'little' further ??

There is (I think) a very high probability that your GDB did not load
correct libthread_db.

> Both libs have been build on the same system.. (buildroot)..
> Even started from scratch....
> 88 -rw-r--r--  1 noel noel  82178 2009-06-02 16:23 libpthread-0.9.30.1.so
> 16 -rw-r--r--  1 noel noel  13171 2009-06-02 16:23 libthread_db-0.9.30.1.so

The identical time stamp implies that these were both installed at the
same time, which means they are both built for *target*.

But you need an identical libthread_db built for *host*.

This is because GDB (on host) will try to dlopen() libthread_db (which
helps it debug *target* libpthread).

Once you build correct libthread_db, you'll likely need to adjust
LD_LIBRARY_PATH for GDB to actually find it at runtime.

To see which (if any) libthread_db GDB is loading now do this:
in a separate window execute 'grep libthread_db /proc/<pid-of-gdb>/maps'

Cheers,
-- 
Paul Pluzhnikov


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