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:

libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f30c7f77000)

And there is indeed a libthread_db in /lib64:

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

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 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

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/libthread_db-1.0.so
-rwxr-xr-x    1 root     root        679207 Apr  2 15:49 /lib64/.debug/libpthread-2.14.90.so
lrwxrwxrwx    1 root     root            19 May 29 13:53 /lib64/.debug/libthread_db.so.1 -> libthread_db-1.0.so
lrwxrwxrwx    1 root     root            21 May 29 13:53 /lib64/.debug/libpthread.so.0 -> libpthread-2.14.90.so

 

From an earlier case of this on Linux, it was advised that point 4 from the following Errata (https://software.intel.com/en-us/articles/debugging-intel-xeon-phi-appli...) 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.

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen