summaryrefslogtreecommitdiff
path: root/gdb/macrocmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/macrocmd.c')
-rw-r--r--gdb/macrocmd.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 9e4b0838901..250a1f0642b 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -129,13 +129,18 @@ show_pp_source_pos (struct ui_file *stream,
struct macro_source_file *file,
int line)
{
- fprintf_filtered (stream, "%s:%d\n", file->filename, line);
+ char *fullname;
+
+ fullname = macro_source_fullname (file);
+ fprintf_filtered (stream, "%s:%d\n", fullname, line);
+ xfree (fullname);
while (file->included_by)
{
- fprintf_filtered (gdb_stdout, " included at %s:%d\n",
- file->included_by->filename,
+ fullname = macro_source_fullname (file->included_by);
+ fprintf_filtered (gdb_stdout, " included at %s:%d\n", fullname,
file->included_at_line);
+ xfree (fullname);
file = file->included_by;
}
}