From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MT3eIhmwfGkksB0AWB0awg (envelope-from ) for ; Fri, 30 Jan 2026 08:20:25 -0500 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=asovi32R; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 89D2D1E08D; Fri, 30 Jan 2026 08:20:25 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (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 290DD1E08D for ; Fri, 30 Jan 2026 08:20:25 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 89A8E4BB58B1 for ; Fri, 30 Jan 2026 13:20:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 89A8E4BB58B1 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=asovi32R Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id 876E04BA903E for ; Fri, 30 Jan 2026 13:17:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 876E04BA903E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 876E04BA903E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=44.202.169.35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769779044; cv=none; b=U3P24+H4Y3YO7/E1H14GxYD5nZjdA6l3Ua4gNq9H8UOLUo7FM5esXHRw37JdPqjNMMMM9hKRNH8TRhEGMQmcbn0MITrlQxlAS2KMU0hiiRG+ZiPtmpqX4HZY8AevenFp1DP1bk3xN12XQu1YXDYmAuwKvd0hJc1Hvpy/B8flNO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769779044; c=relaxed/simple; bh=YqmTeDQPtkgLKS5G9FPNaT+zCNfhnyY91gr/kMyV51k=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=KKNMy38Ux3S9IIedt0xgG6cOiIaYr1X53sSy1xUd/bVDvQboPRycKKCsOUmGoojgMtEE9uDI+kDm2UpnBRdtYYh6DxG+rcX1b0zPNQWrXSpH4ZvJKUHqoB59JiX2nMDzLvuK05x4Rcp8Bv7SLKdxK3i3msDkC6soETZjaXJPWkY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 876E04BA903E Received: from eig-obgw-6006b.ext.cloudfilter.net ([10.0.30.211]) by cmsmtp with ESMTPS id lkMIvB5LjKXDJloNIvJdvi; Fri, 30 Jan 2026 13:17:24 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id loNHvVb0TvXvHloNHvTyEO; Fri, 30 Jan 2026 13:17:23 +0000 X-Authority-Analysis: v=2.4 cv=e4IGSbp/ c=1 sm=1 tr=0 ts=697caf63 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=ItBw4LHWJt0A:10 a=s5Z_HusJb8a4n3trlC8A:9 a=QEXdDO2ut3YA:10 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Cc:To:In-Reply-To:References:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=oTWlo0A+NopNyW7yaTGLCihgOJLXXqjpiAPjdhDjFbc=; b=asovi32R7xuWyJ4znnU7NAUpbR qi5oXpkW42YjmTArNZgN+C0kT0VeS9ydOjgnRTd9qCvVc+m3xiDu8LEwPtqJmS57NK5iQA4IM0phW RIj8aeVJHw1e2ySYLTvMBjzTv; Received: from 97-122-114-32.hlrn.qwest.net ([97.122.114.32]:33716 helo=[192.168.122.1]) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vloNH-00000001JjQ-18Qg; Fri, 30 Jan 2026 06:17:23 -0700 From: Tom Tromey Date: Fri, 30 Jan 2026 06:17:21 -0700 Subject: [PATCH v3 07/21] Change how stdin is handled in the UI MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260130-pr-28948-logging-5-v3-7-3eec47ef3cba@tromey.com> References: <20260130-pr-28948-logging-5-v3-0-3eec47ef3cba@tromey.com> In-Reply-To: <20260130-pr-28948-logging-5-v3-0-3eec47ef3cba@tromey.com> To: gdb-patches@sourceware.org Cc: Tom Tromey X-Mailer: b4 0.14.3 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.114.32 X-Source-L: No X-Exim-ID: 1vloNH-00000001JjQ-18Qg X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-114-32.hlrn.qwest.net ([192.168.122.1]) [97.122.114.32]:33716 X-Source-Auth: tom+tromey.com X-Email-Count: 13 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKNtdmuCYhBAQNMut89VzwdE+NYURFG+wVefl9eD6yGlj7GQTZ5HnVDiXXkSSW1CXz3UVdpuYjnUDxMTUpzJ8FEAQo/8gY0sqmb90IrJ6u+laIKNdLAj xV1eMTgQ+mGRXQZtw8yiIxA/gO/Wo88dj2I3XIfalBVYE+ZE4NUOOkDXc3onjejibGcc08/mHvs7uyWHzGDQV+z+Nx7d3yJmXMY= 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 gdb_stdin is never overridden, so it doesn't need to be an lvalue. This patch changes how it is implemented. Future patches will change the other streams here, but I thought since this one is truly different from the others, it should be handled separately. --- gdb/top.c | 6 +++--- gdb/utils.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdb/top.c b/gdb/top.c index e7d1ded96e4..5819dfa7897 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -97,10 +97,10 @@ current_ui_gdb_stdout_ptr () return ¤t_ui->m_gdb_stdout; } -struct ui_file ** -current_ui_gdb_stdin_ptr () +struct ui_file * +current_ui_gdb_stdin () { - return ¤t_ui->m_gdb_stdin; + return current_ui->m_gdb_stdin; } struct ui_file ** diff --git a/gdb/utils.h b/gdb/utils.h index 4f11cbf379f..28824ad2e1a 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -166,7 +166,7 @@ extern bool pagination_enabled; extern bool debug_timestamp; extern struct ui_file **current_ui_gdb_stdout_ptr (void); -extern struct ui_file **current_ui_gdb_stdin_ptr (void); +extern struct ui_file *current_ui_gdb_stdin (); extern struct ui_file **current_ui_gdb_stderr_ptr (void); extern struct ui_file **current_ui_gdb_stdlog_ptr (void); extern struct ui_file **current_ui_gdb_stdtarg_ptr (); @@ -178,8 +178,8 @@ extern void gdb_flush (struct ui_file *stream); /* Normal results */ #define gdb_stdout (*current_ui_gdb_stdout_ptr ()) -/* Input stream */ -#define gdb_stdin (*current_ui_gdb_stdin_ptr ()) +/* Input stream. */ +#define gdb_stdin (current_ui_gdb_stdin ()) /* Serious error notifications. This bypasses the pager, if one is in use. */ #define gdb_stderr (*current_ui_gdb_stderr_ptr ()) -- 2.49.0