[PATCH] D35733: [DWARF] Added verification check for die ranges. If highPC is an address, then it should be greater or equal to lowPC for each range.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 21 15:48:20 PDT 2017


On Fri, Jul 21, 2017 at 3:41 PM Adrian Prantl via Phabricator <
reviews at reviews.llvm.org> wrote:

> aprantl added inline comments.
>
>
> ================
> Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:218
> +  for (auto Range : Die.getAddressRanges()) {
> +    if (Range.LowPC > Range.HighPC) {
> +      ++NumErrors;
> ----------------
> dblaikie wrote:
> > Should this be >=? Or is it intentional that empty ranges are allowed to
> account for things like comdat functions being omitted by the linker &
> resolving the addresses to zero? (I forget exactly how those work)
> I assume that this is just copying darwin-dwarfdump behavior, but it also
> looks like DWARF allows a single DW_AT_low_pc to be attached to a
> DW_TAG_label, which would then show up as an entity of size 0. (cf. 2.17.1
> Single Address)
>

Presumably that could be differentiated because it has no high_pc at all
compared to one being present and having the same value as low_pc?


>
>
>
> https://reviews.llvm.org/D35733
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170721/2a9457c8/attachment.html>


More information about the llvm-commits mailing list