[PATCH] D29094: Add verbose printing of line info in LLVM Symbolizer

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 26 14:30:06 PST 2017


On Thu, Jan 26, 2017 at 2:09 PM Simon Que via Phabricator <
reviews at reviews.llvm.org> wrote:

> sque added inline comments.
>
>
> ================
> Comment at: lib/DebugInfo/Symbolize/DIPrinter.cpp:85
> +    OS << "  Column: " << Info.Column << "\n";
> +    OS << "  Discriminator: " << Info.Discriminator << "\n";
> +  } else {
> ----------------
> dblaikie wrote:
> > sque wrote:
> > > Should this be marked as DWARF-only, or placed in a DWARF-only section?
> > I'm /guessing/ (though you can probably reproduce this by running
> -verbose on a checked in COFF/CodeView file - I assume/imagine we have some
> of those in the dumper testing) that the Discriminator is 0 when not
> provided?
> >
> > Perhaps it'd be easy enough to not print it when it's zero? If that
> works/you can confirm CodeView is doing what I assume it is - add a test?
> (for either CV, or a case a zero or not present discriminator in ELF).
> I am not familiar with possible values of the discriminator. Does
> discriminator == 0 mean it's invalid? Could it have a valid value of 0?
>

I'm not 100% sure either - just looked it up in the DWARF4 spec and it says
"Where only one block exists for a given source position, the discriminator
value should be zero. " - so, yes, seems it's default value of zero is the
same as not-present, basically.

So, yes, happy to not print it if it's zero to make it more terse in
general and avoid confusion when dumping on platforms that don't have a
discriminator at all.


>
>
> https://reviews.llvm.org/D29094
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170126/828ced3b/attachment.html>


More information about the llvm-commits mailing list