mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
Change is_valid_DW_AT_defaulted to a method on attribute
This changes is_valid_DW_AT_defaulted to be a method on struct attribute. Now it correctly respects the form of the attribute. gdb/ChangeLog 2020-09-29 Tom Tromey <tom@tromey.com> * dwarf2/read.c (is_valid_DW_AT_defaulted): Move to attribute.c. (dwarf2_add_member_fn): Update. * dwarf2/attribute.h (struct attribute) <defaulted>: Declare. * dwarf2/attribute.c (attribute::defaulted): New method, from is_valid_DW_AT_defaulted.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
|
||||
#include "dwarf2.h"
|
||||
#include "gdbtypes.h"
|
||||
#include "gdbsupport/gdb_optional.h"
|
||||
|
||||
/* Blocks are a bunch of untyped bytes. */
|
||||
struct dwarf_block
|
||||
@@ -250,6 +251,12 @@ struct attribute
|
||||
return requires_reprocessing;
|
||||
}
|
||||
|
||||
/* Return the value as one of the recognized enum
|
||||
dwarf_defaulted_attribute constants according to DWARF5 spec,
|
||||
Table 7.24. If the value is incorrect, or if this attribute has
|
||||
the wrong form, then a complaint is issued and DW_DEFAULTED_no is
|
||||
returned. */
|
||||
dwarf_defaulted_attribute defaulted () const;
|
||||
|
||||
ENUM_BITFIELD(dwarf_attribute) name : 15;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user