From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id E707F3858C31 for ; Sat, 9 Dec 2023 13:47:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E707F3858C31 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E707F3858C31 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702129658; cv=none; b=dGHwEv3CcWuTvdrvyjYbvA3i2lY1ymNK9vefTe3qC6SKtGWZTbCtBMQRxpGsiYyGFB3CKgM/TzKAro7lSm/vUW3hidncEP6eeUbC795VDzpWjOZMmoHi/TIxRdqNEEzhWz/d8mYFtM8Qd1Rn9DMo0x1QK58Ja9sQBGzuoeGJGmk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702129658; c=relaxed/simple; bh=mU91a8AKEjntcmQ+gdM0/FWngxkDpbl+opVMurXbqHY=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=VcIs5TCPp0MKv857AQxmIcAQ158HG72OOPSiWzby9LyN88p80jmROFH+wEYSMFJRtf/iHHqAfY+jXzHXCG1WLUWIWdcnpUoQZQ3lyUzlHzmDh7jvEBuipnVjgIpaA5SfE91PhuOpsxPje1z6LpwRFpPPVvI13ih1slMlAX0VM24= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (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 smtp-out1.suse.de (Postfix) with ESMTPS id 89C4221F78; Sat, 9 Dec 2023 13:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702129655; h=from:from:reply-to: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=WScN+DR1vXsrHcdNzJOjSKVMc3N+yDCCDaelp1uWTLM=; b=bx/5amjV3hst8tTjOeWkYuJs9xZ80k/YiICb3h6Zl2LTTV4EXbhqs2Qrz1fbWmS7/93d1p mB67Y9lqoovYvLWiDCBd5XTI8dCwFMdxf5nuDfpYSsBSlBJ57JlvtSw2nG7SSw/SVP9zM7 rhB++AlpV0cNue9J0lkPUADvRKeDxm8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702129655; h=from:from:reply-to: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=WScN+DR1vXsrHcdNzJOjSKVMc3N+yDCCDaelp1uWTLM=; b=TvhQ5vU9+siIfT4yoEcCbCYKBnsStjSv93OLpK9jrNZapJmy64B4ocERANzfHYCao3JM8m VUd5JPHTs17IR+Ag== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702129655; h=from:from:reply-to: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=WScN+DR1vXsrHcdNzJOjSKVMc3N+yDCCDaelp1uWTLM=; b=bx/5amjV3hst8tTjOeWkYuJs9xZ80k/YiICb3h6Zl2LTTV4EXbhqs2Qrz1fbWmS7/93d1p mB67Y9lqoovYvLWiDCBd5XTI8dCwFMdxf5nuDfpYSsBSlBJ57JlvtSw2nG7SSw/SVP9zM7 rhB++AlpV0cNue9J0lkPUADvRKeDxm8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702129655; h=from:from:reply-to: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=WScN+DR1vXsrHcdNzJOjSKVMc3N+yDCCDaelp1uWTLM=; b=TvhQ5vU9+siIfT4yoEcCbCYKBnsStjSv93OLpK9jrNZapJmy64B4ocERANzfHYCao3JM8m VUd5JPHTs17IR+Ag== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 6CB3513282; Sat, 9 Dec 2023 13:47:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id n9J9GPdvdGUBQwAAD6G6ig (envelope-from ); Sat, 09 Dec 2023 13:47:35 +0000 Message-ID: Date: Sat, 9 Dec 2023 14:47:45 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/tui] Handle shared border in fixed-sized layout Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20231110165419.16793-1-tdevries@suse.de> <87msukhekt.fsf@tromey.com> From: Tom de Vries In-Reply-To: <87msukhekt.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Level: X-Spam-Score: -4.29 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -4.29 X-Spamd-Result: default: False [-4.29 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-3.00)[100.00%]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Flag: NO X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_FILL_THIS_FORM_SHORT,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: On 12/8/23 16:57, Tom Tromey wrote: > Is there any window with a fixed size other than the status line? I don't think so, no. > I wouldn't expect this to be hit currently. Agreed. However, I managed to trigger the behaviour using a trigger patch. Say I have a terminal with 24 lines: ... $ echo $LINES 24 ... and I show the window sizes of the split layout: ... $ gdb -q -ex "layout split" -ex "info win" ... and get: ... Name Lines Columns Focus src 8 80 (has focus) asm 8 80 status 1 80 cmd 8 80 (gdb) ... Note that 8 + 8 + 1 + 8 == 25 == 24 + 1, this is due to the shared box between src and asm. Now let's make src and asm fixed-size windows of 8 lines: ... diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index 523d0ea832b..61f00b6f6d8 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -91,6 +91,15 @@ struct tui_source_element struct tui_source_window_base : public tui_win_info { + int max_height () const final override + { + return 8; + } + + int min_height () const final override + { + return 8; + } protected: tui_source_window_base (); ~tui_source_window_base (); ... Instead, we get: ... Name Lines Columns Focus src 8 80 (has focus) asm 8 80 status 1 80 cmd 7 80 (gdb) ... and the last line of the terminal is unused. Then after applying this patch, we're back to the expected: ... Name Lines Columns Focus src 8 80 (has focus) asm 8 80 status 1 80 cmd 8 80 ... Pushed. Thanks, - Tom