What is a core dump file in linux? What all information does it provide?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s basically the process address space in use (from the
mm_structstructure which contains all the virtual memory areas), and any other supporting information*a, at the time it crashed.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.
*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.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, infs/binfmt_elf.c/fill_note_info(), then returns to output the process space.