diff options
author | Pedro Alves <palves@redhat.com> | 2009-01-18 21:28:39 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2009-01-18 21:28:39 +0000 |
commit | aefc706471ace00a164b5a65717d5a0932d2eaf0 (patch) | |
tree | 74d4899e33a523638b1a8c190edad5d1687f7462 /gdb/tui/tui-winsource.c | |
parent | 29f49a6a4f3f165090de6c85fdb0f29dcb579ae7 (diff) | |
download | gdb-aefc706471ace00a164b5a65717d5a0932d2eaf0.zip gdb-aefc706471ace00a164b5a65717d5a0932d2eaf0.tar.gz gdb-aefc706471ace00a164b5a65717d5a0932d2eaf0.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/tui/tui-winsource.c')
-rw-r--r-- | gdb/tui/tui-winsource.c | 15 |
1 files changed, 9 insertions, 6 deletions
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; |