From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id EF42C3858D20 for ; Tue, 30 May 2023 10:53:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EF42C3858D20 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-out1.suse.de (Postfix) with ESMTPS id 3132E219FE; Tue, 30 May 2023 10:53:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1685444006; 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=4NSOs5hfY5UqL8DZ7ABL3krnQqhXuLGsdHxQ0xC2w5M=; b=pJTYh3QLEBkU5b64Ps6oo78W/uI4f6QnLRJOAXWpfjP/r1NvjHppM5LTt69KV3RqiANwof EgsMr9fuP1YUJf+APEb+FtB2McAIRd/OJFvEGNN4YrfB/K//srTgOwXIZLgafnVzG4Zqja 5xTJXZHt2pOHBZullgBtJF/ilZ2C/nI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1685444006; 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=4NSOs5hfY5UqL8DZ7ABL3krnQqhXuLGsdHxQ0xC2w5M=; b=qWEi1HYp0hpLtQAfpWzrjEGQ7/3yiqPOEoS4rSaeF7jPvUNBM18HMkmgNM9lofVZOiX/xf F3c429+PY7tO0NCQ== 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 19E4013478; Tue, 30 May 2023 10:53:26 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8tQaBabVdWTNZgAAMHmgww (envelope-from ); Tue, 30 May 2023 10:53:26 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 0/3] [gdb/tui] Improve handling of inferior output Date: Tue, 30 May 2023 12:53:21 +0200 Message-Id: <20230530105324.23089-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.3 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: When inferior output in TUI causes scrolling, the TUI screen is garbled. This is a known issue, PR tui/14332. This can be fixed manually by doing ^L. I noticed though that doing ^L removes the inferior output. The first patch fixes this. The third patch automates doing ^L when the gdb_tty_state changes to target_terminal_state::is_ours, such what we no longer have to do ^L. The second patch is an infrastructure patch used by the third patch. Tested on x86_64-linux. Tom de Vries (3): [gdb/tui] Keep inferior output in cmd window with ^L [gdb] Add observable terminal_owner_changed [gdb/tui] Refresh on target_terminal_state::is_ours gdb/inflow.c | 176 ++++++++++++++++++-------------- gdb/observable.c | 1 + gdb/observable.h | 5 + gdb/testsuite/gdb.tui/hello.c | 25 +++++ gdb/testsuite/gdb.tui/hello.exp | 54 ++++++++++ gdb/tui/tui-hooks.c | 11 ++ gdb/tui/tui-io.c | 2 +- gdb/tui/tui-win.c | 18 +++- gdb/tui/tui-win.h | 2 +- gdb/tui/tui-wingeneral.c | 5 +- gdb/tui/tui-wingeneral.h | 2 +- 11 files changed, 214 insertions(+), 87 deletions(-) create mode 100644 gdb/testsuite/gdb.tui/hello.c create mode 100644 gdb/testsuite/gdb.tui/hello.exp base-commit: 796029320e75a141570220224731c8151311f8d9 -- 2.35.3