From 48a6ff087f48c3e79309d2385dccb9c7268ea22b Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 4 Oct 2011 14:25:39 +0000 Subject: binutils/ 2011-10-04 Paul Woegerer Carlos O'Donell * dwarf.c (display_debug_lines_decoded): Index directory_table with directory_index from file_table entry. binutils/testsuite/ 2011-10-04 Carlos O'Donell * 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. --- binutils/dwarf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'binutils/dwarf.c') 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); -- cgit v1.2.1