aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
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 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);