summaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-05-10 06:18:47 +0000
committerJakub Jelinek <jakub@redhat.com>2012-05-10 06:18:47 +0000
commit739362dd44e892b2e71b6ce1ec10c624ca386677 (patch)
tree608943de754cdd9046b458871de9aae7aa65ad91 /binutils/dwarf.c
parentdbc22c2178c729411ed80f197769513e54c1c3af (diff)
downloadbinutils-redhat-739362dd44e892b2e71b6ce1ec10c624ca386677.tar.gz
* dwarf.c (read_and_display_attr_value): Don't look up tag from
abbrev for DW_FORM_ref_addr.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 856a851a43..5361396b8e 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -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 ("]");
}
}