Re: Looking for rationale for the minidump format

From: Michał_Górny <mgorny_at_moritz.systems>
Date: Mon, 22 Nov 2021 17:04:40 UTC
On Mon, 2021-11-22 at 10:26 -0500, Ed Maste wrote:
> On Sun, 21 Nov 2021 at 09:42, Michał Górny <mgorny@moritz.systems> wrote:
> > 
> > Hi, everyone.
> > 
> > As part of the work contracted by the FreeBSD Foundation, I'm working
> > on adding explicit minidump support to LLDB.  When discussing
> > the options with upstream, I've been asked why FreeBSD created their own
> > minidump format.
> > 
> > I did a bit of digging but TBH all the rationale I could get was to
> > create partial memory dumps.  However, unless I'm mistaken the ELF
> > format is perfectly capable of that -- e.g. via creating an explicit
> > segment for every continuous active region.
> 
> ELF can, indeed. One of my previous co-op students wrote a little tool
> to convert a minidump to ELF, see https://reviews.freebsd.org/D19253.
> That's what it does - creates a segment for each contiguous region. If
> we ended up going this way we could integrate D19253 into savecore.

Thank you for your reply.  I think this approach makes sense.  Do you
want us to pursue updating D19253 to build again (it's failing due to
libkvm API changes and -Werror) and moving it into savecore instead of
adding FreeBSD minidump support in LLDB?

-- 
Best regards,
Michał Górny