From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id 3126A3898385 for ; Tue, 16 May 2023 08:43:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3126A3898385 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BD12F1F8A4; Tue, 16 May 2023 08:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1684226637; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WQygirQ/yGIvQ+Q6W3WcMQ4YwoI0/b9fRePdPXBUEsg=; b=e0ulMFPzcOZab0qwo6mzvEZvpJhVvRxWnjKy7lUcl+hamIQE6nelKfU7TTvW6Adb4Ird38 e1jXMuARZFB6Qtx0svAQnV36wpGKhnCrdB3IQimTuBcD6T/wrC90eRh9HKikgFlk7PJC7A xV074Ic6BYC31VyjrUsKJjf5OKPuBHo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1684226637; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=WQygirQ/yGIvQ+Q6W3WcMQ4YwoI0/b9fRePdPXBUEsg=; b=Qz7yx2NkNZAem1hxcwC9LRp3OBztiegF8oamO9mr5jFa1yG6FSiV2zO+AlIzbxr7s77WNj TgqDhJX5d71xvDCA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A6A8F138F5; Tue, 16 May 2023 08:43:57 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id Yo63J01CY2SiMwAAMHmgww (envelope-from ); Tue, 16 May 2023 08:43:57 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 0/3] [gdb/tui] Allow highlighting in windows contents to be switched off Date: Tue, 16 May 2023 10:43:49 +0200 Message-Id: <20230516084352.27225-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: While trying to stress test TUI by stepi-ing through some program using the press-and-hold-enter method, I noticed the highlighting of the current execution point and the changed registers, and found it a bit intrusive. I decided to make all highlighting in windows contents optional (in window borders it already is). Also the entire contents of the status window is highlighted, so I've added a "set tui status-window-mode ", similar to border-mode and active-border-mode. The highlighting is static, while the highlighting in other windows is dynamic, so I figured it deserves its own option. For the disassembly, source and register window, I've introduced "set tui contents-highlight on/off". Note that I could have used also a argument, but in the disassembly and source window we use reverse while in the register window we use standout, so that would have meant changing the default for one or the other. Alternatively, we could have added independent options for this "set tui source-highlight-mode " and "set tui regs-highlight-mode ", but I was not sure whether that was splitting up control of behavour in too much detail. After playing around with the "set tui contents-highlight off" setting, I noticed that while in the source and assembly window you can still see the current execution point (indicated by a ">" marker), that's no longer the case for the changed registers in the registers window. So I added a ">" marker there as well. In order to be able to test this, I've added the ability to annotate a tuiterm line with the active attributes changes, such that "set tui status-window-mode standout" looks like this: ... exec No process In: L?? PC: ?? ... and "set tui status-window-mode normal" looks like this: ... exec No process In: L?? PC: ?? ... Tested on x86_64-linux. Tom de Vries (3): [gdb/tui] Add set tui status-window-mode [gdb/tui] Use ">" marker in register window [gdb/tui] Add set tui contents-highlight on/off gdb/doc/gdb.texinfo | 13 +++++ gdb/testsuite/gdb.tui/basic.exp | 13 +++++ gdb/testsuite/gdb.tui/regs-2.c | 36 ++++++++++++ gdb/testsuite/gdb.tui/regs-2.exp | 66 ++++++++++++++++++++++ gdb/testsuite/gdb.tui/source.exp | 59 ++++++++++++++++++++ gdb/testsuite/lib/tuiterm.exp | 84 +++++++++++++++++++++------- gdb/tui/tui-regs.c | 49 ++++++++++++++-- gdb/tui/tui-regs.h | 4 +- gdb/tui/tui-stack.c | 10 +--- gdb/tui/tui-win.c | 95 ++++++++++++++++++++++++++++++++ gdb/tui/tui-win.h | 7 +++ gdb/tui/tui-winsource.c | 4 +- 12 files changed, 406 insertions(+), 34 deletions(-) create mode 100644 gdb/testsuite/gdb.tui/regs-2.c create mode 100644 gdb/testsuite/gdb.tui/regs-2.exp create mode 100644 gdb/testsuite/gdb.tui/source.exp base-commit: b10f2cd3f3c3b25c71e50a342fb46f9eb9eba792 -- 2.35.3