From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6TbiDZSwfGl6rx0AWB0awg (envelope-from ) for ; Fri, 30 Jan 2026 08:22:28 -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=QbPYivdI; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 348A71E08D; Fri, 30 Jan 2026 08:22:28 -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 B6DCB1E08D for ; Fri, 30 Jan 2026 08:22:27 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 4BA224BA23E2 for ; Fri, 30 Jan 2026 13:22:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4BA224BA23E2 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=QbPYivdI Received: from omta036.useast.a.cloudfilter.net (omta036.useast.a.cloudfilter.net [44.202.169.35]) by sourceware.org (Postfix) with ESMTPS id A2FD24BB3BCA for ; Fri, 30 Jan 2026 13:17:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A2FD24BB3BCA 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 A2FD24BB3BCA 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=eF0euy6TzDJl4Bc97IhuXdrFL+wCYxol2FWrTn/xYgn4mTP10+pnUu5was1s744iQudUurQ0zWIYrdFC+cDM4oCJyqRVTHwc4HxM2Bg0Lw2soKdFlroKMdRw6/C2gK9klVvPrSPjr3Hgjck/XHgFBgSPG98esJvyJBPMqyngnfI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769779044; c=relaxed/simple; bh=cKvyA5jtNmBVnt6AAG3s0EvfqJ+WorZlXPRXtvUbJxs=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=mqJLYeWDAcrZ5UAKHPSjv3XlA7m73jLa2ZO9HcctlkCqqCULrvE2SArsXIPlCgogye77iDhAKlq7fQR9HWqqrLysoMbsbh72Cd+L9ZHKuvZV5PwvvRG5LG5E6CooX/UYdJ18nxOpZXuzbwxNZ2XGvZMgz1TbB7R6A2zm51FNPw8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2FD24BB3BCA Received: from eig-obgw-6001b.ext.cloudfilter.net ([10.0.30.143]) by cmsmtp with ESMTPS id lcOhv928cKXDJloNIvJdvm; Fri, 30 Jan 2026 13:17:24 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id loNHvIN6tcu11loNHvyrNV; Fri, 30 Jan 2026 13:17:24 +0000 X-Authority-Analysis: v=2.4 cv=bKYWIO+Z c=1 sm=1 tr=0 ts=697caf64 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=ItBw4LHWJt0A:10 a=pUZZera9ElmE5kupo5cA: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=YYR3XiaWeSYOkcDS2ldx9YCrKzRUGsJfWWRrMmjw/ow=; b=QbPYivdI/1khC/40rlA/RRO/mI QfR1Nmbjnu2Pbi9Ag3o7LBfmCpkclyxq7LcLT0xsLY719m/dJQBGC1oo8qqCOStAh6oJWcqgYCdqR ILV47FVSFxgUQScPL8e5R3i54; 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-2IiC; Fri, 30 Jan 2026 06:17:23 -0700 From: Tom Tromey Date: Fri, 30 Jan 2026 06:17:22 -0700 Subject: [PATCH v3 08/21] Remove gdb_stdtargin MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260130-pr-28948-logging-5-v3-8-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-2IiC 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: 14 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGxXwNUSSZxHLPyWQxDO6WbVCWOV7Q0NScoYHUAO/vx4ww+rS9wE0LTbKjgx7oZ0gENj/ADANLeEoGzHXXjvodHA442+wCH7R1WCG8Y+gnA3wyfydHYH LRSitIupazER/4ZYDWDuBK30LXdLmz+dqadGS4a+5Wcqmu9mu0hMyLqTF+eeEGScAyRb+nue2WLHhHv29AsdeeSAoMOVwoyB34o= 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_stdtargin is only used in a single place; and, strangely, does not follow the current UI. This patch removes the global and changes the one user to use gdb_stdin instead. --- gdb/main.c | 5 ----- gdb/remote-fileio.c | 2 +- gdb/utils.h | 4 ---- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/gdb/main.c b/gdb/main.c index ac83b953cf2..c9bd79a4f8b 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -79,9 +79,6 @@ static int gdb_datadir_provided = 0; the possibly relocated path to python's lib directory. */ std::string python_libdir; -/* Target IO streams. */ -struct ui_file *gdb_stdtargin; - /* True if --batch or --batch-silent was seen. */ int batch_flag = 0; @@ -694,8 +691,6 @@ captured_main_1 (struct captured_main_args *context) gdb_internal_backtrace_init_str (); current_ui = main_ui; - gdb_stdtargin = gdb_stdin; - /* Put a CLI based uiout in place early. If the early initialization files trigger any I/O then it isn't hard to reach parts of GDB that assume current_uiout is not nullptr. Maybe we should just install the diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c index 61dfb2552aa..459f249d37b 100644 --- a/gdb/remote-fileio.c +++ b/gdb/remote-fileio.c @@ -542,7 +542,7 @@ remote_fileio_func_read (remote_target *remote, char *buf) limit this read to something smaller than that - by a safe margin, in case the limit depends on system resources or version. */ - ret = gdb_stdtargin->read ((char *) buffer, 16383); + ret = gdb_stdin->read ((char *) buffer, 16383); if (ret > 0 && (size_t)ret > length) { remaining_buf = (char *) xmalloc (ret - length); diff --git a/gdb/utils.h b/gdb/utils.h index 28824ad2e1a..4d888b80274 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -189,10 +189,6 @@ extern void gdb_flush (struct ui_file *stream); /* Target output. */ #define gdb_stdtarg (*current_ui_gdb_stdtarg_ptr ()) -/* Truly global ui_file streams. These are all defined in main.c. */ - -extern struct ui_file *gdb_stdtargin; - /* Set the screen dimensions to WIDTH and HEIGHT. */ extern void set_screen_width_and_height (int width, int height); -- 2.49.0