This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Custom core file
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