如何解coredump

本文介绍如何使用GDB工具分析核心转储文件,包括定位错误、查看变量和调用堆栈等关键步骤。通过实际案例演示了从核心转储文件中获取版本信息,并加载未剥离的二进制文件进行调试的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

CoreDump

1  cd  coredump path:

20181024_053514_mscd_IPOS_ssc.19341.1540352114.vsfo-3.core

$ gdb [build_version_binary] [coredump.core]

eselnts1473> gdb /lab/epg_scm_builds/MBMS_builds/lsv/EMBMS_155R21A82/vipp/unstripped/mscd_IPOS_ssc.elf.unstripped 20181024_053514_mscd_IPOS_ssc.19341.1540352114.vsfo-3.core

(gdb) bt      or      bt full   #print stack information       ( backTrace)

 (gdb) f                              #f x jump to n stack

(gdb) p                              # print variable

 

    (gdb)    l    //view code

    (gdb)    p params

    (gdb)    p *params

    (gdb) x <address>

 

 

gunzip   <coredump name>.core.gz

strings <coredump path>.core | grep built

strings <coredump path>.core | grep built 

 

Find out put folder through built version

https://epgweb.mo.sw.ericsson.se/build/list/all?userfilter=&tag=&product=

<build outputfolder>/vipp/unstripped/<productname>_IPOS_ssc.elf.unstripped

eselnts1473> gdb /lab/epg_scm_builds/MBMS_builds/lsv/EMBMS_155R21A82/vipp/unstripped/mscd_IPOS_ssc.elf.unstripped 20181024_053514_mscd_IPOS_ssc.19341.1540352114.vsfo-3.core

    4.    coredump

$ gdb [build_version_binary] [coredump.core]

 

 

  bt 打印堆栈信息

f x jump to n stack

p  print variable

 

eselnts1488> cd /home/eyuexio/log_temp                                      # ~

eselnts1488> ls                                                                                                                                                          #/home/eyuexio/log_temp

2019-01-02_11.11_TC35440_Backup_and_Restore_configuration_co_location_irt_ssr8010s2  20190217_060912_sgwcd_IPOS_ssc.14520.1550380152.lc-15.core

eselnts1488> strings 20190217_060912_sgwcd_IPOS_ssc.14520.1550380152.lc-15.core| grep built                                                                   # /home/eyuexio/log_temp

NOISREV: sgwcd Version EPG_27R8A404_190215_080208 latest commit: deeaf56bb8f0d3aba3cc44f210bbd663bd86b2d9 built by gwscm1@eselnlx2275 at Fri, 15 Feb 2019 08:08:54 +0100 Copyright (C) 2010-2019, Ericsson. All rights reserved.

eselnts1488>                                                                                                                                                                                                        # /home/eyuexio/log_temp

eselnts1488> gdb /lab/epg_scm4_builds/program/ci/EPG_27R8A404/vipp/unstripped/                                                                                                                                      # /home/eyuexio/log_temp

3pp/                                       ebmrd_IPOS_ssc.elf.unstripped*             grmd_IPOS_rp.elf.unstripped*               ldbd_IPOS_rp.elf.unstripped*               mpcd_IPOS_rp.elf.unstripped*

cpw_IPOS_ssc.elf.unstripped*               gcmd_IPOS_rp.elf.unstripped*               iecd_IPOS_rp.elf.u          

eselnts1488> gdb /lab/epg_scm4_builds/program/ci/EPG_27R8A404/vipp/unstripped/sgwcd_IPOS_ssc.elf.unstripped 20190217_060912_sgwcd_IPOS_ssc.14520.1550380152.lc-15.core                                              # /home/eyuexio/log_temp

GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-110.el7

Copyright (C) 2013 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/>...

Reading symbols from /lab/epg_scm4_builds/program/ci/EPG_27R8A404/common/unstripped/sgwcd_IPOS_ssc.elf.unstripped...done.

Illegal process-id: 20190217_060912_sgwcd_IPOS_ssc.14520.1550380152.lc-15.core.

 

warning: core file may not match specified executable file.

 

warning: .dynamic section for "/lib64/libdl.so.2" is not at the expected address (wrong library or version mismatch?)

 

 

warning: Could not load shared library symbols for 118 libraries, e.g. /usr/lib/siara/lib64/libaldchunk.so.0.0.

Use the "info sharedlibrary" command to see the complete listing.

Do you need "set solib-search-path" or "set sysroot"?

Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error

 

warning: File "/usr/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".

To enable execution of this file add

              add-auto-load-safe-path /usr/lib64/libthread_db-1.0.so

line to your configuration file "/home/exlaihz/.gdbinit".

To completely disable this security protection add

              set auto-load safe-path /

line to your configuration file "/home/exlaihz/.gdbinit".

For more information about this security protection see the

"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:

              info "(gdb)Auto-loading safe path"

 

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

Warning: couldn't activate thread debugging using libthread_db: Cannot find new threads: generic error

 

warning: File "/usr/lib64/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load:/usr/bin/mono-gdb.py".

 

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

Core was generated by `/opt/services/epg/bin/sgwcd_IPOS_ssc board015:sgwcd:8:2148466696 ProcessColdSta'.

Program terminated with signal 11, Segmentation fault.

#0  0x00002aaab2f874b4 in pthread_create@@GLIBC_2.2.5 () from /lib64/libpthread.so.0

Missing separate debuginfos, use: debuginfo-install glibc-2.17-222.el7.x86_64 libgcc-4.8.5-28.el7_5.1.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 lksctp-tools-1.0.17-2.el7.x86_64

(gdb) bt

#0  0x00002aaab2f874b4 in pthread_create@@GLIBC_2.2.5 () from /lib64/libpthread.so.0

#1  0x00002aaae4963e40 in ?? ()

#2  0x0000000000000000 in ?? ()

(gdb)

 

gdb /lab/epg_scm_builds/MBMS_builds/lsv/EMBMS_155R21A82/vipp/unstripped/

  • Find binary
  • Find coredump related build version and output folder
  • Unzip coredump 
  • How to uncompressing coredump
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

aFakeProgramer

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值