DWARF-5: DW_FORM_data16
authorJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 23 Feb 2017 21:54:02 +0000 (22:54 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Thu, 23 Feb 2017 21:58:20 +0000 (22:58 +0100)
binutils/
2017-02-23  Jan Kratochvil  <jan.kratochvil@redhat.com>

* dwarf.c (read_and_display_attr_value): Support DW_FORM_data16.

binutils/ChangeLog
binutils/dwarf.c

index 24bf6637ed08497d1cf1e0e3cbd2b291070ecddb..26aa81ee331794811d5cba55b176a9804856e34c 100644 (file)
@@ -1,3 +1,7 @@
+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
index 136e45616514ef7997fd89d18257155fb60c8526..86a838559bf187dfcc59f5a4ac5675e1242d6a67 100644 (file)
@@ -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);