binutils/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 27 Jul 2011 16:40:59 +0000 (16:40 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 27 Jul 2011 16:40:59 +0000 (16:40 +0000)
* dwarf.c (read_and_display_attr_value): Recognize DW_FORM_data4 and
DW_FORM_data8 as location list pointers only for DWARF < 4.

binutils/ChangeLog
binutils/dwarf.c

index 44d41bf00424ca715e1aaef8e1d20aa9e560a299..e26bb64c61be503ea5ab6d50aaec62a9f03bc246 100644 (file)
@@ -1,3 +1,8 @@
+2011-07-27  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * dwarf.c (read_and_display_attr_value): Recognize DW_FORM_data4 and
+       DW_FORM_data8 as location list pointers only for DWARF < 4.
+
 2011-07-26  Jakub Jelinek  <jakub@redhat.com>
 
        * NEWS: Mention .debug_macro support.
index ae1cd809deec2acbf6ccc504e214e61a4dce43f5..776f775421b378cdefb38f350cd97880ec93c8e6 100644 (file)
@@ -1485,8 +1485,8 @@ read_and_display_attr_value (unsigned long attribute,
        case DW_AT_GNU_call_site_data_value:
        case DW_AT_GNU_call_site_target:
        case DW_AT_GNU_call_site_target_clobbered:
-         if (form == DW_FORM_data4
-             || form == DW_FORM_data8
+         if ((dwarf_version < 4
+              && (form == DW_FORM_data4 || form == DW_FORM_data8))
              || form == DW_FORM_sec_offset)
            {
              /* Process location list.  */
@@ -1516,8 +1516,8 @@ read_and_display_attr_value (unsigned long attribute,
          break;
 
        case DW_AT_ranges:
-         if (form == DW_FORM_data4
-             || form == DW_FORM_data8
+         if ((dwarf_version < 4
+              && (form == DW_FORM_data4 || form == DW_FORM_data8))
              || form == DW_FORM_sec_offset)
            {
              /* Process range list.  */
@@ -1734,8 +1734,8 @@ read_and_display_attr_value (unsigned long attribute,
     case DW_AT_GNU_call_site_data_value:
     case DW_AT_GNU_call_site_target:
     case DW_AT_GNU_call_site_target_clobbered:
-      if (form == DW_FORM_data4
-         || form == DW_FORM_data8
+      if ((dwarf_version < 4
+           && (form == DW_FORM_data4 || form == DW_FORM_data8))
          || form == DW_FORM_sec_offset)
        printf (_("(location list)"));
       /* Fall through.  */