Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: gdb-patches@sourceware.org
Cc: Andrew Burgess <aburgess@redhat.com>
Subject: [PATCHv2 4/6] gdb/tui: make tui_win_info::rerender public
Date: Fri, 10 Jul 2026 10:47:16 +0100	[thread overview]
Message-ID: <28fa2689e29e740b35ce9fcc65c364de2fe0b24e.1783676703.git.aburgess@redhat.com> (raw)
In-Reply-To: <cover.1783676703.git.aburgess@redhat.com>

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.

This is just a refactor, there should be no user-visible changes after
this commit.
---
 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 @@ struct tui_win_info
   tui_win_info () = default;
   DISABLE_COPY_AND_ASSIGN (tui_win_info);
 
-  /* 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 ();
 
@@ -55,7 +51,13 @@ struct tui_win_info
   tui_win_info (tui_win_info &&) = default;
   virtual ~tui_win_info () = default;
 
-  /* 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 ();
 
   /* 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;
   }
 
+  void rerender () override;
+
 protected:
 
   void do_scroll_vertical (int num_to_scroll) override;
@@ -97,8 +99,6 @@ struct tui_data_window : public tui_win_info
   {
   }
 
-  void rerender () override;
-
 private:
 
   /* 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 9f94a453749..2353f04915a 100644
--- a/gdb/tui/tui-winsource.h
+++ b/gdb/tui/tui-winsource.h
@@ -103,8 +103,6 @@ struct tui_source_window_base : public tui_win_info
   /* Erase the content and display STRING.  */
   void do_erase_source_content (const char *string);
 
-  void rerender () override;
-
   virtual bool set_contents (struct gdbarch *gdbarch,
 			     const struct symtab_and_line &sal) = 0;
 
@@ -138,6 +136,8 @@ struct tui_source_window_base : public tui_win_info
 
 public:
 
+  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 ();
-- 
2.25.4


  parent reply	other threads:[~2026-07-10  9:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01 14:22 [PATCH 0/6] gdb/tui: fix debuginfod related crash Andrew Burgess
2026-05-01 14:22 ` [PATCH 1/6] gdb/tui: convert a window handle `if` into an `assert` Andrew Burgess
2026-05-01 14:22 ` [PATCH 2/6] gdb/testsuite: fix tuiterm linefeed scrolling new line content Andrew Burgess
2026-05-01 14:22 ` [PATCH 3/6] gdb/tui: prevent TUI activation from a secondary prompt Andrew Burgess
2026-05-01 14:22 ` [PATCH 4/6] gdb/tui: make tui_win_info::rerender public Andrew Burgess
2026-05-01 14:22 ` [PATCH 5/6] gdb/tui: fix for debuginfod prompt while enabling the TUI Andrew Burgess
2026-05-01 14:22 ` [PATCH 6/6] gdb/tui: fix debuginfod prompt using 'C-x C-a' to enter TUI Andrew Burgess
2026-07-10  9:47 ` [PATCHv2 0/6] gdb/tui: fix debuginfod related crash Andrew Burgess
2026-07-10  9:47   ` [PATCHv2 1/6] gdb/tui: convert a window handle `if` into an `assert` Andrew Burgess
2026-07-10  9:47   ` [PATCHv2 2/6] gdb/testsuite: fix tuiterm linefeed scrolling new line content Andrew Burgess
2026-07-10  9:47   ` [PATCHv2 3/6] gdb/tui: prevent TUI activation from a secondary prompt Andrew Burgess
2026-07-10  9:47   ` Andrew Burgess [this message]
2026-07-10  9:47   ` [PATCHv2 5/6] gdb/tui: fix for debuginfod prompt while enabling the TUI Andrew Burgess
2026-07-10  9:47   ` [PATCHv2 6/6] gdb/tui: fix debuginfod prompt using 'C-x C-a' to enter TUI Andrew Burgess
2026-07-27 15:50   ` [PATCHv2 0/6] gdb/tui: fix debuginfod related crash Andrew Burgess

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28fa2689e29e740b35ce9fcc65c364de2fe0b24e.1783676703.git.aburgess@redhat.com \
    --to=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox