aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-regs.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-05-30 15:51:40 -0400
committerSimon Marchi <simon.marchi@efficios.com>2024-05-30 16:05:56 -0400
commit4a7d71687676a1c36326e71f0a783fccb8748127 (patch)
treec0b009bd0695a14c0bb5a170e59ecaef72cd0bbe /gdb/tui/tui-regs.c
parente2fbb7149660e6f3318ea768dee7adb340a166f0 (diff)
downloadfsf-binutils-gdb-4a7d71687676a1c36326e71f0a783fccb8748127.zip
fsf-binutils-gdb-4a7d71687676a1c36326e71f0a783fccb8748127.tar.gz
fsf-binutils-gdb-4a7d71687676a1c36326e71f0a783fccb8748127.tar.bz2
gdb/tui: change some macros to functions
Change the `TUI_*` macros to access known windows to functions. Define them in their respective files, because trying to define them in tui-data.h would end up causing include cycles. Change-Id: I1e38cee843984c48ab34030b19dac0d726f851af
Diffstat (limited to 'gdb/tui/tui-regs.c')
-rw-r--r--gdb/tui/tui-regs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 8db2691..50708fd 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -515,11 +515,11 @@ tui_reg_command (const char *args, int from_tty)
/* Make sure the register window is visible. If not, select an
appropriate layout. We need to do this before trying to run the
'next' or 'prev' commands. */
- if (TUI_DATA_WIN == NULL || !TUI_DATA_WIN->is_visible ())
+ if (tui_data_win () == nullptr || !tui_data_win ()->is_visible ())
tui_regs_layout ();
const reggroup *match = nullptr;
- const reggroup *current_group = TUI_DATA_WIN->get_current_group ();
+ const reggroup *current_group = tui_data_win ()->get_current_group ();
if (strncmp (args, "next", len) == 0)
match = tui_reg_next (current_group, gdbarch);
else if (strncmp (args, "prev", len) == 0)
@@ -543,7 +543,7 @@ tui_reg_command (const char *args, int from_tty)
if (match == NULL)
error (_("unknown register group '%s'"), args);
- TUI_DATA_WIN->set_register_group (match);
+ tui_data_win ()->set_register_group (match);
}
else
{