From aefc706471ace00a164b5a65717d5a0932d2eaf0 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sun, 18 Jan 2009 21:28:39 +0000 Subject: * tui/tui-disasm.c (tui_vertical_disassem_scroll): Scroll one line at a time, times NUM_TO_SCROLL. * tui/tui-winsource.c (tui_horizontal_source_scroll): Don't try to fetch the selected frame if there is no stack. --- gdb/tui/tui-winsource.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gdb/tui/tui-winsource.c') diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c index b93c2c9..158aa89 100644 --- a/gdb/tui/tui-winsource.c +++ b/gdb/tui/tui-winsource.c @@ -312,13 +312,16 @@ tui_horizontal_source_scroll (struct tui_win_info *win_info, if (win_info->generic.content != NULL) { int offset; - struct symtab *s; - struct symtab_and_line cursal = get_current_source_symtab_and_line (); + struct symtab *s = NULL; - if (cursal.symtab == (struct symtab *) NULL) - s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL))); - else - s = cursal.symtab; + if (win_info->generic.type == SRC_WIN) + { + struct symtab_and_line cursal = get_current_source_symtab_and_line (); + if (cursal.symtab == NULL) + s = find_pc_symtab (get_frame_pc (get_selected_frame (NULL))); + else + s = cursal.symtab; + } if (direction == LEFT_SCROLL) offset = win_info->detail.source_info.horizontal_offset + num_to_scroll; -- cgit v1.1