diff options
author | Tom Tromey <tom@tromey.com> | 2020-02-08 13:40:54 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-02-08 13:40:57 -0700 |
commit | 4fc6c0d5345d4268ae43b128a0be3d8cb30c4ab4 (patch) | |
tree | d1b01e37a7ad5942d518e0393c764becca4785cf /gdb/dwarf2/attribute.h | |
parent | cd6c91b4f8c429d49a103c3ad45ee741e41bd835 (diff) | |
download | gdb-4fc6c0d5345d4268ae43b128a0be3d8cb30c4ab4.zip gdb-4fc6c0d5345d4268ae43b128a0be3d8cb30c4ab4.tar.gz gdb-4fc6c0d5345d4268ae43b128a0be3d8cb30c4ab4.tar.bz2 |
Change attr_form_is_block to be a method
This changes attr_form_is_block to be a method. This is done
separately because, unlike the other attribute functions,
attr_form_is_block had special handling for the case where the
argument was NULL. This required auditing each call site; in most
cases, NULL was already ruled out, but in a few spots, an additional
check was needed.
gdb/ChangeLog
2020-02-08 Tom Tromey <tom@tromey.com>
* dwarf2read.c (read_call_site_scope)
(handle_data_member_location, dwarf2_add_member_fn)
(mark_common_block_symbol_computed, read_common_block)
(attr_to_dynamic_prop, partial_die_info::read)
(var_decode_location, dwarf2_fetch_die_loc_sect_off)
(dwarf2_symbol_mark_computed, set_die_type): Update.
* dwarf2/attribute.h (struct attribute) <form_is_block>: Declare
method.
(attr_form_is_block): Don't declare.
* dwarf2/attribute.c (attribute::form_is_block): Now a method.
Change-Id: Idfb290c61d738301ab991666f43e0b9cf577b2ae
Diffstat (limited to 'gdb/dwarf2/attribute.h')
-rw-r--r-- | gdb/dwarf2/attribute.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/dwarf2/attribute.h b/gdb/dwarf2/attribute.h index 2e663f1..c260231 100644 --- a/gdb/dwarf2/attribute.h +++ b/gdb/dwarf2/attribute.h @@ -79,6 +79,11 @@ struct attribute bool form_is_ref () const; + /* Check if the attribute's form is a DW_FORM_block* + if so return true else false. */ + + bool form_is_block () const; + ENUM_BITFIELD(dwarf_attribute) name : 16; ENUM_BITFIELD(dwarf_form) form : 15; @@ -110,9 +115,4 @@ struct attribute #define DW_ADDR(attr) ((attr)->u.addr) #define DW_SIGNATURE(attr) ((attr)->u.signature) -/* Check if the attribute's form is a DW_FORM_block* - if so return true else false. */ - -extern int attr_form_is_block (const struct attribute *attr); - #endif /* GDB_DWARF2_ATTRIBUTE_H */ |