[00/20] Make DWARF attribute references safe

Message ID 20200328192208.11324-1-tom@tromey.com
Headers show
Series
  • Make DWARF attribute references safe
Related show

Message

Tom Tromey March 28, 2020, 7:21 p.m.
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