核心文件到底是什么以及它为何有用?
正如标题所说:
核心文件到底是什么以及它为什么有用?
我知道 UNIX 何时生成一个,并且我知道如何检查它。我知道它们对于调试很有用...但我不完全确定它包含什么,所以我不确定为什么它有用!
As the title says:
What exactly is a core file and why is it useful?
I know when one is generated by UNIX, and I know how to check for one. I'm aware they're useful for debugging... but I'm not entirely sure what it contains so I'm not sure why its useful!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
发布评论
评论(5)
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
核心文件本质上是程序崩溃时内存和寄存器的转储。在调试器中查看时,您可以获得有关崩溃时程序所在位置的信息,以及获取堆栈跟踪或查看堆内存的状态。基本上,它可以让您在崩溃时使用附加的调试器执行任何操作,而不需要实际运行代码。
A core file is, essentially, a dump of the memory and registers of the program at the time that it crashed. When viewed in a debugger, you can get information on where the program was at the time of the crash, as well as getting stack traces or viewing the state of heap memory. Basically it lets you do anything you could with a debugger attached at the time of the crash, short of actually running code.