Well, all of the actual yamlization code in obj2yaml and yaml2obj is library-ized, so you could always add the real code there, then have core2yaml just link against it<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 6, 2019 at 5:11 AM Pavel Labath <<a href="mailto:pavel@labath.sk">pavel@labath.sk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/03/2019 22:52, Zachary Turner wrote:<br>
> <br>
> <br>
> On Tue, Mar 5, 2019 at 1:47 PM Jonas Devlieghere via lldb-dev <br>
> <<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a> <mailto:<a href="mailto:lldb-dev@lists.llvm.org" target="_blank">lldb-dev@lists.llvm.org</a>>> wrote:<br>
> <br>
> <br>
>     I don't know much about the minidump format or code, but it sounds<br>
>     reasonable for me to have support for it in yaml2obj, which would be<br>
>     a sufficient motivation to have the code live there. As you mention<br>
>     in your footnote, MachO core files are already supported, and it<br>
>     sounds like ELF could reuse a bunch of existing code as well. So<br>
>     having everything in LLVM would give you even more symmetry. I also<br>
>     doubt anyone would mind having more fine grained yamlization, even<br>
>     if you cannot use it to reduce a test it's nicer to see structure<br>
>     than a binary blob (imho). Anyway, that's just my take, I guess this<br>
>     is more of a question for the LLVM mailing list.<br>
> <br>
> A lot of obj2yaml output is just "Section Name" / "Section Contents" and <br>
> then a long hex string consisting of the contents.  Since a core file is <br>
> an ELF file, this would already be supported for obj2yaml today (in <br>
> theory)<br>
<br>
Actually, even this is not true. An elf *core file* is an *elf file*, <br>
but it contains no sections. It contains "segments" instead. :P obj2yaml <br>
has absolutely no support for segments so if you try it to yamlize a <br>
core file, you will get an empty output.<br>
<br>
Interestingly, yaml2obj does contain some support for segments, but its <br>
extremely limited, and can only be used to create very simple <br>
"executable" files. Core files still cannot be represented there right <br>
now, as yaml2obj is still very section-centric.<br>
<br>
<br>
However, I do see the appeal in having a single tool for yamlization of <br>
various "object" file formats, so I am going to send an email to <br>
llvm-dev and see what the response is like there. I'd encourage anyone <br>
interested in this to voice your opinion there too.<br>
<br>
regards,<br>
pavel<br>
</blockquote></div>