When I try to debug my core-dump via gdb either in Qt or directly from terminal, it gives me bunches of warnings like below. Therefore my backtrace is not working properly.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Could not load shared library symbols for ).
Do you need "set solib-search-path" or "set sysroot"?
Is this because my executable built without debugging symbols or is the problem about glibc? Do you have any solution to fix this?
Best Answer
This has nothing to do with your executable.
GDB needs a version of
libthread_db.so.1
that matches yourlibpthread.so.0
, and is not finding such version.Probable causes (from most to least probable):
libthead_db.so.1
set solib-search-path
orset libthread-db-search-path
such that GDB can find a matchinglibthread_db.so.1
You can see which versions of
libthread_db
GDB is trying withset debug libthread-db 1
.