aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-11-10 11:55:18 +0000
committerNick Clifton <nickc@redhat.com>2020-11-10 11:55:18 +0000
commit1f57314183549008c065ad2240598d2b0f0ff56b (patch)
tree4bde285befa7b82502adbc13872e96b312d85f79 /binutils
parent07bbadc83db18e251ea5852313d6c8a7bdb02ac7 (diff)
downloadgdb-1f57314183549008c065ad2240598d2b0f0ff56b.zip
gdb-1f57314183549008c065ad2240598d2b0f0ff56b.tar.gz
gdb-1f57314183549008c065ad2240598d2b0f0ff56b.tar.bz2
Accept the DW_FORM_ref8 type when parsing DWARF types.
* dwarf.c (skip_attr_bytes): Correctly handle DW_FORM_ref8. (get_type_abbrev_from_form): Accept DW_FORM_ref8.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/dwarf.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 5807744..cf68eba 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2025,6 +2025,21 @@ skip_attr_bytes (unsigned long form,
break;
case DW_FORM_ref8:
+ {
+ dwarf_vma high_bits;
+
+ SAFE_BYTE_GET64 (data, &high_bits, &uvalue, end);
+ data += 8;
+ if (sizeof (uvalue) > 4)
+ uvalue += high_bits << 32;
+ else if (high_bits != 0)
+ {
+ /* FIXME: What to do ? */
+ return NULL;
+ }
+ break;
+ }
+
case DW_FORM_data8:
case DW_FORM_ref_sig8:
data += 8;
@@ -2115,6 +2130,7 @@ get_type_abbrev_from_form (unsigned long form,
case DW_FORM_ref1:
case DW_FORM_ref2:
case DW_FORM_ref4:
+ case DW_FORM_ref8:
case DW_FORM_ref_udata:
if (uvalue + cu_offset > section->size)
{