如何分析核心转储 [英] How to analyze core dump

查看:51
本文介绍了如何分析核心转储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

application[rtorrent] 崩溃后,它产生了 core 文件,250MB.

After application[rtorrent] crashed, it produced core file, 250MB.

Caught Segmentation fault, dumping stack:B] [Port: 58940][U 0/0] [D 0/10] [H 1/32] [S 72/75/768] [F 0/128]
Stack dump not enabled.
Aborted (core dumped)

我需要的是分析和查看堆栈跟踪,以了解为什么 rtorrent 经常崩溃.

What I need is to analyze and see the stack trace, to have clue why rtorrent is crashing so often.

推荐答案

gdb 应该能够分析核心:

gdb should be able to analyse the core:

gdb /path/to/binary/rtorrent /path/to/coredump/rtorrent.core

输入 where 以查看堆栈跟踪.

type where to see stack trace.

查看更多:使用调试符号编译 rtorrent,运行,等待崩溃并使用 gdb 分析转储(在这种情况下,您可以看到崩溃发生的确切位置).

To see more: compile rtorrent with debug symbols, run, wait crash and analyse dump with gdb (in this case you can see exact place where crash occurs).

UPD 需要注意的是,据我所知,rtorrent 建立在 libtorrent 之上,因此,您必须使用调试符号重建库和应用程序才能获得完整信息.

UPD One note, rtorrent is build on top of libtorrent as I know, so, you have to rebuild both library and application with debug symbols in order to get full information.

这篇关于如何分析核心转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆