[Dwarf-discuss] "null entry"

David Anderson davea
Fri May 20 13:50:39 PDT 2005


John Bishop writes:
>So how should you mark the last sibling in a tree-level
>as having no more sibs?
>
>One way, with doesn't seem to be the preferred one,
>is to use a different abbreviation for the last sib
>which has DW_CHILDREN_no but is otherwise identical to
>the one used by the other siblings.

No, that does not work. All DW_CHILDREN_no says is that this
DIE has no children itself.  Does not terminate a sibling
chain.  That is, DW_CHILDREN_* says whether what follows is a
new chain, children of whatever DIE is being looked at (or
not).

>The other, apparently preferred way, is to use a "null
>entry".  Is this an entry with the same abbreviation 
>as the other sibs, but with all fields zero?  Is it an
>entry with abbreviation code zero (and thus no body)? 

This is the only way.  As section 2.3 (for example draft 8 or
draft 9 of dwarf3) says, "A chain of sibling entries is
terminated with a null entry." This is, in fact the *only* way
to terminate a chain of sibling entries.

Hope this makes sense.
David Anderson



More information about the Dwarf-Discuss mailing list