Re: Understanding the internals of core dump generation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi...

On Wed, Feb 4, 2009 at 4:25 PM, Indraneel Mukherjee <indro.ml@xxxxxxxxx> wrote:
> Hi All,
> I am looking to understand how core dumps are generated. I'm able to
> generate application core dumps. Now i want to understand the internals of
> core dump generation.
>
> 1. What happens internally when a segfault occurs?

if segfaults happen inside valid VMA area, then page fault happens.

if segfaults happen outside valid VMA area, then segmentation fault
handler is called. By default the action is killing the offending
application.


>
> 2. Who actually stores the core dump?

you mean "create"? surely the kernel.....

> 3. How is the core dump file created?

in general, kernel traverse all the VMAs that belongs to the offending
process. Then kernel dumps their contents to an ELF file with "ELF
core" type (i forgot the exact type name, so excuse me if I am wrong).

And since it creates ELF, it must create ELF header, section header,
segment header and so on.

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux