Roland McGrath wrote:
> * With a bit of luck, I may get around to start hacking on
> expected-trees high level check. (Planning this arbitrarily, because
> Mark Wielaard asked me about the low-pc-less DW_TAG_label last week.)
Ok. A place to start is a table based on Appendix A. For each tag,
some attrs are "required" (bogus if missing), some "expected"
(suspicious
if missing), some "optional", and it's worthy of mention if any others
appear.
Likewise for the tags appearing as children of each tag, but that can be a
later step.
I put some time into that over the week. The code now includes maps of
expected attributes (per DIE tag), and expected forms (per attribute form).
Attributes are checked by recursive iteration of the DIE tree. That
approach will be necessary for checking expected children, but
attributes, I think, would better be checked from abbreviations. But I
don't think that <dwarf> provides support for that.
Attribute form is not checked, because there's no way to obtain that
from <dwarf>. So the table is here, but it's not being used currently.
I've also written this to DwarfLint wiki page.
PM