Linux 从核心转储获取堆栈跟踪

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5745215/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 03:46:42  来源:igfitidea点击:

getting stacktrace from core dump

linuxcoredump

提问by user391986

How can I get a stack trace from a core dump file? The file is about 14 mb and is generated after my application exits saying "segmentation fault"

如何从核心转储文件中获取堆栈跟踪?该文件大约 14 mb,是在我的应用程序退出并说“分段错误”后生成的

I'm on Red Hat 5.5

我在 Red Hat 5.5

采纳答案by sehe

gdb /usr/bin/myapp.binary corefile

Then, use one of:

然后,使用以下之一:

(gdb) bt
(gdb) bt full
(gdb) info threads
(gdb) thread apply all bt
(gdb) thread apply all bt full

Note that installing debug symbols for the related libraries will help

请注意,为相关库安装调试符号会有所帮助