[Dwarf-Discuss] imported_unit and reference identity
Roland McGrath
roland@redhat.com
Wed Jan 21 21:49:53 GMT 2009
> 1) What does it mean for an imported unit to "logically belong at the
> place of the imported unit entry" (DIE)? The intent here is that there
> is logically a *copy* of the imported unit that occurs at the place of
> the import unit DIE.
I find this much clear enough in the spec. How it relates to references is
the area I find murky.
> 2) Is one partial unit for a given source file always equivalent to
> every other partial unit for that same source file? Clearly the answer
> is no. [...]
I never had (nor, I think, expressed) any doubt on this subject.
I'm talking about where two subtrees as encoded are in fact identical.
> 3) How does one reference into a (particular copy of a) partial unit?
> Here I think is the real deficiency in DWARF as specified. [...]
Agreed.
> A quick off the cuff suggestion might be to introduce a new form
> DW_FORM_unit_addr which takes two parameters:
> a) a pointer to the DW_TAG_imported_unit DIE that provides the context
> for the referenced entity
> b) a reference to the entity within the imported unit.
That seems sufficient off hand.
> Of course, the cascading effects of multiple layers of nesting also
> needs to be considered--this casual suggestion has not been thought
> through to that extent. But hopefully it will stimulate discussion and
> ideas...
I haven't thought through the weird cases either.
Thanks,
Roland
More information about the Dwarf-discuss
mailing list