* dwarf.c (read_and_display_attr_value): Don't look up tag from
authorJakub Jelinek <jakub@redhat.com>
Thu, 10 May 2012 06:18:48 +0000 (06:18 +0000)
committerJakub Jelinek <jakub@redhat.com>
Thu, 10 May 2012 06:18:48 +0000 (06:18 +0000)
abbrev for DW_FORM_ref_addr.

binutils/ChangeLog
binutils/dwarf.c

index 6fad5075156003430025b88342dc941c90b16be5..c5b85c065c08a7da6d8dbcbd1887aedb371ab611 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-10  Jakub Jelinek  <jakub@redhat.com>
+
+       * dwarf.c (read_and_display_attr_value): Don't look up tag from
+       abbrev for DW_FORM_ref_addr.
+
 2012-05-08  Sean Keys  <skeys@ipdatasys.com>
        
        * binutils/MAINTAINERS: Added my entry to the maintainers secion.
index 856a851a4379f6ca0e1b285c251ddb7cbe58675a..5361396b8efb87f451d230aadec838e38f0355c2 100644 (file)
@@ -1716,11 +1716,17 @@ read_and_display_attr_value (unsigned long attribute,
            abbrev_number = read_leb128 (section->start + uvalue, NULL, 0);
 
            printf (_("[Abbrev Number: %ld"), abbrev_number);
-           for (entry = first_abbrev; entry != NULL; entry = entry->next)
-             if (entry->entry == abbrev_number)
-               break;
-           if (entry != NULL)
-             printf (" (%s)", get_TAG_name (entry->tag));
+           /* Don't look up abbrev for DW_FORM_ref_addr, as it very often will
+              use different abbrev table, and we don't track .debug_info chunks
+              yet.  */
+           if (form != DW_FORM_ref_addr)
+             {
+               for (entry = first_abbrev; entry != NULL; entry = entry->next)
+                 if (entry->entry == abbrev_number)
+                   break;
+               if (entry != NULL)
+                 printf (" (%s)", get_TAG_name (entry->tag));
+             }
            printf ("]");
          }
       }