From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Hl7nAOFARmWdej4AWB0awg (envelope-from ) for ; Sat, 04 Nov 2023 09:02:25 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=aarsen.me header.i=@aarsen.me header.a=rsa-sha256 header.s=MBO0001 header.b=JViICE43; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id EAF281E1A7; Sat, 4 Nov 2023 09:02:24 -0400 (EDT) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 DB5FF1E0C1 for ; Sat, 4 Nov 2023 09:02:22 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D7C63858415 for ; Sat, 4 Nov 2023 13:02:22 +0000 (GMT) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id 269C23858D39 for ; Sat, 4 Nov 2023 13:02:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 269C23858D39 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 269C23858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.241.56.151 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699102931; cv=none; b=g02LEM+1l9ELr5MuvBfsJL9hOmfZjgCcMHhj9g5cE5sqlmVidPPF71+vOacFfiSb8jmyT7LLQ0OZkLsx7dVC139zAm5AB4qYnv47TA6lxuFbEO1sHofzXN5jqMXr+TVaqjK0zcKYwH1Huobo79cqwILPBcrIOtJktctoNMqozCA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699102931; c=relaxed/simple; bh=LeVLkGjKlPumrU+2RstvmmHtLFFZWx9OQdSBVauyX/I=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Yr78FNclaqRLM8uOdCni2oRJElEYYPdRqyOJdg++jMpvntoInpCvAvDh3bXqPy8/6b1vEk2ehBP5syle5Op9VInx4eSPzO1v1cDy7A5kWNoLzcm1ezzKK1wnDic++bPHAKfhyc2MPnMezQdMkfpALIe48rUDEmnPoRBP5Xp8W5s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4SMySF5Zdmz9sc0; Sat, 4 Nov 2023 14:02:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1699102925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=IQCBVFF7HXQ7c+BO/n8NHPZ/Wx7M8LZ+xbPH99fk8LQ=; b=JViICE433p+PmgOkXhVcI8+truFMR7pQJiyn9Z0ESThmG4AGj9fYcvnYlwn3o4raAA5fSm xNkSu3KWHbN7elLTJc04t+VvyCDeSz3sUKpH7TAKg+KM3MO5iQsWfeZkcypKqkBCueRw9U CceYtOmUxog5fU9F5mjSF92+CIy36zs13nN9R9GO2TJK/NZKQeptT5dR4tAWPXBEkvb9o8 iI4y5iigiAnumnAvXRZkFIpwkRmfV2aJEMVqU0iPYd9U6wozkMYUu66Ikkzjs9lBRpwd6R e51Ar6bJx069McEJ3CJo0FXsrzK8Sj8tw+CIlYGmnJcTNSgXX2xWnaXch7dwXQ== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gdb-patches@sourceware.org Cc: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Subject: [PATCH v2] gdb/tui: add a vsplit layout Date: Sat, 4 Nov 2023 13:47:44 +0100 Message-ID: <20231104130153.3649198-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, KAM_SHORT, RCVD_IN_DNSWL_LOW, 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 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 The usual 'split' layout features a vertical stack that inadequately makes use of widely-used widescreen displays. This layout displays the same information but in a horizontal stack in a way that's quite handy for debugging on wide screens. --- Afternoon! v1: https://inbox.sourceware.org/20231104014343.3199584-1-arsen@aarsen.me/ Changes since v1: - Updated the completion.exp test for layout completions. With that changed, the diff between the testsuite run before and after this patch appears to have nothing relevant to the patch (though, I'm still not fully clear on how to interpret the GDB results). This is also the only test the Linaro buildbot reported, so I suspect that this revision should be fine. Thanks in advance, apologies for the inconvenience, and have a lovely day! :-) gdb/doc/gdb.texinfo | 4 ++++ gdb/testsuite/gdb.tui/completion.exp | 2 +- gdb/testsuite/gdb.tui/tui-layout.exp | 5 ++++- gdb/tui/tui-layout.c | 11 +++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index db1a82ec838..209af3a4b0e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -30604,6 +30604,10 @@ Display the assembly and command windows. @item split Display the source, assembly, and command windows. +@item vsplit +Display the source and assembly side by side, and the command window +below them. + @item regs When in @code{src} layout display the register, source, and command windows. When in @code{asm} or @code{split} layout display the diff --git a/gdb/testsuite/gdb.tui/completion.exp b/gdb/testsuite/gdb.tui/completion.exp index 9cf8dc2ee25..4110045d117 100644 --- a/gdb/testsuite/gdb.tui/completion.exp +++ b/gdb/testsuite/gdb.tui/completion.exp @@ -50,7 +50,7 @@ proc test_tab_completion {input_line expected_re} { if { [readline_is_used] } { with_test_prefix "completion of layout names" { - test_tab_completion "layout" "asm *next *prev *regs *split *src *" + test_tab_completion "layout" "asm *next *prev *regs *split *src *vsplit *" } diff --git a/gdb/testsuite/gdb.tui/tui-layout.exp b/gdb/testsuite/gdb.tui/tui-layout.exp index 90f27c5eac1..ea99d8f6ef9 100644 --- a/gdb/testsuite/gdb.tui/tui-layout.exp +++ b/gdb/testsuite/gdb.tui/tui-layout.exp @@ -83,13 +83,16 @@ proc test_layout_or_focus {layout_name terminal execution} { } elseif {$layout_name == "split"} { Term::check_box "src box" 0 0 80 8 Term::check_box "asm box" 0 7 80 8 + } elseif {$layout_name == "vsplit"} { + Term::check_box "src box" 0 0 40 15 + Term::check_box "asm box" 39 0 41 15 } } } foreach_with_prefix terminal {ansi dumb} { foreach_with_prefix execution {false true} { - foreach_with_prefix layout {"asm" "reg" "src" "split"} { + foreach_with_prefix layout {"asm" "reg" "src" "split" "vsplit"} { test_layout_or_focus $layout $terminal $execution } } diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c index 159445dc520..824ed282622 100644 --- a/gdb/tui/tui-layout.c +++ b/gdb/tui/tui-layout.c @@ -1184,6 +1184,17 @@ initialize_layouts () layout->add_window (CMD_NAME, 1); add_layout_command ("split", layout); + layout = new tui_layout_split (); + { + auto vsplit_top_half = std::make_unique (false); + vsplit_top_half->add_window (SRC_NAME, 1); + vsplit_top_half->add_window (DISASSEM_NAME, 1); + layout->add_split (std::move (vsplit_top_half), 1); + layout->add_window (STATUS_NAME, 0); + layout->add_window (CMD_NAME, 1); + add_layout_command ("vsplit", layout); + } + layout = new tui_layout_split (); layout->add_window (DATA_NAME, 1); layout->add_window (SRC_NAME, 1); -- 2.42.0