GDB debugging warnings

落爺英雄遲暮 提交于 2019-11-27 07:16:47

问题


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?


回答1:


Is this because my executable built without debugging symbols or is the problem about glibc?

This has nothing to do with your executable.

GDB needs a version of libthread_db.so.1 that matches your libpthread.so.0, and is not finding such version.

Probable causes (from most to least probable):

  • You have stripped libpthread.so.0 (don't do that).
  • You've upgraded your glibc, but the upgrade was incomplete and did not update libthead_db.so.1
  • You are using some kind of cross-compilation environment, and really do need to set solib-search-path or set libthread-db-search-path such that GDB can find a matching libthread_db.so.1

You can see which versions of libthread_db GDB is trying with set debug libthread-db 1.



来源:https://stackoverflow.com/questions/14364781/gdb-debugging-warnings

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