This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/20426] gdb does not interpret DWARF annotating imported units fully


https://sourceware.org/bugzilla/show_bug.cgi?id=20426

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> ---
(In reply to Mark Wielaard from comment #2)
> (In reply to Mark Wielaard from comment #1)
> > In other DWARF consumers I have worked with following the specification or
> > abstract origin attribute is used to augment the current DIE under
> > consideration, not the other way around. To make it work the other way
> > around a DWARF consumer would have to keep track of all references through
> > DW_AT_specification or DW_AT_abstract_origin to a specific DIE.
> 
> And I think it is not a 1-on-1 relationship. There could be multiple DIEs
> pointing to the same abstract_origin (maybe the function got cloned). So the
> consumer might not even know which one to pick.

That's true.  I guess I can even end up with such a case.  I expected the
consumer to pick the annotation in the same context (probably a bit
optimistic).

I can follow your reasoning about how dwarf consumers work.

It's somewhat unfortunate that for my specific use case I have to replicate
all non-abstract parts of a DIE - esp. that I need to adjust the reference
to the type of 'a'.  I wonder what DWARF says about duplicate DW_AT_type
(one in the concrete and one "different" in the abstract instance) - do
both DW_AT_type complement each other or does the concrete one "hide" the
abstract one.  That is, can I omit DW_AT_type from the DW_TAG_array_type
in the concrete instance and expect it to be picked from the abstract
instance?

Now thinking about how to implement this at all given I have no way to
recreate the type DIEs at the point I can produce the location for
the upper bound...

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]