[llvm-dev] RFC: Adding "minidump" support to obj2yaml

Pavel Labath via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 13 03:57:15 PDT 2019


Hello again,

I've posted a patch <https://reviews.llvm.org/D59291> which adds basic
minidump support to obj2yaml. I've tried to keep the size down as much
as possible, but the patch is still relatively large (~1kLOC) because
I needed to set up the infrastructure because we had no minidump
support at all at this moment.

I've made the MinidumpFile class inherit from llvm::Binary, which I
didn't know exists before, but it seems that minidump files fit in
there nicely. I did not try to put the code into a separate module,
since that is not really supported by the Binary hierarchy right now
(we'd need some kind of plugin mechanism to register minidump files at
runtime).

let me know what you think,
pavel

On Wed, 6 Mar 2019 at 19:44, Pavel Labath <labath at google.com> wrote:
>
> Thanks for the support, James.
>
> Adrian, I do share the concerns about code size. I suppose I could put
> the minidump parsing code into a subfolder of lib/Object, such that it
> is a separate library and can be disabled by excluding it from
> LLVM_DYLIB_COMPONENTS by people trying to minimize size footprint (I
> don't expect this should have impact on anything other than the llvm
> shared library, as the tools which don't use this code simply will not
> have it linked in). If that's the consensus, then I'm happy to
> implement that, but I'm not sure if this doesn't give more prominence
> to the minidump code than it deserves (i.e., why should it get a
> special subfolder, and elf/macho/coff/wasm code be stuffed into the
> same folder).
>
> Or we could just say that the niceness of having a single tool for
> yaml<->binary conversions (and to me that really seems like the main
> advantage of putting this code in llvm) isn't worth the size increase,
> and just have a separate tool for that in the lldb repo, at least
> until we have another reason to have minidump parsing code live in
> llvm.
>
> regards,
> pavel
>
> On Wed, 6 Mar 2019 at 17:43, Adrian Prantl <aprantl at apple.com> wrote:
> >
> > I have no problem with extending yaml2obj. As for the minidump parsing code, do you think it would be possible lay it out in a way that compiling it can be optional? I would imagine that this feature is less interesting for people who want to build, e.g., non-crosscompiling Linux toolchains and since the code size of LLVM is growing very quickly people are becoming more sensitive to it.
> >
> > -- adrian


More information about the llvm-dev mailing list