Message ID | 20240120-tui-regs-cleanup-v2-0-a3cccc6a3573@tromey.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A2E1A38582AE for <patchwork@sourceware.org>; Sat, 20 Jan 2024 18:23:55 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from omta040.useast.a.cloudfilter.net (omta040.useast.a.cloudfilter.net [44.202.169.39]) by sourceware.org (Postfix) with ESMTPS id 5AE743858C56 for <gdb-patches@sourceware.org>; Sat, 20 Jan 2024 18:23:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5AE743858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 5AE743858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.39 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705775000; cv=none; b=c8wFiJsOK0GL9YXqy0b1CIvVqcqoK1nhZ/8RZPJR3u+dIiuMRgznw2shIPQ2ROuiGCNOJVfPrYqU4woFap7MqOYOb7S8Y6oc1ij2f5zu+9E9v9MuJt04nXpfYIk7kDaILaswbLBpU0z4Cu4XLAkDUHPVSYMlG3dgOUzEUjLOwgE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705775000; c=relaxed/simple; bh=bw5KTvChSUZcjDfb8YmPpXghkwqMu64luVOF+0JbZZc=; h=DKIM-Signature:From:Subject:Date:Message-Id:MIME-Version:To; b=DODkdVHuC5C89DtCa1PRUzlSoyVUAqdPLQCjEZe9xE1O9IWs0u7Pv3bWDNGqvT4mHa3T4Gm1eCMwuTDdEVpDEteHW7K+KzkCcqu1zNC4fi5jz15YBbCTGvEvfmjuUG1ORlXibhRYS7UQb82xFVuLd6OPjBWcyKTbs4lCCgIaiow= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from eig-obgw-5002a.ext.cloudfilter.net ([10.0.29.215]) by cmsmtp with ESMTPS id R8wPrcEBnTHHuRFzzrPtv7; Sat, 20 Jan 2024 18:23:19 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id RFzxrk8qBBnVCRFzyrRzuV; Sat, 20 Jan 2024 18:23:18 +0000 X-Authority-Analysis: v=2.4 cv=H+TIfsUi c=1 sm=1 tr=0 ts=65ac0f96 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=dEuoMetlWLkA:10 a=Qbun_eYptAEA:10 a=CCpqsmhAAAAA:8 a=zstS-IiYAAAA:8 a=6gJW12aP79J9UKaOhjsA:9 a=QEXdDO2ut3YA:10 a=ul9cdbp4aOFLsgKbc677:22 a=4G6NA9xxw8l3yy4pmD5M:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-Id:Date:Subject:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tERbVMqNlmycqYBXK5/UkeRz2sVGDUnylj4OCo8l0CY=; b=yHuKVJE7mlxaNBcd8epWT26xpp 15SkKrrj9QgkZutzrAPqngZk/3V0xNQE/WUlIzU8nBa1uAwuhs9TxEZc3PnpGMOt+zOSSazSa2zdJ M2uqfbbkS8naNPkZiv3FAgv4X; Received: from 97-122-68-157.hlrn.qwest.net ([97.122.68.157]:47898 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96.2) (envelope-from <tom@tromey.com>) id 1rRFzx-0049D4-1H; Sat, 20 Jan 2024 11:23:17 -0700 From: Tom Tromey <tom@tromey.com> Subject: [PATCH v2 00/14] Cleanups for the TUi register window Date: Sat, 20 Jan 2024 11:23:11 -0700 Message-Id: <20240120-tui-regs-cleanup-v2-0-a3cccc6a3573@tromey.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAJAPrGUC/32NQQ6CMBBFr2K6dkxbIqAr72FYTMsATaQl00Ikh LtbOIDLl7z//iYisaMonpdNMC0uuuAz6OtF2AF9T+DazEJLXSitKkizA6Y+gv0Q+nmComzrrnh ILO8o8mxi6tz3TL6bzAYjgWH0djhCI8ZEfIiDiynwel4v6tD/vCwKJJSVaSWhotrQK3EYab3ZM Ipm3/cfgQh+dMoAAAA= To: gdb-patches@sourceware.org Cc: Tom de Vries <tdevries@suse.de>, Andrew Burgess <aburgess@redhat.com> X-Mailer: b4 0.12.4 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.68.157 X-Source-L: No X-Exim-ID: 1rRFzx-0049D4-1H X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-157.hlrn.qwest.net ([192.168.0.21]) [97.122.68.157]:47898 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfDxm55WFP6IqBXFl/wiTA/bmdn/nt+B+OhcVjneV1Z6O0T4RWi51oEtvtVqfEKzEAp8M5Vw7XEo0ocOgpNOvrYaAkKk18LTRzXtYNOS00NMo6nc3dCn5 SVVpb6FLAT7mKM35ThpU+44LSB9cvkRJ/VZ/5znsAxdEGQNBthUAlJo+J4/cF6LrPj4+63hUWR8JA1kTjfX90Ztt+HrNpLtskpU= X-Spam-Status: No, score=-3016.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series |
Cleanups for the TUi register window
|
|
Message
Tom Tromey
Jan. 20, 2024, 6:23 p.m. UTC
This series is a grab-bag of cleanups to the TUI register window. I've tried to untangle the code somewhat, with the goal being removing the extra rerender overload. This series also fixes the 'exit' bug and removes the hacky and unnecessary recursion flag from tui-hooks.c. More cleanups here are possible -- the register window is pretty old code and pretty ugly. In particular: * the layout code is still pretty bad * it doesn't really make sense for check_register_values to accept a frame, because the window can only really ever use the selected frame anyway * there's no horizontal scrolling, but for vector registers this might be nice (there's a bug about this) --- Changes in v2: - Addressed review comments - Link to v1: https://inbox.sourceware.org/gdb-patches/20231217-tui-regs-cleanup-v1-0-67bd0ea1e8be@tromey.com --- Tom Tromey (14): Use pop_back in tui_register_format Minor C++ cleanups in tui-regs.c Simplify tui_data_window::show_register_group Rename tui_data_item_window -> tui_register_info Change tui_register_info::visible to a method Move scrollok call in register window Simplify update_register_data Remove the TUI register window rerender overload Simplify tui_data_win::erase_data_content Remove tui_refreshing_registers Remove redundant check from tui_refresh_frame_and_register_information Return void from tui_show_frame_info Rename show_registers -> set_register_group Update TUI register window when the inferior exits gdb/testsuite/gdb.tui/regs.exp | 8 ++ gdb/tui/tui-hooks.c | 36 +++---- gdb/tui/tui-regs.c | 229 +++++++++++++++-------------------------- gdb/tui/tui-regs.h | 59 ++++++----- gdb/tui/tui-status.c | 16 ++- gdb/tui/tui-status.h | 2 +- 6 files changed, 148 insertions(+), 202 deletions(-) --- base-commit: 7ae24327467750c445733e40d840e502795dbdf3 change-id: 20231217-tui-regs-cleanup-36d8f390a65a Best regards,
Comments
Tom Tromey <tom@tromey.com> writes: > This series is a grab-bag of cleanups to the TUI register window. > > I've tried to untangle the code somewhat, with the goal being removing > the extra rerender overload. > > This series also fixes the 'exit' bug and removes the hacky and > unnecessary recursion flag from tui-hooks.c. > > More cleanups here are possible -- the register window is pretty old > code and pretty ugly. In particular: > > * the layout code is still pretty bad > > * it doesn't really make sense for check_register_values to accept a > frame, because the window can only really ever use the selected > frame anyway > > * there's no horizontal scrolling, but for vector registers this might > be nice (there's a bug about this) This all looks great. Spotted one typo in a commit message (see separate email), but otherwise: Approved-By: Andrew Burgess <aburgess@redhat.com> Thanks, Andrew > > --- > Changes in v2: > - Addressed review comments > - Link to v1: https://inbox.sourceware.org/gdb-patches/20231217-tui-regs-cleanup-v1-0-67bd0ea1e8be@tromey.com > > --- > Tom Tromey (14): > Use pop_back in tui_register_format > Minor C++ cleanups in tui-regs.c > Simplify tui_data_window::show_register_group > Rename tui_data_item_window -> tui_register_info > Change tui_register_info::visible to a method > Move scrollok call in register window > Simplify update_register_data > Remove the TUI register window rerender overload > Simplify tui_data_win::erase_data_content > Remove tui_refreshing_registers > Remove redundant check from tui_refresh_frame_and_register_information > Return void from tui_show_frame_info > Rename show_registers -> set_register_group > Update TUI register window when the inferior exits > > gdb/testsuite/gdb.tui/regs.exp | 8 ++ > gdb/tui/tui-hooks.c | 36 +++---- > gdb/tui/tui-regs.c | 229 +++++++++++++++-------------------------- > gdb/tui/tui-regs.h | 59 ++++++----- > gdb/tui/tui-status.c | 16 ++- > gdb/tui/tui-status.h | 2 +- > 6 files changed, 148 insertions(+), 202 deletions(-) > --- > base-commit: 7ae24327467750c445733e40d840e502795dbdf3 > change-id: 20231217-tui-regs-cleanup-36d8f390a65a > > Best regards, > -- > Tom Tromey <tom@tromey.com>