[Lldb-commits] [RFC] Type lookup for template types is broken...

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu May 10 08:58:15 PDT 2018


On Thu, 10 May 2018 at 16:19, <paul.robinson at sony.com> wrote:

> > Anyway, the issue is that the PS4 targets don't emit DW_AT_linkage_name
> > attributes in the debug info, but we are still emitting an index entry
> > with
> > the mangled names. This caused the verifier to complain.
> >
> > Two interesting questions follow from this:
> > 1. (mainly for Paul, I guess) Should we fix the debug_names generator to
> > not emit the linkage name index entry for PS4 targets?

> I think there's a flag controlling this which is not the triple, but yes
> if the DIEs don't have linkage names then I think the index also
shouldn't.
Agreed. I expect it to be at least the debugger tuning flag, maybe even a
specific setting. Anyway, I'll track that down and send a patch.



> >
> > 2. (for everyone) Is this verifier check actually valid? This depending
on
> > the interpretation of the last (non-normative) paragraph of Section
> > 6.1.1.1
> > (*). One way of reading it is that a producer is allowed to insert
> > additional entries into the name index. Another would be that we can
also
> > insert additional names for existing entries. This is interesting here
> > because this is exactly what the the template stripping proposal would
do
> > (add extra names to existing entries). If we don't remove that check, it
> > will cause the verifier to complain again.
> >
> > regards
> > pavel
> >
> > (*) The intent of the above rules is to provide the consumer with some
> > assurance that looking up an unqualified name in the index will yield
all
> > relevant debugging information entries that provide a defining
declaration
> > at global scope for that name. A producer may choose to implement
> > additional rules for what names are placed in the index, and may
> > communicate those rules to a cooperating consumer via an augmentation
> > string, described below.

> I read it as, if we emit additional entries, we should emit an
augmentation
> string that says so.  If the augmentation is superseded by a spec change
in
> DWARF 6, I'm sure everybody can accommodate that too.
> --paulr

Satisfying the "augmentation" part is easy, as the spec does not say
anything about how the string should look like. The interesting part for me
is what does the "additional entry" mean. Is it adding an additional name
to an .debug_info entry (possibly one that is not contained in any of the
standard attributes) like template proposal we were floating around? Or, is
it adding a previously unindexed .debug_info entry to the index (e.g. the
enumerator issue we were talking about in the dwarf_discuss thread)? (or
both..)


More information about the lldb-commits mailing list