[PATCH 00/20] Make DWARF attribute references safe

Tom Tromey tom@tromey.com
Sat Mar 28 19:21:48 GMT 2020


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




More information about the Gdb-patches mailing list