/* Disassembly display.
- Copyright (C) 1998-2017 Free Software Foundation, Inc.
+ Copyright (C) 1998-2019 Free Software Foundation, Inc.
Contributed by Hewlett-Packard Company.
{
enum tui_status ret = TUI_FAILURE;
int i;
- int offset = TUI_DISASM_WIN->detail.source_info.horizontal_offset;
+ int offset = TUI_DISASM_WIN->horizontal_offset;
int max_lines, line_width;
CORE_ADDR cur_pc;
struct tui_gen_win_info *locator = tui_locator_win_info_ptr ();
- int tab_len = tui_default_tab_len ();
+ int tab_len = tui_tab_width;
struct tui_asm_line *asm_lines;
int insn_pos;
int addr_size, insn_size;
if (ret != TUI_SUCCESS)
return ret;
- TUI_DISASM_WIN->detail.source_info.gdbarch = gdbarch;
- TUI_DISASM_WIN->detail.source_info.start_line_or_addr.loa = LOA_ADDRESS;
- TUI_DISASM_WIN->detail.source_info.start_line_or_addr.u.addr = pc;
+ tui_source_window_base *base = TUI_DISASM_WIN;
+ base->gdbarch = gdbarch;
+ base->start_line_or_addr.loa = LOA_ADDRESS;
+ base->start_line_or_addr.u.addr = pc;
cur_pc = locator->content[0]->which_element.locator.addr;
/* Window size, excluding highlight box. */
tui_update_source_window (TUI_SRC_WIN, gdbarch, sal.symtab, val, TRUE);
if (sal.symtab)
{
- set_current_source_symtab_and_line (&sal);
+ set_current_source_symtab_and_line (sal);
tui_update_locator_fullname (symtab_to_fullname (sal.symtab));
}
else
/* Scroll the disassembly forward or backward vertically. */
void
-tui_vertical_disassem_scroll (enum tui_scroll_direction scroll_direction,
- int num_to_scroll)
+tui_disasm_window::do_scroll_vertical
+ (enum tui_scroll_direction scroll_direction, int num_to_scroll)
{
- if (TUI_DISASM_WIN->generic.content != NULL)
+ if (generic.content != NULL)
{
- struct gdbarch *gdbarch = TUI_DISASM_WIN->detail.source_info.gdbarch;
CORE_ADDR pc;
tui_win_content content;
struct tui_line_or_address val;
int dir;
- content = (tui_win_content) TUI_DISASM_WIN->generic.content;
+ content = generic.content;
pc = content[0]->which_element.source.line_or_addr.u.addr;
num_to_scroll++;
val.loa = LOA_ADDRESS;
val.u.addr = tui_find_disassembly_address (gdbarch, pc, dir);
- tui_update_source_window_as_is (TUI_DISASM_WIN, gdbarch,
+ tui_update_source_window_as_is (this, gdbarch,
NULL, val, FALSE);
}
}