如何分析GDB的coredump文件 [英] How to analyse a coredump file of GDB
本文介绍了如何分析GDB的coredump文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何分析GDB的coredump文件.
How to analyse a coredump file of GDB.
推荐答案
GDB可以帮助您入门:
GDB can get you started:
$ gdb --help
This is the GNU debugger. Usage:
gdb [options] [executable-file [core-file or process-id]]
gdb [options] --args executable-file [inferior-arguments ...]
[snip extended docs]
因此,您将像这样调用它:
So, you'll invoke it like this:
gdb myprog core
然后,GDB将以通常的方式启动,但是状态就好像您已在断点处停止一样.然后,您可以使用打印",检查",列表",回溯",向上",向下"等调查导致崩溃的原因.
GDB will then start in the usual way, but the state will be as if you'd stopped at a breakpoint. You can then use "print", "examine", "list", "backtrace", "up", "down", etc. to investigate what caused the crash.
实际上,您可以使用任何GDB命令,但"continue","step","next"或其他需要实际运行的程序的命令除外.
In fact, you can use any GDB command except "continue", "step", "next", or anything else that requires an actual running program.
这篇关于如何分析GDB的coredump文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文