Re: Custom core file

Jan Kratochvil <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On Wed, 28 Sep 2016 17:18:35 +0200, Nikolay Martyanov wrote:
> Idea is very similar to `kdump`, you are right. But instead of Linux kernel
> I have a hypervisor running on a bare-metal. So, in some point of view, I
> try to implement my own kdump. And it will dump not Linux kernel mem, but
> mem of hypervisor.

Ah, sorry I forgot you wrote that "bare-metal" there.

OK, so core files are not standardized the way executables+shlibs are by the
standards of ELF-generic and ELF-x86_64 or ELF-x86 addons. You can either
invent your own format (based on ELF or not) or - what I suggest - is to just
mimic the Linux kernel process format.

In fact /proc/kcore and kdump also create a core file looking as a userland
process to make it easier for consumers to read it, despite the content is
unrelated to userland processes.

I am not aware of official Linux core file documentation, it is best to read
sources in its producers (Linux kernel, gdb gcore) + consumers (many)


Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.