Re: Custom core file

Nikolay Martyanov
2016-09-28T16:27:53Z

On 09/28/2016 06:32 PM, Jan Kratochvil wrote:
> 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.
>
> 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.
>
>
Not sure I can mimic Linux format exactly. At least I have another set
of registers in use (VMX of Intel x86 arch are involved). May be it's
critical, may be not...
Any way, Linux code was the first thing I looked at. So my way is "mimic
as close as possible, adapt as few as possible".
Thanks for confirmation that it is one of possible ways to solve my
problem =)

And in case I can't mimic it for 100%, I have to make several
adaptations in GDB. The details were listed in my first message.
Still hoping someone can comment on them

Thanks,
Nikolay