public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Rename tui_data_item_window -> tui_register_info
@ 2024-02-08 19:33 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-02-08 19:33 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6b32381343157132e2089ba13d50524b59da106e
commit 6b32381343157132e2089ba13d50524b59da106e
Author: Tom Tromey <tom@tromey.com>
Date: Sat Dec 16 19:42:37 2023 -0700
Rename tui_data_item_window -> tui_register_info
tui_data_item_window used to hold a curses window, but we removed that
ages ago. Now it just holds information about a single register.
This patch renames the class to make it more clearly reflect its
meaning.
Tested-By: Tom de Vries <tdevries@suse.de>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
Diff:
---
gdb/tui/tui-regs.c | 13 +++++--------
gdb/tui/tui-regs.h | 14 +++++++-------
2 files changed, 12 insertions(+), 15 deletions(-)
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index f7911b53bfb..bacb23ab298 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -105,15 +105,12 @@ tui_register_format (frame_info_ptr frame, int regnum)
the display. update 'content' and set 'highlight' if the contents
changed. */
void
-tui_data_item_window::update (const frame_info_ptr &frame)
+tui_register_info::update (const frame_info_ptr &frame)
{
if (target_has_registers ())
{
std::string new_content = tui_register_format (frame, m_regno);
-
- if (content != new_content)
- highlight = true;
-
+ highlight = content != new_content;
content = std::move (new_content);
}
}
@@ -229,7 +226,7 @@ tui_data_window::update_register_data (const reggroup *group,
{
/* The group did not change, so we can simply update each
item. */
- for (tui_data_item_window ® : m_regs_content)
+ for (tui_register_info ® : m_regs_content)
reg.update (frame);
}
}
@@ -443,7 +440,7 @@ tui_data_window::check_register_values (frame_info_ptr frame)
show_registers (m_current_group);
else
{
- for (tui_data_item_window &data_item_win : m_regs_content)
+ for (tui_register_info &data_item_win : m_regs_content)
{
bool was_hilighted = data_item_win.highlight;
@@ -462,7 +459,7 @@ tui_data_window::check_register_values (frame_info_ptr frame)
/* Display a register in a window. If hilite is TRUE, then the value
will be displayed in reverse video. */
void
-tui_data_item_window::rerender (WINDOW *handle, int field_width)
+tui_register_info::rerender (WINDOW *handle, int field_width)
{
/* In case the regs window is not boxed, we'll write the last char in the
last line here, causing a scroll, so prevent that. */
diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h
index c1f89a5c1a6..e7125e457f5 100644
--- a/gdb/tui/tui-regs.h
+++ b/gdb/tui/tui-regs.h
@@ -25,20 +25,20 @@
#include "tui/tui-data.h"
#include "reggroups.h"
-/* A data item window. */
+/* Information about the display of a single register. */
-struct tui_data_item_window
+struct tui_register_info
{
- tui_data_item_window (int regno, const frame_info_ptr &frame)
+ tui_register_info (int regno, const frame_info_ptr &frame)
: m_regno (regno)
{
update (frame);
highlight = false;
}
- DISABLE_COPY_AND_ASSIGN (tui_data_item_window);
+ DISABLE_COPY_AND_ASSIGN (tui_register_info);
- tui_data_item_window (tui_data_item_window &&) = default;
+ tui_register_info (tui_register_info &&) = default;
void update (const frame_info_ptr &frame);
@@ -136,8 +136,8 @@ private:
void erase_data_content (const char *prompt);
- /* Windows that are used to display registers. */
- std::vector<tui_data_item_window> m_regs_content;
+ /* Information about each register in the current register group. */
+ std::vector<tui_register_info> m_regs_content;
int m_regs_column_count = 0;
const reggroup *m_current_group = nullptr;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-08 19:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-08 19:33 [binutils-gdb] Rename tui_data_item_window -> tui_register_info Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).