diff options
Diffstat (limited to 'gdb/stack.c')
-rw-r--r-- | gdb/stack.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/gdb/stack.c b/gdb/stack.c index 6f08aae..297ba32 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -166,12 +166,10 @@ print_stack_frame (struct frame_info *frame, int print_level, TRY_CATCH (e, RETURN_MASK_ERROR) { - int center = (print_what == SRC_LINE || print_what == SRC_AND_LOC); - print_frame_info (frame, print_level, print_what, 1 /* print_args */, set_current_sal); if (set_current_sal) - set_current_sal_from_frame (frame, center); + set_current_sal_from_frame (frame); } } @@ -716,17 +714,13 @@ print_frame_args (struct symbol *func, struct frame_info *frame, line is in the center of the next 'list'. */ void -set_current_sal_from_frame (struct frame_info *frame, int center) +set_current_sal_from_frame (struct frame_info *frame) { struct symtab_and_line sal; find_frame_sal (frame, &sal); - if (sal.symtab) - { - if (center) - sal.line = max (sal.line - get_lines_to_list () / 2, 1); - set_current_source_symtab_and_line (&sal); - } + if (sal.symtab != NULL) + set_current_source_symtab_and_line (&sal); } /* If ON, GDB will display disassembly of the next source line when |