Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » gdb libthread_db and libpthread version mismatches(Problems with remote debugging)
gdb libthread_db and libpthread version mismatches [message #503935] Wed, 16 December 2009 09:42 Go to next message
Eclipse UserFriend
Hi Forum,

I am cross compiling a Linux application on an x86 OpenSUSE 11.1 Linux host using the powerpc-linux-gnu-g++ compiler.

I am using Eclipse (Eclipse IDE for C/C++ Developers Build id: 20090920-1017).

The binary runs without problems on the target (a freescale MPC8641D).

However, when starting a remote debugging session from Eclipse, I can start gdbserver on the target ok but when I then start the debug process in Eclipse (using powerpc-linux-gnu-gdb) I see the following on the target console:

gdb: error initializing thread_db library: version mismatch between libthread_db and libpthread

In the Eclipse gui I see these messages:

Stopped due to shared library event
warning: .dynamic section for "/lib/libpthread.so.0" is not at the expected address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libm.so.6" is not at the expected address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libgcc_s.so.1" is not at the expected address (wrong library or version mismatch?)
warning: .dynamic section for "/lib/libc.so.6" is not at the expected address (wrong library or version mismatch?)
Stopped due to shared library event

In Eclipse I have configured the "Shared Libraries" tab of the debugger to look in the /lib and /usr/lib directories of the file system the target is using (it accesses it's file system via nfs) which is where the ldd command says the binary is looking.

What is wrong here?

When I run gdb on the binary from the target, it runs without any problems:
"This GDB was configured as "powerpc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1"."

I am guessing that powerpc-linux-gnu-gdb is somehow looking at the libraries in the /lib /usr/lib directories of my host instead of those being used by the target. If I am right, how can I correct this?

Many thanks for your time and help,


Re: gdb libthread_db and libpthread version mismatches [message #506587 is a reply to message #503935] Fri, 08 January 2010 03:36 Go to previous messageGo to next message
Eclipse UserFriend
I had encountered similar problem when remote debugging with Eclipse using ARM cross-debugger arm-linux-gdb.

Pointing the Eclipse Debug shared libraries tab to local ~/nfsroot/lib folder was not sufficient for locating the NFS image of our runtime libraries.

Through some googling, I found that jamming in a 'solib-absolute-prefix' setting to point to the ~/nfsroot folder worked via a local .gdbinit file.

set solib-absolute-prefix /home/davem/nfsroot

To date, I have not found a CDT Debug dialog setting which does the same thing.
Re: gdb libthread_db and libpthread version mismatches [message #506590 is a reply to message #503935] Fri, 08 January 2010 03:56 Go to previous message
Eclipse UserFriend
Many thanks for your reply.

That's exactly the solution I found also. I thought I'd updated it here but it seems I didn't.
Previous Topic:Unresolved breakpoint
Next Topic:Problem with template Class and file linking
Goto Forum:
  


Current Time: Wed Jul 23 12:06:37 EDT 2025

Powered by FUDForum. Page generated in 1.64558 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top