summaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@codesourcery.com>2011-10-04 14:25:39 +0000
committerCarlos O'Donell <carlos@codesourcery.com>2011-10-04 14:25:39 +0000
commit48a6ff087f48c3e79309d2385dccb9c7268ea22b (patch)
treed4a3240567eaa41b24814eddd6465b07b967437d /binutils/dwarf.c
parentb163e3acd2407d2b66161fe7e412398582c5b878 (diff)
downloadbinutils-redhat-48a6ff087f48c3e79309d2385dccb9c7268ea22b.tar.gz
binutils/
2011-10-04 Paul Woegerer <paul_woegerer@mentor.com> Carlos O'Donell <carlos@codesourcery.com> * dwarf.c (display_debug_lines_decoded): Index directory_table with directory_index from file_table entry. binutils/testsuite/ 2011-10-04 Carlos O'Donell <carlos@codesourcery.com> * binutils-all/dw2-decodedline.S: New file. * binutils-all/objdump.WL: New file. * binutils-all/objdump.exp: Update copyright year. New test case for -WL.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 1ee0e336c1..f4b7f7310c 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2961,9 +2961,10 @@ display_debug_lines_decoded (struct dwarf_section *section,
}
else
{
- if (do_wide || strlen ((char *) directory_table[0]) < 76)
- printf (_("CU: %s/%s:\n"), directory_table[0],
- file_table[0].name);
+ unsigned int ix = file_table[0].directory_index;
+ const char *directory = ix ? (char *)directory_table[ix - 1] : ".";
+ if (do_wide || strlen (directory) < 76)
+ printf (_("CU: %s/%s:\n"), directory, file_table[0].name);
else
printf ("%s:\n", file_table[0].name);