【编程】记录一次gdb coredump 调试经历

14 篇文章 0 订阅
3 篇文章 0 订阅

记录一次gdb coredump 调试经历

在板子上有个进程反复挂掉重启。把coredump文件下载回开发环境。
命令形式:
gdb xxx cored-xxx

 /projects/hnd/tools/linux/hndtools-mips-linux-uclibc-4.9.3/usr/bin/mips-ugw-linux-uclibc-gdb netctrl core-netctrl-2044-1304208015-11 
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 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 "--host=i686-pc-linux-gnu --target=mips-ugw-linux-uclibc".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from netctrl...done.
[New LWP 2044]

warning: `/lib/libpthread.so.0': Shared library architecture unknown is not compatible with target architecture mips:isa32.

warning: `/lib/libgcc_s.so.1': Shared library architecture unknown is not compatible with target architecture mips:isa32.

warning: Could not load shared library symbols for 14 libraries, e.g. /lib/libcommon.so.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `netctrl'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x77bd7bc8 in ?? ()

(gdb) set sysroot ../../../targets/O2V1.0/romfs/  ### 最重要的命令!!!!
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libcommon.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libm.so.0...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libz.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libpthread.so.0...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libapcommon.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libssdk_us_km.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libiofdrv.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libkm.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libenv.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libcm.so...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libwshared.so...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libc.so.0...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/ld-uClibc.so.0...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libdl.so.0...(no debugging symbols found)...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libgcc_s.so.1...done.
Reading symbols from ../../../targets/O2V1.0/romfs/lib/libutil.so.0...(no debugging symbols found)...done.
(gdb) 
(gdb) 
(gdb) bt
#0  0x77bd7bc8 in km_mac_filter_set_mode () from ../../../targets/O2V1.0/romfs/lib/libkm.so
#1  0x0041daa4 in mac_filter_apply_global_option () at api/src/behavior_manager/mac_filter_api.c:635
#2  0x0041e67c in mac_filter_init () at api/src/behavior_manager/mac_filter_api.c:862
#3  0x0040ba58 in netctrl_module_init_entry () at netctrl_module.c:530
#4  0x0040b084 in netctrl_init () at netctrl_main.c:2072
#5  0x0040b4b8 in mode_common () at netctrl_main.c:2148
#6  0x0040b724 in main (argc=1, argv=0x7faa7554) at netctrl_main.c:2181
(gdb) 


  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值