GDB调试警告 [英] GDB debugging warnings

查看:1920
本文介绍了GDB调试警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过gdb或者直接从终端调试我的核心转储时,它会给我提供如下的警告。因此,我的回溯工作不正常。


警告:无法找到匹配劣质线程库的libthread_db,线程调试将不可用。



警告:无法找到匹配劣质线程库的libthread_db,线程调试将不可用。


$ b 警告:无法加载共享库符号)。
您是否需要set solib-search-path或set sysroot?

这是因为我的可执行文件已构建没有调试符号或是关于glibc的问题?你有解决方案来解决这个问题吗?
解决方案

这是因为我的可执行文件没有调试符号或者是关于glibc的问题?


这与您的可执行文件无关。



GDB需要一个与 libpthread.so.0 匹配的 libthread_db.so.1 版本,并且未找到此版本。 / p>

可能的原因(从大多数到最不可能):


  • 您已经剥离了libpthread .so.0(不要那样做)。

  • 您已升级您的glibc,但升级未完成且未更新 libthead_db.so.1

  • 您正在使用某种交叉编译环境,并且确实需要 set solib-search-path set libthread-db-search-path ,这样GDB可以找到匹配的 libthread_db.so.1



  • 你可以看到哪些版本的 libthread_db GDB正在用设置调试libthread-db 1


    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?

    解决方案

    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.

    这篇关于GDB调试警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆