aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 4f41531..83fd26e 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -434,7 +434,9 @@ print_frame_info_base (struct frame_info *fi, int level, int source, int args)
print_source_lines (sal.symtab, sal.line, sal.line + 1, 0);
}
}
- cursal = get_current_or_default_source_symtab_and_line ();
+ /* Make sure we have at least a default source file */
+ set_default_source_symtab_and_line ();
+ cursal = get_current_source_symtab_and_line ();
cursal.line = max (sal.line - get_lines_to_list () / 2, 1);
set_current_source_symtab_and_line (&cursal);
}