什么是Linux中的一个核心转储文件?它提供了什么信息? [英] What is a core dump file in Linux? What information does it provide?

查看:116
本文介绍了什么是Linux中的一个核心转储文件?它提供了什么信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是在Linux核心转储文件?什么的所有信息不会提供?

What is a core dump file in linux? What all information does it provide?

推荐答案

这基本上使用的进程地址空间(从包含所有虚拟内存区的mm_struct 结构),以及任何其他支持信息 *一个,在坠毁的时间。

It's basically the process address space in use (from the mm_struct structure which contains all the virtual memory areas), and any other supporting information*a, at the time it crashed.

例如,假设您尝试取消引用NULL指针,并收到一个SEGV信号,导致你退出。作为这一过程的一部分,操作系统尝试将您的信息写入供以后事后分析的文件。

For example, let's say you try to dereference a NULL pointer and receive a SEGV signal, causing you to exit. As part of that process, the operating system tries to write your information to a file for later post-mortem analysis.

您可以将核心文件加载到与可执行文件(符号和其他调试信息,例如)沿调试器和闲逛,试图发现什么问题造成的。

You can load the core file into a debugger along with the executable file (for symbols and other debugging information, for example) and poke around to try and discover what caused the problem.

*一个:在内核版本2.6.38,的 FS / exec.c / do_coredump() 是一个负责核心转储,你可以看到它传递的信号数量,退出code和寄存器。这反过来传递信号的数量和注册为二进制格式特定的(ELF,a.out的,等等)自卸车。

*a: in kernel version 2.6.38, fs/exec.c/do_coredump() is the one responsible for core dumps and you can see that it's passed the signal number, exit code and registers. It in turn passes the signal number and registers to a binary-format-specific (ELF, a.out, etc) dumper.

精灵自卸车是<一个href=\"http://lxr.linux.no/#linux+v2.6.38/fs/binfmt_elf.c#L1871\"><$c$c>fs/binfmt_elf.c/elf_core_dump()你可以看到,它输出无记忆为基础的信息,如线的详细信息,在<一个href=\"http://lxr.linux.no/#linux+v2.6.38/fs/binfmt_elf.c#L1441\"><$c$c>fs/binfmt_elf.c/fill_note_info(),然后返回到输出的处理空间。

The ELF dumper is fs/binfmt_elf.c/elf_core_dump() and you can see that it outputs non-memory-based information, like thread details, in fs/binfmt_elf.c/fill_note_info(), then returns to output the process space.

这篇关于什么是Linux中的一个核心转储文件?它提供了什么信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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