当gdb看到一行行的??时,你要冷静!-阿里云开发者社区

开发者社区> 数据库> 正文
登录阅读全文

当gdb看到一行行的??时,你要冷静!

简介: 下面这段,初看一定会脑大,实际原因非常明确,所以遇到时要先观察,不一定是头大的问题。gdb -p 1461GNU gdb 6.

下面这段,初看一定会脑大,实际原因非常明确,所以遇到时要先观察,不一定是头大的问题

gdb -p 1461
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Attaching to process 14614
Reading symbols from /home/zhangsan/bin/test...done.
Using host libthread_db library "/lib64/libthread_db.so.1".
Error while mapping shared library sections:
./libtest.so: No such file or directory.
Reading symbols from /lib64/libdl.so.2...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libz.so.1...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /usr/lib64/libaio.so.1...done.
Loaded symbols for /usr/lib64/libaio.so.1
Symbol file not found for ./libtest.so
Reading symbols from /lib64/libc.so.6...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib64/libstdc++.so.6...done.
Loaded symbols for /usr/lib64/libstdc++.so.6
Reading symbols from /lib64/libm.so.6...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libgcc_s.so.1...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
[New Thread 47461298698832 (LWP 14614)]
[New Thread 1082132800 (LWP 14618)]
Symbol file not found for ./libapr-1.so.0
Reading symbols from /lib64/libcrypt.so.1...done.
Loaded symbols for /lib64/libcrypt.so.1
Reading symbols from /lib64/libnss_files.so.2...done.
Loaded symbols for /lib64/libnss_files.so.2
0x00002b2a709a9ec1 in free () from /lib64/libc.so.6
(gdb) t 2
[Switching to thread 2 (Thread 1082132800 (LWP 14618))]#0  0x00002b2a709cf476 in poll () from /lib64/libc.so.6
(gdb) bt
#0  0x00002b2a709cf476 in poll () from /lib64/libc.so.6
#1  0x00002b2a70d6cf05 in ?? ()
#2  0x000000000053ab48 in ?? ()
#3  0x0000000040800100 in ?? ()
#4  0x0000000040800120 in ?? ()
#5  0x00002b2a7081553e in ?? ()
#6  0x0000271040800110 in ?? ()
#7  0x0000000b00000009 in ?? ()
#8  0x000000090000000b in ?? ()
#9  0x000000004c7f5412 in ?? ()
#10 0x000000000053ab48 in ?? ()
#11 0x0000000000000000 in ?? ()



仔细看后,原因再清楚不过了,LD_LIBRARY_PATH没有设置好,可能是因为运行程序和gdb的环境不一样,可以手工设置下LD_LIBRARY_PATH,再gdb就OK了。

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

分享:
数据库
使用钉钉扫一扫加入圈子
+ 订阅

分享数据库前沿,解构实战干货,推动数据库技术变革

其他文章