[Dwarf-discuss] Re: Dwarf Comment Submission

David Anderson davea
Tue May 31 16:29:23 GMT 2005


Phil Barnard writes:
>1) Only DW_TAG_compile_unit or DW_TAG_partial_unit can be 'root' level 
>entries in a compilation unit block.
>2) There can only be one 'root' level entry in a compilation unit block.

Yes, I believe the above is correct.

>In my original posting I also raised the issue of the use of null die's 
>for padding.  As far as I can see the only place that null die's can be 
>used for padding is at the end of a compilation unit block, as in all 
>other cases they will affect the parsing of the die entries.  Could you 
>also please confirm if this is true?  Even if this is true, I still have 

Exactly right.  Anywhere else the null-DIEs are interpreted
as sibling-chain-end.

>a problem as a parser can't differentiate between null die's used for 
>ending sibling lists and padding, so any check in the parser to ensure 

Much in  dwarf parsing requires context for understanding.

>that there isn't more than one root level entry would have to take that 
>into account (i.e. not throw an error until a non-null die is found, 
>rather than when the number of null die's causes it to pop past the root 
>level). Any ideas?

Yes, that seems correct.
(because, as you hint, popping past the root level is impossible,
not representable, you just have to know where you are when
checking for errors. )


Hope these comments are not just confusing.
David Anderson




More information about the Dwarf-discuss mailing list