Unable to Debug Multi-Threaded Application with gdb

守給你的承諾、 提交于 2019-12-04 00:11:06

warning: Unable to find libthread_db matching inferior's thread library

This means that your /lib/libthread_db.so.1 does not match your /lib/libpthread.so.0. Such mismatch could be the result of you installing different versions of libc and libthread_db packages, or updating one or the other outside of the package management system. It could also be an error in your packages (i.e. they may not be built correctly).

You should ignore /lib/.debug/* -- that is not the library you are looking for.

You are correct in trying to use

set libthread-db-search-path [path]

however, it seems you have still not pointed it at a version of libthread_db that is compatible with the pthreads library you're using.

First, check which pthread library you're linked to using ldd:

ldd your_executable

then make sure the libthread-db-search-path points to a location that has a compatible version of libthread_db with whatever libpthread you're getting. It could be that you're dynamic linker path is getting a different pthread library than you expect.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!