aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-status.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tui-status.c')
-rw-r--r--gdb/tui/tui-status.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/tui/tui-status.c b/gdb/tui/tui-status.c
index fa2d07c..1e09975 100644
--- a/gdb/tui/tui-status.c
+++ b/gdb/tui/tui-status.c
@@ -1,6 +1,6 @@
/* TUI status line.
- Copyright (C) 1998-2024 Free Software Foundation, Inc.
+ Copyright (C) 1998-2025 Free Software Foundation, Inc.
Contributed by Hewlett-Packard Company.
@@ -271,10 +271,14 @@ tui_show_frame_info (const frame_info_ptr &fi)
symtab_and_line sal = find_frame_sal (fi);
const char *func_name;
+ std::optional<CORE_ADDR> tmp_pc = get_frame_pc_if_available (fi);
/* find_frame_sal does not always set PC, but we want to ensure
that it is available in the SAL. */
- if (get_frame_pc_if_available (fi, &sal.pc))
- func_name = tui_get_function_from_frame (fi);
+ if (tmp_pc.has_value ())
+ {
+ sal.pc = *tmp_pc;
+ func_name = tui_get_function_from_frame (fi);
+ }
else
func_name = _("<unavailable>");
@@ -325,9 +329,7 @@ tui_update_command (const char *arg, int from_tty)
/* Function to initialize gdb commands, for tui window stack
manipulation. */
-void _initialize_tui_stack ();
-void
-_initialize_tui_stack ()
+INIT_GDB_FILE (tui_stack)
{
add_com ("update", class_tui, tui_update_command,
_("\