[PATCH] D28386: Add the ability to iterate across all attributes in a DIE.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 11:02:00 PST 2017


On Thu, Jan 12, 2017 at 10:56 AM Greg Clayton via Phabricator <
reviews at reviews.llvm.org> wrote:

> clayborg added inline comments.
>
>
> ================
> Comment at: lib/DebugInfo/DWARF/DWARFFormValue.cpp:401
>      default:
> +      assert(false && "unsupported form");
>        return false;
> ----------------
> dblaikie wrote:
> > clayborg wrote:
> > > This is not unreachable. Newer DWARF might be passed to this at some
> point and it needs to fail correctly and just not parse the DIE which will
> cause all DIEs in a DWARFUnit to not be parsed or returned.
> > Then there cannot be an assert(false) here. There must be a test case
> demonstrating that this situation is correctly handled (with a hardcoded
> unknown form).
> >
> > But shouldn't the failure have surfaced earlier - never reaching the
> code that would attempt to parse the value in the DIE? The attempt to walk
> the DIE would fail because the size could not be determined for an unknown
> form.
> I can change this to use llvm_unreachable this and make a test that a bad
> form fails to parse the DIEs for a compile unit. This would be caught in
> DWARFFormValue::skipValue() which calls through to skipFormValue in
> DWARFFormValue.cpp.
>

OK


>
>
> https://reviews.llvm.org/D28386
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170112/68d9eb99/attachment.html>


More information about the llvm-commits mailing list