如何在GDB中打印最后接收到的信号?
当将核心转储加载到 GDB 时,会显示它自动崩溃的原因。例如
程序因信号 11(分段错误)而终止。
有什么办法可以再次获取信息吗? 问题是,我正在编写一个需要这些信息的脚本。但是,如果信号仅在加载核心转储后才可用,我以后将无法访问该信息。
这么重要的功能真的没有命令吗?
when loading a core dump into GDB the reason why it crashed automatically is displayed. For example
Program terminated with signal 11, Segmentation fault.
Is there any way to get the information again?
The thing is, that I'm writing a script which needs this information. But if the signal is only available after loading the core dump amd I can't access the information later on.
Is there really no command for such an important feature?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
打印有关最后一个信号执行的信息
To print the information about the last signal execute
如果您知道核心文件名是什么,则可以发出
target core
命令来重新指定目标核心文件:至于隐含的问题,
info last signal是什么< /code> 命令?
,我不知道。好像没有。
核心文件的名称可以通过命令
info target
获取:If you know what the core file name is, you can issue the
target core
command which respecifies the target core file:As for the implied question, what is the
info last signal
command?, I don't know. There does not seem to be one.The core file's name can be obtained from the command
info target
: