From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WRIoBOe/UGqRkAEAWB0awg (envelope-from ) for ; Fri, 10 Jul 2026 05:48:23 -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=ciOswLKR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0697D1E0A3; Fri, 10 Jul 2026 05:48:23 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 16FD51E070 for ; Fri, 10 Jul 2026 05:48:22 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BE1324BA2E37 for ; Fri, 10 Jul 2026 09:48:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE1324BA2E37 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=ciOswLKR 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 F24224BA2E26 for ; Fri, 10 Jul 2026 09:47:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F24224BA2E26 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 F24224BA2E26 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783676851; cv=none; b=SV+FlUSRDso4rrqDKGvJyIYM4Wy8b0jlYzHfA2p38dXMm1YVj+b3xkDTfi9rSxlOj1HOTxMUgjbEiPI6HqIexQoKBPV9rsOd5CGu+NniNoLHS7r0uWHj+wfaIfC1OYG13T1X+USeiXVxeTSf8FRGs7WNyeUTaktqMSZgfG5gXMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783676851; c=relaxed/simple; bh=E4Ikr6IUvgBYZmpPZ3wCE97uv9yMzMS81V5QpXiNrmc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=dUDLGR+q8q/wMCbzpmdBqv2OcWJz9qiBuYgstAdkmIFD8vIeqWALgywK8nfoDo3rsXJH+Ta4BqxmSzXJkV6/FcIXkNeH6BlnQvHODT0UrE90mDGR44VqkQBNSSSXvool/bRn/rtRnIcF9vCa6qvMHNMWScqnPClLn6J52D1g36w= ARC-Authentication-Results: i=1; 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=ciOswLKR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F24224BA2E26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783676850; 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=+bsR9+157zFwjJ3a78qjwij4n9IOLrgk66TGSLozc/k=; b=ciOswLKRspihISP/9xB5yEKh4SWFxyXtf229R/6Z84snSCDdKYrYJYB3fy9WkQMSau0la/ K/6VBgKT6hBppYnrup6EFobFeeYb51sPBHieoFXbcu3KBIphpEHszsv9wrVOAWfogweMhy qNkqHusTV9y7KC6bs3424z6kpIbJBcE= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-224-IEJwb8xGP1qcZSZOs5OLgg-1; Fri, 10 Jul 2026 05:47:29 -0400 X-MC-Unique: IEJwb8xGP1qcZSZOs5OLgg-1 X-Mimecast-MFC-AGG-ID: IEJwb8xGP1qcZSZOs5OLgg_1783676848 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-493dc8408fdso6085245e9.1 for ; Fri, 10 Jul 2026 02:47:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783676848; x=1784281648; 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:content-type; bh=+bsR9+157zFwjJ3a78qjwij4n9IOLrgk66TGSLozc/k=; b=Qrpz7rqWJ5yG2xh4UT83xLxqJRSP22cF3/TX7Pglfvy7RycyvivwDvHitdN0/21qTI 6ZwDWm5R8JCVo60ITRzvQoaOlAnBXuOd3+VnScS88GciIx6/lGjVNgHQXUodcSvUEV+n 7sQ7qms7fiBGSOLCaQ+54Ued7pNFuyU6vX/P7exbS8ggKAYl7ILKtgcs5vkbj/6RQsAO DEECh+ZzzVptbrJeN1HL4u1j4kBDc6f/gtY6QETngazutLUUl8edWCdJSGSScx7fbP8V ps4g8djR3qwS1o7eX0VXs8Jz3kXcsby1K2kOJW1v1P7FB7/RjigN9rCkTwSmHEDGtBop +OOQ== X-Gm-Message-State: AOJu0YxK+1pYSTgFI81uip/9jIOhpO1DXpr2UQNBh0SmR2gABzVDfA1Z cX9I+cKz23fgbCTFFVT7HBGl3WTCHEQ5u3ahXPcx5DyGcOPWEIZyLqnGsgVa3FRnVtYhXQv0u7p vge2v3/aFlYpOsoH20+SGUXnHYAV3Lt39kJqVodoi1cxLBqybk3npz7ZoCmuKHVgxVfk+06teQX IcMWppnYlR64hk9pg44Biw5KP8k2OzJNP1IULYcKy/R4PTeGc= X-Gm-Gg: AfdE7ckJPg/i+JcjTOYS2FdYqxkam9/rGy/obYx0EPstMZhe9LRw0TqrepIqpo+peui /YM9FDX2xk9QbShedZ7JJWDuJKTGZMI+jExIx82Xjw1yaRRn9sADvCpNCDyNrm4GbI1/HBkUk+J soQ1Ao8nn26Q2nFZVAAK2Glk5iNoE0q79q1jFI6Mv6ws1ZttSYQavasYzC7rEwSFc9P9rM5V1fr i1LzCMyxshTH0LIXch8Cl55iHNaNPaZ3mtL/TH7kZv1kWZMHjxgOXDuULL1QXWsjqSRmNrts7Jw Y0QWB9KCJ3SnwssnF7Y38KTc7qjUAWz64Ru+HJBlBYZ2Le5lsd8BcPvX7gA90wzyrsesRrBLDul Umoap1A0= X-Received: by 2002:a05:600c:6c55:b0:493:a7bc:5bcf with SMTP id 5b1f17b1804b1-493e68ddc7bmr78291955e9.24.1783676847938; Fri, 10 Jul 2026 02:47:27 -0700 (PDT) X-Received: by 2002:a05:600c:6c55:b0:493:a7bc:5bcf with SMTP id 5b1f17b1804b1-493e68ddc7bmr78291685e9.24.1783676847425; Fri, 10 Jul 2026 02:47:27 -0700 (PDT) Received: from localhost ([31.111.209.233]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-493f2c8de2asm45652935e9.1.2026.07.10.02.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jul 2026 02:47:26 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 4/6] gdb/tui: make tui_win_info::rerender public Date: Fri, 10 Jul 2026 10:47:16 +0100 Message-Id: <28fa2689e29e740b35ce9fcc65c364de2fe0b24e.1783676703.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: 36lQKsP8YLBVj_pgf4097WOiTKefbKZ_d7NwsKri5aA_1783676848 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..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