From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KbyILrK39GnsKgkAWB0awg (envelope-from ) for ; Fri, 01 May 2026 10:24:50 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UKYvvKCt; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B954F1E067; Fri, 01 May 2026 10:24:50 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 462DA1E067 for ; Fri, 01 May 2026 10:24:50 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D55C143B5524 for ; Fri, 1 May 2026 14:24:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D55C143B5524 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UKYvvKCt Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 7FAC3437420F for ; Fri, 1 May 2026 14:23:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7FAC3437420F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7FAC3437420F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777645387; cv=none; b=ANf89O4rXohlYoBAXfSsRT6OK3DrauB6kBrFFXx7MFUhlMyitBLto2O/dmu4W9j+C/XnB+E4nQK4bTB6h2Sn4OnG72SJ1EIoog4oAIjnkmY8E8L4mgPNyYurhYVVgDpTwS88CC1+hpk6lqNGQNe8Ly8+I8dP7eq38fJNAP3ysSQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777645387; c=relaxed/simple; bh=iJ2dAvM7JhiWLAh2gGbLFWGdpINKeZDzp/TNOvV0wWM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=QmEprOWQfVhzCadAzzGALn1Z+WPYfrNi6es4w6wTp10ROL31a7vGHxm1TNdTuAkhc8qJCcVo+OqHc9BGQtsyy40x+BWPfiKXX/P+Z8xeYk4yu12QIqJinVK28fdAKd0H18SyykGeALvqm7nlycwbMWDUXv4rtejlq8HQ+/PWTOU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7FAC3437420F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777645387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sSQcOgBoEdE6GviMa/C6Izwa6GB7FvduIzDspa8aQh0=; b=UKYvvKCthUM1naK5MbQ50SX8t2bV8PA3fg9Lmm1Aof/RsNW14gCXONjw91C/chKVUpynvF ue2pqvzsez+32qtYzKu9fY172SAq8iOLDCZnRntpP2grVAu2rWU1SZGCuIhGEYffuOPIBT RqjfTsOxNTDU38T/3JJ+NDWykRIP1JY= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-632-nEp7UF1sNJWhzCTQNrifTA-1; Fri, 01 May 2026 10:23:06 -0400 X-MC-Unique: nEp7UF1sNJWhzCTQNrifTA-1 X-Mimecast-MFC-AGG-ID: nEp7UF1sNJWhzCTQNrifTA_1777645385 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-488d56f87e8so15263085e9.0 for ; Fri, 01 May 2026 07:23:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777645384; x=1778250184; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sSQcOgBoEdE6GviMa/C6Izwa6GB7FvduIzDspa8aQh0=; b=kWkChhVW0GLEwmLSOykN44+X3NyNvFNzRxYQeAzV2/L/ITeUrpLkMusWnzH0EAdYiH OlW+Dukwsw1aiEH5GNp+ArX8V4kZnOHGILK+q4caFehE5li7HVlv/P/CGu2RRGSngOv8 Ky3nMV5rZddtSJeJZ1PhWo/ekKjcJLAt7+bNgoxyhdDacAvjEeW9Lei/BlcB8rowF4al 793iRmLvdnpGIP6KyFYFcFwf96D6P3bAy72l/77Uk8+J9acP/TQGHFyrl3CYYME/RMBt oLQnzYD5kP7oTRoUhomGV02uNsjLgJfA/9Ps+afNtZDEvoHYdgVu513n4dPdRFDYNjTz I9kg== X-Gm-Message-State: AOJu0Yw4ohUBvFjkXjoYtxuQYX1iCp/OKFjcwJ8zWH16SscrP3zkTHa3 rIUoNjmyzaUBJYTVzkSxKGTDZMm9ZxMM2gwTp1ejZDcw+rLXmvQI1WSLmVEdiAM9fHjf9B2VxwT 1fM8tOXuA7nVNTZe6y73KO/5X5j5vIzBi9x+f4ew7FPPmUF9pE0xdeAka/C2Dk1l/TdC2GSJioK Q2qdYFsgoRxEYwhJt2ZBC0aHQpMlx5HYuu8hFKI+kG735695o= X-Gm-Gg: AeBDieu9EILOXg2EqYSHPR23LAXRvKB/NbSpWAwtSnWPd6szRYKCy4iygnUMt+eF1yq 8E8F3InKrMF0VnB11uRgCzD60V+0W5o3vRp1cVxH4WMCVjpHKjalU9mCciP8vTegLfxe9TV44uL 5KTS62JyREy/Sx6bdgczgOFDTrGeeB5HS1KS2dmicEBe1D3s0ayfgwuxAipGnDNg2P4n/Dxq9D/ BPE52e2l/aRKAytOd/+PDVUvAdubHK3nBCxxz++t0WFyUV7tHfsK3ubRqvirSt4yN9zbpQ0SpfL k56Nhbh5xRCqkT2hrSF0s+ZKGX0SPiTeLGhXorqxpX1MfwlDRjG60B3t0d0MmW5egtbG1z4sEH/ aJGaAt46D8jvecC5O8U1s4268Qj0= X-Received: by 2002:a05:600c:4f47:b0:485:3cf3:1010 with SMTP id 5b1f17b1804b1-48a8eb61e38mr50680365e9.2.1777645384406; Fri, 01 May 2026 07:23:04 -0700 (PDT) X-Received: by 2002:a05:600c:4f47:b0:485:3cf3:1010 with SMTP id 5b1f17b1804b1-48a8eb61e38mr50679255e9.2.1777645383257; Fri, 01 May 2026 07:23:03 -0700 (PDT) Received: from localhost ([31.111.84.232]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a82307f7csm143423005e9.12.2026.05.01.07.23.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2026 07:23:02 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 4/6] gdb/tui: make tui_win_info::rerender public Date: Fri, 1 May 2026 15:22:54 +0100 Message-Id: <9cfa1d4ec2bd3f794ffb4f01adbb72b7b623e6a1.1777645161.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oXM5nTR8hS8Wzz_F8W6TQiGQD1-C8gFpEVc3UJ-Owfk_1777645385 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org 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..155d9dd4e0c 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 d4b25cbf9cd..5becb2fd715 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