Debugging in native mode: gdb complains about libthread_db

Debugging in native mode: gdb complains about libthread_db

When I try to debug a program in native mode directly on the card using gdb, I get the following message:

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

As it indicates, I am unable to navigate threads. I am ssh'ing to the card directly and running the gdb built for MPSS 3.2.1. ldd on the executable shows that I am using libpthread from /lib64: => /lib64/ (0x00007f30c7f77000)

And there is indeed a libthread_db in /lib64:

lrwxrwxrwx    1 root     root            19 Jan  1  1970 /lib64/ ->
-rwxr-xr-x    1 root     root         31384 Apr  2 15:49 /lib64/

Is there something else that I need to do? One detail that may be relevant is that I built using the cross compiler that comes with the windows installation of composer.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I figured it out: you need to install libc6-dbg as well, which provides the following files:

-rwxr-xr-x    1 root     root        212261 Apr  2 15:48 /lib64/.debug/
-rwxr-xr-x    1 root     root        679207 Apr  2 15:49 /lib64/.debug/
lrwxrwxrwx    1 root     root            19 May 29 13:53 /lib64/.debug/ ->
lrwxrwxrwx    1 root     root            21 May 29 13:53 /lib64/.debug/ ->


From an earlier case of this on Linux, it was advised that point 4 from the following Errata ( was necessary which has one transferring those to the coprocessor.

Have you also done that?

Actually, no, I didn't do that. In fact, debugging the main thread still worked when I had only installed gdb on the coprocessor.

Leave a Comment

Please sign in to add a comment. Not a member? Join today