From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id DCDE63858C3A for ; Thu, 13 Apr 2023 14:17:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DCDE63858C3A 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 1F22E218BB; Thu, 13 Apr 2023 14:17:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1681395456; 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=D+ZaugXP4HRMfYJ1XnU9SSVorNhFpGCNzXR5FFozlK4=; b=Dznp3H9ZDgum0S5lyU6XgB2DKaeEV9MUVAiHWNt1Yq9NswS+tHPcVHgmp/vZ0jEilAB2U4 7spHzMS287uRDkLrpoWjHb4hFNMdXvsIobJVRyBgabxpSt1ZeibXU1plljj95Ejh3WSm8d AyoBJgTr0qITk3MRDcKBjRhIaI1LIEM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1681395456; 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=D+ZaugXP4HRMfYJ1XnU9SSVorNhFpGCNzXR5FFozlK4=; b=P0GOwfzKsDZ6gMEyVhk0eLfMLas0d+U2xLRXMOjFGDjYqvXIMZaH6beKiUtHBVoAxBlXv5 mdbjMf1VPd8XXOBQ== 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 F035C13421; Thu, 13 Apr 2023 14:17:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ODhtOf8OOGQBNgAAMHmgww (envelope-from ); Thu, 13 Apr 2023 14:17:35 +0000 Message-ID: <7087394a-5cac-45c4-5c6d-6229db3c4915@suse.de> Date: Thu, 13 Apr 2023 16:17:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH 8/8] [gdb/tui] Fix TUI for TERM=ansi To: gdb-patches@sourceware.org Cc: Tom Tromey References: <20230413140827.19412-1-tdevries@suse.de> <20230413140827.19412-9-tdevries@suse.de> Content-Language: en-US From: Tom de Vries In-Reply-To: <20230413140827.19412-9-tdevries@suse.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP 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 4/13/23 16:08, Tom de Vries via Gdb-patches wrote: > @@ -1144,6 +1148,11 @@ init_page_info (void) > > /* Get the screen size from Readline. */ > rl_get_screen_size (&rows, &cols); > + if (gdb_stdout->isatty ()) { > + readline_hidden_cols = COLS - cols; > + gdb_assert (readline_hidden_cols >= 0); > + gdb_assert (readline_hidden_cols <= 1); > + } > lines_per_page = rows; > chars_per_line = cols; > Reading this over once more, I noticed this is missing a fix for an assertion failure we run into when doing: ... $ TERM=blabla gdb ... So, this bit is missing: ... - if (gdb_stdout->isatty ()) { + if (gdb_stdout->isatty () && COLS != 0) { ... Thanks, - Tom