aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-disasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tui-disasm.c')
-rw-r--r--gdb/tui/tui-disasm.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index cd82853..627f71c 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -1,6 +1,6 @@
/* Disassembly display.
- Copyright (C) 1998-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998-2025 Free Software Foundation, Inc.
Contributed by Hewlett-Packard Company.
@@ -98,7 +98,7 @@ tui_disassemble (struct gdbarch *gdbarch,
CORE_ADDR pc, int count,
size_t *addr_size = nullptr)
{
- bool term_out = source_styling && gdb_stdout->can_emit_style_escape ();
+ bool term_out = disassembler_styling && gdb_stdout->can_emit_style_escape ();
string_file gdb_dis_out (term_out);
/* Must start with an empty list. */
@@ -485,12 +485,10 @@ tui_disasm_window::addr_is_displayed (CORE_ADDR addr) const
}
void
-tui_disasm_window::maybe_update (const frame_info_ptr &fi, symtab_and_line sal)
+tui_disasm_window::maybe_update (struct gdbarch *gdbarch, symtab_and_line sal)
{
CORE_ADDR low;
- struct gdbarch *frame_arch = get_frame_arch (fi);
-
if (find_pc_partial_function (sal.pc, NULL, &low, NULL) == 0)
{
/* There is no symbol available for current PC. There is no
@@ -498,7 +496,7 @@ tui_disasm_window::maybe_update (const frame_info_ptr &fi, symtab_and_line sal)
low = sal.pc;
}
else
- low = tui_get_low_disassembly_address (frame_arch, low, sal.pc);
+ low = tui_get_low_disassembly_address (gdbarch, low, sal.pc);
struct tui_line_or_address a;
@@ -507,7 +505,7 @@ tui_disasm_window::maybe_update (const frame_info_ptr &fi, symtab_and_line sal)
if (!addr_is_displayed (sal.pc))
{
sal.pc = low;
- update_source_window (frame_arch, sal);
+ update_source_window (gdbarch, sal);
}
else
{
@@ -548,9 +546,7 @@ run_tests ()
} /* namespace selftests */
#endif /* GDB_SELF_TEST */
-void _initialize_tui_disasm ();
-void
-_initialize_tui_disasm ()
+INIT_GDB_FILE (tui_disasm)
{
#if GDB_SELF_TEST
selftests::register_test ("tui-disasm", selftests::tui::disasm::run_tests);