I can't decide whether that case is kosher, I can argue both
sides.
Shouldn't the parent either claim addresses of its child, or not have
that DIE as a child in a first place?
No, I'm pretty confident that's kosher as it is. The DIE nesting there
indicates the lexical scope of the inner function. It's right for it to
be there, so that you can tell e.g. that the DW_TAG_variable entries of
its parent function are visible inside that inner DW_TAG_subprogram scope.
Nesting of DIEs sometimes corresponds to subsets of PC ranges, but not always.
I think we can encode this in the dwarf-knowledge tables.
These:
inlined_subroutine
lexical_block
entry_point
label
with_stmt
try_block
catch_block
can have PC's and those should be entirely inside the containing PC-ful
entry.
These:
compile_unit
partial_unit
module
should have a PC set that's the union of every PC-ful entry they own.
Thanks,
Roland