关于gdb调试core文件总是一堆问号的问题

问题描述:已经在编译选项中加入了-g,但是查看core文件时,还是一堆问号,使用的命令为:gdb -c core

解决方案:由于gdb -c core这样的使用在有些系统下支持不是很好,所以推荐用如下两种方法:

1) gdb exe

(gdb) core-file core

2) gdb -c core

(gdb) file exe

而其中第二种方法在某些系统上也是不好用的,所以就用第一种即可。

Pre-Condition: ulimit -c unlimited[root@localhost CMarketServer_dist]# gdb -c core.18669
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-83.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Missing separate debuginfo for the main executable file
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/3a/1542385962343e7f59102500bd59549476af63
[New Thread 18682]
[New Thread 18680]
[New Thread 18690]
[New Thread 18671]
[New Thread 18675]
[New Thread 18684]
[New Thread 18673]
[New Thread 18683]
[New Thread 18670]
[New Thread 18681]
[New Thread 18692]
[New Thread 18672]
[New Thread 18674]
[New Thread 18685]
[New Thread 18686]
[New Thread 18669]
[New Thread 18688]
[New Thread 18693]
[New Thread 18676]
[New Thread 18691]
[New Thread 18687]
[New Thread 18679]
[New Thread 18678]
[New Thread 18677]
[New Thread 18689]
Core was generated by `./CMarketServer'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007f01d0000078 in ?? ()
(gdb) file ./CMarketServer
Reading symbols from /home/artogrid/workspace/deploy/CMarketServer_dist/CMarketServer...done.
(gdb) set solib-search-path .
Missing separate debuginfo for /usr/local/lib/liblog4cxx.so.10
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/0e/139ae220b73d9a39339f1bace6a96a38c1c44a
warning: Ignoring non-absolute filename: <libqpid_engine.so>
Missing separate debuginfo for libqpid_engine.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/45/564f720db2e65548b71adb8b24b8c36b19d2f5
warning: Ignoring non-absolute filename: <libsdbus.so>
Missing separate debuginfo for libsdbus.so
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/49/927fc4c9a557d91e5165200d6878c62c95b4d2
Missing separate debuginfo for /usr/local/lib/libboost_locale.so.1.55.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/3b/b08849d6e8b2365a28900cf050305ec037d729
Missing separate debuginfo for /usr/local/lib/libboost_regex.so.1.55.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/3d/7679511258d9ca1d23bf068dd95708a91efd8a
Missing separate debuginfo for /usr/local/lib/libboost_thread.so.1.55.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/59/21d90d955afa476af8906b19f16e8cf15f9a8b
Missing separate debuginfo for /usr/local/lib/libboost_system.so.1.55.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/8f/d6d6d4c63d820c16960a54d32c925ab1585a67
Missing separate debuginfo for /root/libs/lib/libaprutil-1.so.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/d2/190161fce4d5f32576cc1e776e865e551b66cd
Missing separate debuginfo for /root/libs/lib/libexpat.so.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/fb/ea75911a6345eb5061b8d89df36d60cb15c48e
Missing separate debuginfo for /root/libs/lib/libapr-1.so.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/16/46922411e943bbb119952f475d76a1c67c56fc
warning: Ignoring non-absolute filename: <libqpidtypes.so.1>
Missing separate debuginfo for libqpidtypes.so.1
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/e1/9e52e4b7d04501a5309ab5923f402c445807eb
warning: Ignoring non-absolute filename: <libqpidcommon.so.2>
Missing separate debuginfo for libqpidcommon.so.2
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/d0/cf0f6814e72049c0b69d0cc119531f3b236a54
warning: Ignoring non-absolute filename: <libqpidclient.so.2>
Missing separate debuginfo for libqpidclient.so.2
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/75/f8bb0ae45aa2d66a49ec3c92fbae4e878b81b6
warning: Ignoring non-absolute filename: <libqpidmessaging.so.2>
Missing separate debuginfo for libqpidmessaging.so.2
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/d9/18989eba408d27aeddb06c205dff9314b5c1a5
Missing separate debuginfo for /usr/local/lib/libboost_atomic.so.1.55.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/3c/106c0c4e106d976010c740f1d1148789bf0f2e
Missing separate debuginfo for /usr/local/lib/libboost_program_options.so.1.55.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/b4/a7ea00fdb097880a77fad834ec9a53b34a88ed
Missing separate debuginfo for /usr/local/lib/libboost_filesystem.so.1.55.0
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/85/14d44761aee9411fd89113fe1610ce35913443
Missing separate debuginfo for
Try: yum --enablerepo='*-debug*' install /usr/lib/debug/.build-id/24/26d85978796c7ed259cdc601a7c310c339a21c
[Thread debugging using libthread_db enabled]
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.166.el6_7.3.x86_64 libgcc-4.4.7-16.el6.x86_64 libstdc++-4.4.7-16.el6.x86_64 libuuid-2.17.2-12.18.el6.x86_64 nss-softokn-freebl-3.14.3-23.el6_7.x86_64
(gdb) list
13      #include "service/send_service.h"
14      #include "service/service_manager.h"
15      #include "service/publish_manager.h"
16      #include "engine/qpid_engine.h"
17      #include "config.h"
18      #include <boost/thread.hpp>
19
20      int main( int argc, char * argv[] )
21      {
22          engine::qpid::EngineInitializer qpid_engine;
(gdb) bt
#0  0x00007f01d0000078 in ?? ()
#1  0x00000000004aed47 in ConnPool::createConnection (this=0x7f01d0001560) at db/connection_pool.cpp:82
#2  0x00000000004ae7ee in ConnPool::initConnPool (this=0x7f01d0001560, size=5) at db/connection_pool.cpp:50
#3  0x00000000004adcfe in ConnPool::ConnPool (this=0x7f01d0001560, url="(\340+\001\000\000\000\000\020\026\000\320\001\177\000\000\230^)\001\000\000\000\000\350\030\000\320\001\177\000\000h\330+\001\000\000\000\000`\035\000\320\005\000\000\000\300\025\000\320\001\177\000\000\240?\362\001\177\000\000\300?\362\001\177\000\000\000\000\000\000\000\000\000\000\340?\362\001\177\000\000\213\061E\000\000\000\000\000 ?\362\001\177\000\000yS\351\031\002\177\000\000`\221,\001\000\000\000\000 \000\000\320\001\177\000\000u\000\000\000\000\000\000\000\300\025\000\320\001\177\000\000\300?\362\016\000\000\000\003", '\000' <repeats 39 times>"\320, \030\000\320\001\177\000\000\b\000\000\000\000\000\000\000`\035\000\320\001\177\000\000`\035\000\320\001\177\000\000`\037\000\320\001\177\000\000\350\030\000\320\001\177\000\000`\035\000\320\001\177\000\000`\035\000\320\001\177\000\000`\037\000\320\001\177\000\000\350\030\000\320\001\177"..., username="\230^)\001\000\000\000\000\350\030\000\320\001\177\000\000h\330+\001\000\000\000\000`\035\000\320\005\000\000\000\300\025\000\320\001\177\000\000\240?\362\001\177\000\000\300?\362\001\177\000\000\000\000\000\000\000\000\000\000\340?\362\001\177\000\000\213\061E\000\000\000\000\000 ?\362\001\177\000\000yS\351\031\002\177\000\000`\221,\001\000\000\000\000 \000\000\320\001\177\000\000u\000\000\000\000\000\000\000\300\025\000\320\001\177\000\000\300?\362\016\000\000\000\003", '\000' <repeats 39 times>"\320, \030\000\320\001\177\000\000\b\000\000\000\000\000\000\000`\035\000\320\001\177\000\000`\035\000\320\001\177\000\000`\037\000\320\001\177\000\000\350\030\000\320\001\177\000\000`\035\000\320\001\177\000\000`\035\000\320\001\177\000\000`\037\000\320\001\177\000\000\350\030\000\320\001\177\000\000\003\000\000\000\000\000\000\000\034[\351\031\002"..., passwd="", size=5) at db/connection_pool.cpp:22
#4  0x00000000004ae676 in ConnPool::getInstance () at db/connection_pool.cpp:38
#5  0x000000000045318b in DBConnector::DBConnector (this=0x7f01d00015c0) at db/dbconnector.cpp:22
#6  0x00000000004530b5 in DBConnector::getInstance () at db/dbconnector.cpp:14
#7  0x000000000044585b in QuoteBusiness::GetQuotesCount (this=0x7f01f2bfc6a0, cond=...) at quote_business.cpp:38
#8  0x000000000043cdf1 in QuoteService::GetQuoteList (this=0x12d7080, msg=0x7f01f2bfcb30, reply=...) at quote_service.cpp:83
#9  0x000000000043c3c8 in QuoteService::processReqMsg (this=0x12d7080, msg=0x7f01f2bfcb30) at quote_service.cpp:29
#10 0x000000000047fe7a in Service::threadReqMsg (this=0x12d7080) at service/service.cpp:83
#11 0x00000000004838d7 in boost::_mfi::mf0<void, Service>::operator() (this=0x12d9260, p=0x12d7080) at /usr/local/include/boost/bind/mem_fn_template.hpp:49
#12 0x00000000004833be in boost::_bi::list1<boost::_bi::value<Service*> >::operator()<boost::_mfi::mf0<void, Service>, boost::_bi::list0> (this=0x12d9270, f=..., a=...) at /usr/local/include/boost/bind/bind.hpp:253
#13 0x00000000004830fd in boost::_bi::bind_t<void, boost::_mfi::mf0<void, Service>, boost::_bi::list1<boost::_bi::value<Service*> > >::operator() (this=0x12d9260) at /usr/local/include/boost/bind/bind_template.hpp:20
#14 0x0000000000482a3d in boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf0<void, Service>, boost::_bi::list1<boost::_bi::value<Service*> > >, void>::invoke (function_obj_ptr=...)at /usr/local/include/boost/function/function_template.hpp:153
#15 0x000000000045c75d in boost::function0<void>::operator() (this=0x12d9258) at /usr/local/include/boost/function/function_template.hpp:767
#16 0x000000000045c436 in boost::detail::thread_data<boost::function0<void> >::run (this=0x12d90a0) at /usr/local/include/boost/thread/detail/thread.hpp:117
#17 0x00007f02197eaab3 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.55.0
#18 0x00007f02199fda51 in start_thread () from /lib64/libpthread.so.0
#19 0x00007f0219f0393d in clone () from /lib64/libc.so.6
(gdb) up
#1  0x00000000004aed47 in ConnPool::createConnection (this=0x7f01d0001560) at db/connection_pool.cpp:82
82              conn = driver_->connect(connection_properties);
(gdb) down
#0  0x00007f01d0000078 in ?? ()
(gdb) up
#1  0x00000000004aed47 in ConnPool::createConnection (this=0x7f01d0001560) at db/connection_pool.cpp:82
82              conn = driver_->connect(connection_properties);
(gdb) p connection_properties
$1 = std::map with 4 elements = {[{realStr = "OPT_RECONNECT", static npos = 18446744073709551615}] = {variant = 0x7f01d0001da0},[{realStr = "hostName", static npos = 18446744073709551615}] = {variant = 0x7f01d0001770},[{realStr = "password", static npos = 18446744073709551615}] = {variant = 0x7f01d0001370},[{realStr = "userName", static npos = 18446744073709551615}] = {variant = 0x7f01d00017b0}
}
(gdb) p driver_
$2 = (sql::mysql::MySQL_Driver *) 0x7f01d0001490
(gdb) quit 

https://blog.csdn.net/cloud_castle/article/details/50833251

https://blog.csdn.net/tina_tian1/article/details/49869613

解决gdb 调试 core 文件函数名显示为问号的问题相关推荐

  1. coredump gdb 调试_Linux下如何使用gdb调试core文件

    1.core文件 当程序运行过程中出现Segmentation fault (core dumped)错误时,程序停止运行,并产生core文件.core文件是程序运行状态的内存映象.使用gdb调试co ...

  2. Linux 下使用 gdb 调试 core 文件

    1.core文件 当程序运行过程中出现段错误(Segmentation Fault),程序将停止运行,由操作系统把程序当前的内存状况存储在一个 core 文件中,即核心转储文件(Coredump Fi ...

  3. GDB调试core文件样例(如何定位Segment fault)

    core dump又叫核心转储, 当程序运行过程中发生异常, 程序异常退出时, 由操作系统把程序当前的内存状况存储在一个core文件中, 叫core dump. (Linux中如果内存越界会收到SIG ...

  4. Gdb 调试core文件详解

    一,什么是coredump 我们经常听到大家说到程序core掉了,需要定位解决,这里说的大部分是指对应程序由于各种异常或者bug导致在运行过程中异常退出或者中止,并且在满足一定条件下(这里为什么说需要 ...

  5. GDB调试core文件详解

    一,什么是coredump 我们经常听到大家说到程序core掉了,需要定位解决,这里说的大部分是指对应程序由于各种异常或者bug导致在运行过程中异常退出或者中止,并且在满足一定条件下(这里为什么说需要 ...

  6. 用gdb调试core文件

    GDB是一个强大的命令行调试工具.大家知道命令行的强大就是在于,其可以形成执行序列,形成脚本.UNIX下的软件全是命令行的,这给程序开发提代供了极大的便利,命令行软件的优势在于,它们可以非常容易的集成 ...

  7. gdb 调试core文件

    @1:gdb exe文件 core文件 @2:bt 查看栈 @3:f N 进入某个函数,其中N是整数,是 bt 命令展示的栈号 @4:x/[nfu]  <addr> 展示某个内存地址的变量 ...

  8. 交叉编译:linaro-gdb调试core文件,堆栈显示问号

    问题背景 交叉编译环境的linaro-gdb可以用了,结果打开core文件,显示堆栈都是?? aarch64-linux-gun-gdb ./test corewarning: /lib/libpth ...

  9. PostgreSQL的学习心得和知识总结(二十四)|CentOS环境 配置生成coredump程序崩溃内存转储文件及gdb调试core文件

    目录结构 注:提前言明 本文借鉴了以下博主.书籍或网站的内容,其列表如下: 1.使用GDB分析core dump文件,点击前往 2.详解coredump,点击前往 3.PostgreSQL数据库仓库链 ...

最新文章

  1. linux查看服务依赖关系,服务管理(1)
  2. Runloop - 运行循环
  3. sqlplus 登录数据库
  4. Qt::WA_NoMousePropagation用法
  5. 如何踢掉 sql 语句中的尾巴,我用 C# 苦思了五种办法
  6. 计算机英语input,人教版高中英语选修计算机英语VoiceInput.ppt
  7. Android 应用开发(28)----APP功耗测试方法
  8. 浅析C++开发语言的特点
  9. c语言课程设计找出肇事车牌,C语言课程设计报告01.doc
  10. 随机森林python反欺诈_基于三明治结构深度学习框架的金融反欺诈模型研究与应用...
  11. 为什么世界上最好的语言是php,我们来谈谈PHP为什么是世界上最好的语言?
  12. 菜鸟日记(yzy):集成Ucrop裁剪图片架构,并创建管理类使用
  13. activity已经销毁判断
  14. 为什么说线上教育是未来的趋势?
  15. 【预测模型】基于最小二乘法算法实现股票预测matlab代码
  16. 阿里云服务器镜像操作系统如何选择?阿里云镜像注意事项
  17. 逆时针旋转坐标系的转换
  18. UIC564-2 附录4 –阻燃防火测试:火焰的扩散
  19. Android卡顿优化分析
  20. CockroachDB的raft优化

热门文章

  1. bert中文预训练模型_[中文医疗预训练模型] MC-BERT
  2. yapi 插件_强大的开源API接口可视化管理平台——YAPI
  3. 计算机常考应用分析题,计算机常见故障及排除
  4. C语言实验——打印数字图形(JAVA)
  5. 【查看hadoop镜像】
  6. 【opencv】10.播放视频 以及 设置任意键为暂停键
  7. 【自动驾驶】11.百度Apollo对ROS的优化
  8. Vue.js 生产环境部署
  9. Apache下的ArrayUtils工具类总结
  10. JVM(3):Java GC算法 垃圾收集器