[Dwarf-discuss] "null entry"
Cary Coutant
cary
Fri May 20 14:43:15 GMT 2005
> I'm sure everyone eles knows what this phrase means,
> but there's no index hit for it, and so far in my reading
> it's been used in the specification without explanation.
See Section 7.5.2:
"On some architectures, there are alignment constraints on section
boundaries. To make it easier to pad debugging information sections to
satisfy such constraints, the abbreviation code 0 is reserved.
Debugging information entries consisting of only the abbreviation code
0 are considered null entries."
and Section 7.5.3:
"Following the tag encoding is a 1-byte value that determines whether a
debugging information entry using this abbreviation has child entries
or not. If the value is DW_CHILDREN_yes, the next physically succeeding
entry of any debugging information entry using this abbreviation is the
first child of that entry. If the 1-byte value following the
abbreviation?s tag encoding is DW_CHILDREN_no, the next physically
succeeding entry of any debugging information entry using this
abbreviation is a sibling of that entry. (Either the first child or
sibling entries may be null entries). The encodings for the child
determination byte are given in Figure 17. (As mentioned in Section
2.3, each chain of sibling entries is terminated by a null entry.)"
As David said, this is the only way.
And if you have an abbrev that includes the DW_AT_sibling attribute,
and there are no more siblings, the sibling attribute must point to
that null entry. (Setting the sibling attribute to zero does bad things
to gdb.)
-cary
More information about the Dwarf-discuss
mailing list