<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Thu, Jan 5, 2017 at 4:08 PM Greg Clayton via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="gmail_msg">
> On Jan 5, 2017, at 3:46 PM, David Blaikie via Phabricator <<a href="mailto:reviews@reviews.llvm.org" class="gmail_msg" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> dblaikie accepted this revision.<br class="gmail_msg">
> dblaikie added a comment.<br class="gmail_msg">
> This revision is now accepted and ready to land.<br class="gmail_msg">
><br class="gmail_msg">
> One minor comment.<br class="gmail_msg">
><br class="gmail_msg">
> Also would still love to hear from Chris about testing more interesting cases of non-trivial DWARF and API interactions. I mean perhaps we'll end up with all parsing failures testable with llvm-dwarfdump and something like obj2yaml, then all API interactions we'll test with the DWARF generation APIs and make sure they can express all valid DWARF. (though I'm wondering at that point if it wouldn't be better for us to just create the DWARF objects directly - in fact, in this case we could do that, perhaps - rather than parsing DWARF, we could just create the DWARF parser API objects directly and check that the accessors all work, etc)<br class="gmail_msg">
<br class="gmail_msg">
We probably can move some of the bits that are in the obj2yaml into a library and have the tool link against the library. This would then allow unit tests to link against the library and convert yaml to DWARF for testing invalid DWARF. A lot of DWARF tests must be done at the API level so we can verify we don’t break anything as we modify the DWARF parser.<br class="gmail_msg"></blockquote><div><br></div><div>I'd be surprised by that last bit - it seems most of the invalid DWARF tests should fail in fairly coarse ways that aren't too interesting to the API interactions (though I could see various lazy parsing scenarios hitting errors relatively late & could be interesting to check their errors?). </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> ================<br class="gmail_msg">
> Comment at: unittests/DebugInfo/DWARF/DwarfGenerator.cpp:112<br class="gmail_msg">
> +void dwarfgen::DIE::setForceChildren() {<br class="gmail_msg">
> +  if (Die)<br class="gmail_msg">
> +    Die->setForceChildren(true);<br class="gmail_msg">
> ----------------<br class="gmail_msg">
> Is this conditional needed - or do we generally assume it's an invariant that the Die is non-null for most of the operations on dwarfgen::DIE?<br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
> <a href="https://reviews.llvm.org/D28303" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D28303</a><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
><br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div></div>