aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2017-02-23 22:54:02 +0100
committerJan Kratochvil <jan.kratochvil@redhat.com>2017-02-23 22:58:20 +0100
commit2f6cd5918e58572e118b59a26062724404fb4042 (patch)
tree1a336d55a2f0b2f824cb9bd76ab8392e9f2f2a1e /binutils
parent7a7e1061d483f68df1c1369fc49ffadb4ea6f840 (diff)
downloadgdb-2f6cd5918e58572e118b59a26062724404fb4042.zip
gdb-2f6cd5918e58572e118b59a26062724404fb4042.tar.gz
gdb-2f6cd5918e58572e118b59a26062724404fb4042.tar.bz2
DWARF-5: DW_FORM_data16
binutils/ 2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf.c (read_and_display_attr_value): Support DW_FORM_data16.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/dwarf.c26
2 files changed, 30 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 24bf663..26aa81e 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,9 @@
2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
+ * dwarf.c (read_and_display_attr_value): Support DW_FORM_data16.
+
+2017-02-23 Jan Kratochvil <jan.kratochvil@redhat.com>
+
* dwarf.c (display_debug_macro): Support DWARF-5. Rename
DW_MACRO_GNU_*.
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 136e456..86a8385 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -1729,6 +1729,32 @@ read_and_display_attr_value (unsigned long attribute,
data += 8;
break;
+ case DW_FORM_data16:
+ if (!do_loc)
+ {
+ dwarf_vma left_high_bits, left_low_bits;
+ dwarf_vma right_high_bits, right_low_bits;
+
+ SAFE_BYTE_GET64 (data, &left_high_bits, &left_low_bits, end);
+ SAFE_BYTE_GET64 (data + 8, &right_high_bits, &right_low_bits, end);
+ if (byte_get == byte_get_little_endian)
+ {
+ /* Swap them. */
+ left_high_bits ^= right_high_bits;
+ right_high_bits ^= left_high_bits;
+ left_high_bits ^= right_high_bits;
+ left_low_bits ^= right_low_bits;
+ right_low_bits ^= left_low_bits;
+ left_low_bits ^= right_low_bits;
+ }
+ printf (" 0x%08" DWARF_VMA_FMT "x%08" DWARF_VMA_FMT "x"
+ "%08" DWARF_VMA_FMT "x%08" DWARF_VMA_FMT "x",
+ left_high_bits, left_low_bits, right_high_bits,
+ right_low_bits);
+ }
+ data += 16;
+ break;
+
case DW_FORM_string:
if (!do_loc)
printf ("%c%.*s", delimiter, (int) (end - data), data);