由于lib位置错误导致的gdb调试问题

本来gdb用的好好地,结果突然有一天当同事在使用gdb bt命令调试core的时候突然发现所有的输出都是??找不到调试信息了,然后debuginfo确实是安装了的,当我使用gdb进行调试的时候发现是可以正常的但是在同事那里就是不行。。。囧,后来去他那里看了一眼,发现这货启动程序时候的路径根本不是当时的启动路径,再仔细一看报错信息,全都是丢失lib的输出。。同学,你也太不细心了是不是,😂,又一个典型的知其然不知其所以然的例子啊。

warning: Ignoring non-absolute filename: <./lib/libjson.so.0.10.6>
Missing separate debuginfo for ./lib/libjson.so.0.10.6
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/b5/356e72b88d5cc760a7865257f2d54a44332232

warning: Ignoring non-absolute filename: <./lib/librabbitmq.so.4>
Missing separate debuginfo for ./lib/librabbitmq.so.4
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/ad/ef853ef547839fdf27508382b4e5fb96fc0396

warning: Ignoring non-absolute filename: <./lib/libmyredis.so.1>
Missing separate debuginfo for ./lib/libmyredis.so.1
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/0b/a3d77be4142f256297c1be9a314ce4b3576bba

warning: Ignoring non-absolute filename: <./lib/libevent-2.0.so.5>
Missing separate debuginfo for ./lib/libevent-2.0.so.5
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/41/3993daebfc2d3b7b6b49aa6685e3d0d5cb2571

warning: Ignoring non-absolute filename: <./lib/libhiredis.so.0.13>
Missing separate debuginfo for ./lib/libhiredis.so.0.13
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/bf/8fab45f5dbfcb6a85dbfc85def57a40c7e7b48

warning: Ignoring non-absolute filename: <./lib/libglog.so.0>
Missing separate debuginfo for ./lib/libglog.so.0
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/1f/6627abb06e39da233d89252300fe7fb8d1c0b9

warning: Ignoring non-absolute filename: <./lib/libboost_regex.so.1.53.0>
Missing separate debuginfo for ./lib/libboost_regex.so.1.53.0
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/4b/245024952fa9d5f944afddd92231d29f1bf822

warning: Ignoring non-absolute filename: <./lib/libmysqlclient.so.16>
Missing separate debuginfo for ./lib/libmysqlclient.so.16
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/bd/c06191e0250e98802db5fb923a2de24df5b4a0

warning: Ignoring non-absolute filename: <./lib/libtcmalloc_minimal.so.4>
Missing separate debuginfo for ./lib/libtcmalloc_minimal.so.4
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/d8/64ac12104aceb3bfd3c3c0574e3c96f5ae8e75
Missing separate debuginfo for
Try: yum –enablerepo=’-debug‘ install /usr/lib/debug/.build-id/bb/63a2982cc1c64c7dfd40e09b64af91df3b5a36
Reading symbols from /lib64/libpthread-2.12.so…Reading symbols from /usr/lib/debug/lib64/libpthread-2.12.so.debug…done.


(gdb) bt
#0 0x00007fce07ab89a0 in ?? ()
#1 0x00007fce07abcce2 in ?? ()
#2 0x00007fc8c59cc870 in ?? ()
#3 0x00007fce07abc0b0 in ?? ()
#4 0x00007fc8c59cc99c in ?? ()
#5 0x2543322544352542 in ?? ()
#6 0x00007fc8c59cc890 in ?? ()
#7 0x00007fce0904c8f5 in _dl_runtime_resolve () at ../sysdeps/x86_64/dl-trampoline.S:41
#8 0x00007fce07abcfca in ?? ()
#9 0x00000000d170c3b0 in ?? ()
#10 0x00007fce07a9b906 in ?? ()
#11 0x00007fce07a93de0 in ?? ()
#12 0x00007fce09249568 in ?? ()
#13 0x00007fc8c59cc910 in ?? ()
#14 0x0000000000000000 in ?? ()

转载请注明来源链接 http://just4fun.im/2017/04/16/e7-94-b1-e4-ba-8elib-e4-bd-8d-e7-bd-ae-e9-94-99-e8-af-af-e5-af-bc-e8-87-b4-e7-9a-84gdb-e8-b0-83-e8-af-95-e9-97-ae-e9-a2-98/ 尊重知识,谢谢:)