GDB problems
I'm trying to run GDB to debug code on my target. Whenever I start
it up, I get this warning:
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
and indeed, no thread debug commands will work.
I've found that the library /usr/lib/libthread_db.so is not being installed in the rootfs. However, just adding this library isn't enough. The file /lib/libpthread-2.60.so has been stripped on the target and this also breaks GDB. Installing a non-stripped version of this library lets GDB do thread debugging.
Both of these libraries come from the eglibc package. How can I adjust that recipe to:
* Install libthread_db.so
* Avoid stripping libpthread-2.16.so
It looks like the libthread_db.so file(s) should be installed via the 'eglibc-thread-db' package, but I can't find this package anywhere on my system.
Any pointers?
Thanks
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 11 lines · Gary Thomas
I'm trying to run GDB to debug code on my target. Whenever I start
it up, I get this warning:
warning: Unable to findlibthread_dbmatching inferior's thread library, thread debugging will not be available.
and indeed, no thread debug commands will work.I've found that the library
/usr/lib/libthread_db.sois not being installed in the rootfs. However, just adding this library isn't enough. The file/lib/libpthread-2.60.sohas been stripped on the target and this also breaks GDB. Installing a non-stripped version of this library lets GDB do thread debugging.
Quoted 8 lines
Both of these libraries come from the eglibc package. How can I adjust that recipe to:
* Install libthread_db.so
* Avoid stripping libpthread-2.16.soIt looks like the libthread_db.so file(s) should be installed via the 'eglibc-thread-db' package, but I can't find this package anywhere on my system.
It's not clear to me why, but the files labelled as 'eglibc-thread-db' in the eglibc recipe end up in the 'libthread-db1' package, so that mystery is solved.
I still don't know how to get the libpthread library to be not stripped (which it seems is what it takes to make GDB happy in this case).
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 14 lines · On Monday 08 April 2013 06:30:02 Gary Thomas wrote:
Quoted 13 lines · Gary Thomas
I'm trying to run GDB to debug code on my target. Whenever I start
it up, I get this warning:
warning: Unable to findlibthread_dbmatching inferior's thread library, thread debugging will not be available.>
and indeed, no thread debug commands will work.I've found that the library
/usr/lib/libthread_db.sois not being installed in the rootfs. However, just adding this library isn't enough. The file/lib/libpthread-2.60.sohas been stripped on the target and this also breaks GDB. Installing a non-stripped version of this library lets GDB do thread debugging.
Quoted 5 lines
Quoted 5 lines
Both of these libraries come from the eglibc package. How can I
adjust that recipe to:
* Install libthread_db.so
* Avoid stripping libpthread-2.16.so
Does installing eglibc-dbg help with this? (Assuming you don't have this installed already.)
Quoted 7 lines
Quoted 3 lines
It looks like the libthread_db.so file(s) should be installed via the 'eglibc-thread-db' package, but I can't find this package anywhere on my system.
It's not clear to me why, but the files labelled as 'eglibc-thread-db' in the eglibc recipe end up in the 'libthread-db1' package, so that mystery is solved.
That is debian library package renaming (debian.bbclass).
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre
Quoted 15 lines · Paul Eggleton
Quoted 14 lines · On Monday 08 April 2013 06:30:02 Gary Thomas wrote:
Quoted 13 lines · Gary Thomas
I'm trying to run GDB to debug code on my target. Whenever I start
it up, I get this warning:
warning: Unable to findlibthread_dbmatching inferior's thread library, thread debugging will not be available.>
and indeed, no thread debug commands will work.I've found that the library
/usr/lib/libthread_db.sois not being installed in the rootfs. However, just adding this library isn't enough. The file/lib/libpthread-2.60.sohas been stripped on the target and this also breaks GDB. Installing a non-stripped version of this library lets GDB do thread debugging.
Quoted 8 lines
Quoted 5 lines
Quoted 5 lines
Both of these libraries come from the eglibc package. How can I
adjust that recipe to:
* Install libthread_db.so
* Avoid stripping libpthread-2.16.soDoes installing eglibc-dbg help with this? (Assuming you don't have this installed already.)
Yes, although it's named 'libc6-dbg'
Quoted 10 lines
Quoted 8 lines
Quoted 4 lines
It looks like the libthread_db.so file(s) should be installed via the 'eglibc-thread-db' package, but I can't find this package anywhere on my system.
It's not clear to me why, but the files labelled as 'eglibc-thread-db' in the eglibc recipe end up in the 'libthread-db1' package, so that mystery is solved.
That is debian library package renaming (debian.bbclass).
Ah, black magic...
Signature · 4 lines
------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------
Quoted 2 lines · Paul Eggleton
Does installing eglibc-dbg help with this? (Assuming you don't have this installed already.)
libc6-dev should be enough. You do not need -dbg one. If it does not work with -dev then we have a problem.