[binutils-gdb] gdb/tui: make tui_win_info::rerender public
Andrew Burgess via Gdb-cvs <[email protected]> Mon, 27 Jul 2026 13:49:03 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5730d2aea881= 4ddf76666878565b3748e250033f commit 5730d2aea8814ddf76666878565b3748e250033f Author: Andrew Burgess <[email protected]> Date: Wed Apr 29 19:19:59 2026 +0100 gdb/tui: make tui_win_info::rerender public =20 In the next commit I'm going to want to call rerender from outside the tui_win_info class, so let's make it public. =20 This is just a refactor, there should be no user-visible changes after this commit. Diff: --- gdb/tui/tui-data.h | 12 +++++++----- gdb/tui/tui-regs.h | 4 ++-- gdb/tui/tui-winsource.h | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index ec3cf63a286..cbe451ae86c 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -44,10 +44,6 @@ protected: tui_win_info () =3D default; DISABLE_COPY_AND_ASSIGN (tui_win_info); =20 - /* This is called after the window is resized, and should update the - window's contents. */ - virtual void rerender (); - /* Create the curses window. */ void make_window (); =20 @@ -55,7 +51,13 @@ public: tui_win_info (tui_win_info &&) =3D default; virtual ~tui_win_info () =3D default; =20 - /* Call to refresh this window. */ + /* Call to update the in-memory contents of this window. Does not + cause the contents to be drawn to the screen. */ + virtual void rerender (); + + /* Call to refresh this window on the screen. The in-memory contents of + the window are not updated by this call; whatever the current contents + are, they are drawn to the screen. */ virtual void refresh_window (); =20 /* Make this window visible or invisible. */ diff --git a/gdb/tui/tui-regs.h b/gdb/tui/tui-regs.h index ec056e1a042..2ed4614976f 100644 --- a/gdb/tui/tui-regs.h +++ b/gdb/tui/tui-regs.h @@ -90,6 +90,8 @@ struct tui_data_window : public tui_win_info return m_current_group; } =20 + void rerender () override; + protected: =20 void do_scroll_vertical (int num_to_scroll) override; @@ -97,8 +99,6 @@ protected: { } =20 - void rerender () override; - private: =20 /* Display the registers in the content from 'start_element_no' diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 3e6ad110d28..533b159be9b 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -103,8 +103,6 @@ protected: /* Erase the content and display STRING. */ void do_erase_source_content (const char *string); =20 - void rerender () override; - virtual bool set_contents (struct gdbarch *gdbarch, const struct symtab_and_line &sal) =3D 0; =20 @@ -138,6 +136,8 @@ protected: =20 public: =20 + void rerender () override; + /* Refill the source window's source cache and update it. If this is a disassembly window, then just update it. */ void refill ();