diff options
author | Carlos O'Donell <carlos@codesourcery.com> | 2011-10-04 14:25:40 +0000 |
---|---|---|
committer | Carlos O'Donell <carlos@codesourcery.com> | 2011-10-04 14:25:40 +0000 |
commit | 4eee63bce83d1df7e6b6fa1a3c52b2db80a7529d (patch) | |
tree | c0506e91d9c291a7f37ac7320c15c0eb86178b04 /binutils/dwarf.c | |
parent | cb6be26b8b0a1bf6bb4da1eb5841119d73220fd5 (diff) | |
download | gdb-4eee63bce83d1df7e6b6fa1a3c52b2db80a7529d.zip gdb-4eee63bce83d1df7e6b6fa1a3c52b2db80a7529d.tar.gz gdb-4eee63bce83d1df7e6b6fa1a3c52b2db80a7529d.tar.bz2 |
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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 1ee0e33..f4b7f73 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); |