[PATCH 00/20] Make DWARF attribute references safe

Tom Tromey
2020-03-28T19:22:10Z

This series changes the DWARF code to always check that the use of an
attribute's value is safe -- that is, that the requested type
corresponds to one of the forms that can construct a value of that
type.

This caught some minor bugs in the DWARF reader, though, IMO, nothing
very serious.

Attribute typing is still somewhat ad hoc. That is, while the DWARF
standard specifies the type classes of forms, gdb largely doesn't
conform to this. Instead, it is more lenient. This could be changed,
but I didn't want to mix things too much in this series. Also there's
an argument to be made that there's nothing wrong with the current
approach.

Regression tested by the buildbot. Let me know what you think.

Tom