diff options
author | Tom Tromey <tom@tromey.com> | 2020-09-29 18:49:08 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-09-29 20:29:06 -0600 |
commit | 630ed6b975d2d2f950523dd2ad9ac77614f5222c (patch) | |
tree | 1d3434e503cc0f281807ffe8a379e2163409225d /gdb/dwarf2/read.c | |
parent | 9d2246fce014a0133882051f8527e2dbd869a31b (diff) | |
download | binutils-630ed6b975d2d2f950523dd2ad9ac77614f5222c.zip binutils-630ed6b975d2d2f950523dd2ad9ac77614f5222c.tar.gz binutils-630ed6b975d2d2f950523dd2ad9ac77614f5222c.tar.bz2 |
Remove DW_SIGNATURE
This removes DW_SIGNATURE in favor of methods on struct attribute. As
usual, the methods check the form, which DW_SIGNATURE did not do.
gdb/ChangeLog
2020-09-29 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (read_attribute_value, lookup_die_type)
(dump_die_shallow, follow_die_sig, get_DW_AT_signature_type):
Update.
* dwarf2/attribute.h (struct attribute) <as_signature,
set_signature>: New methods.
(DW_SIGNATURE): Remove.
Diffstat (limited to 'gdb/dwarf2/read.c')
-rw-r--r-- | gdb/dwarf2/read.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index cd7f5c4..e8170eb 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -19850,7 +19850,7 @@ read_attribute_value (const struct die_reader_specs *reader, info_ptr += 8; break; case DW_FORM_ref_sig8: - DW_SIGNATURE (attr) = read_8_bytes (abfd, info_ptr); + attr->set_signature (read_8_bytes (abfd, info_ptr)); info_ptr += 8; break; case DW_FORM_ref_udata: @@ -22093,7 +22093,7 @@ lookup_die_type (struct die_info *die, const struct attribute *attr, } else if (attr->form == DW_FORM_ref_sig8) { - ULONGEST signature = DW_SIGNATURE (attr); + ULONGEST signature = attr->as_signature (); return get_signatured_type (die, signature, cu); } @@ -22782,7 +22782,7 @@ dump_die_shallow (struct ui_file *f, int indent, struct die_info *die) break; case DW_FORM_ref_sig8: fprintf_unfiltered (f, "signature: %s", - hex_string (DW_SIGNATURE (&die->attrs[i]))); + hex_string (die->attrs[i].as_signature ())); break; case DW_FORM_string: case DW_FORM_strp: @@ -23360,7 +23360,7 @@ static struct die_info * follow_die_sig (struct die_info *src_die, const struct attribute *attr, struct dwarf2_cu **ref_cu) { - ULONGEST signature = DW_SIGNATURE (attr); + ULONGEST signature = attr->as_signature (); struct signatured_type *sig_type; struct die_info *die; @@ -23468,7 +23468,7 @@ get_DW_AT_signature_type (struct die_info *die, const struct attribute *attr, } else if (attr->form == DW_FORM_ref_sig8) { - return get_signatured_type (die, DW_SIGNATURE (attr), cu); + return get_signatured_type (die, attr->as_signature (), cu); } else { |