From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id mRa4DHiwfGkksB0AWB0awg (envelope-from ) for ; Fri, 30 Jan 2026 08:22:00 -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=g4snjq8K; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 23DAA1E0DD; Fri, 30 Jan 2026 08:22:00 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=no 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 9CC3C1E08D for ; Fri, 30 Jan 2026 08:21:59 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 208FD4BA23F7 for ; Fri, 30 Jan 2026 13:21:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 208FD4BA23F7 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=g4snjq8K Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 4C4034BA23C4 for ; Fri, 30 Jan 2026 13:17:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C4034BA23C4 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 4C4034BA23C4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769779047; cv=none; b=CvvFgxjZ2sNN1Po10u7g8bdnkuvdga75E+9WMZPHePfkimoSXm1brFzMwclba6kzuvy1nE3Rnr3VbdYkvn5fM4GJ9U4IucwPfzSVGNQVrlVmWNRWWVNII/3zm6GWR3IOKW2i/p0qujCBTBWIJbGFOB3lLDKf5dk11gyjAwI3fE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1769779047; c=relaxed/simple; bh=tRAbd3qs/6UYY732g6mOmwH5sFywSu9/dUYX7X2cw5M=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=mhSWhQD/ZO0lzzNMv95Cd9EUwWMAIAJxYj8Pkt46Tt2Q1yzzXhnKWs+b9ilYuMXPlcT6FHoGLFRHlcJI5h8oz8g6BwaHn52zlpQOGbE08i7P2RQPpRrlpNplN2gy2GATuv7vZqw3a/7G8FdgcwMHtz7PfD6vzFHR0OsOQ4D3ENE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C4034BA23C4 Received: from eig-obgw-5001b.ext.cloudfilter.net ([10.0.29.181]) by cmsmtp with ESMTPS id lmEOv36BtipkCloNKvWPGr; Fri, 30 Jan 2026 13:17:27 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id loNKvfeFPSqlVloNKvPso4; Fri, 30 Jan 2026 13:17:26 +0000 X-Authority-Analysis: v=2.4 cv=I7FlRMgg c=1 sm=1 tr=0 ts=697caf66 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=ItBw4LHWJt0A:10 a=20KFwNOVAAAA:8 a=iPC2HdnDX6vjZfu-9HoA:9 a=3ZKOabzyN94A:10 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=F2t3o8HaBfkE7GrbR56RJGv924ZrVf8I4jmf1zMCZmI=; b=g4snjq8KUdmabrFi6mDdrahsIx uXymmtSfsPve4lmjZBJ52kmcnmwWYaIeqzy7R9hS6q5XwnerrXwspqRLpzXepYgqlCSucGY6eXnpL DQ1TECSB3V5mY3pqDX8BmcMm3; 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 1vloNK-00000001JjQ-0f1w; Fri, 30 Jan 2026 06:17:26 -0700 From: Tom Tromey Date: Fri, 30 Jan 2026 06:17:30 -0700 Subject: [PATCH v3 16/21] Remove tee_file MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260130-pr-28948-logging-5-v3-16-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 , Andrew Burgess 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: 1vloNK-00000001JjQ-0f1w 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: 27 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfI+75bU3XvczbiKVty3WMPGp6u7GY3NYBkAeJKMXWGBB1ScRY9olnz4glhOwknH17l7IQVd+SM0VldxikGG3vG7zfLOhVNY86547lyanvJUonrg2yG3j +x5Jz1HRFBQ6dGjJmZfCoaiivqjOkDn8XgPg0BiM9JfrKTwdgKf3q9K2GD6RAeu1og9tyz6jI44fSw+x7ngsDQSjlWTAvZ1xyto= 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 tee_file is no longer used and can be deleted. Approved-By: Andrew Burgess --- gdb/ui-file.c | 60 ----------------------------------------------------------- gdb/ui-file.h | 37 ------------------------------------ 2 files changed, 97 deletions(-) diff --git a/gdb/ui-file.c b/gdb/ui-file.c index d655e7edd9e..2bd692274f7 100644 --- a/gdb/ui-file.c +++ b/gdb/ui-file.c @@ -342,66 +342,6 @@ stderr_file::stderr_file (FILE *stream) -tee_file::tee_file (ui_file *one, ui_file *two) - : m_one (one), - m_two (two) -{} - -tee_file::~tee_file () -{ -} - -void -tee_file::flush () -{ - m_one->flush (); - m_two->flush (); -} - -void -tee_file::write (const char *buf, long length_buf) -{ - m_one->write (buf, length_buf); - m_two->write (buf, length_buf); -} - -void -tee_file::write_async_safe (const char *buf, long length_buf) -{ - m_one->write_async_safe (buf, length_buf); - m_two->write_async_safe (buf, length_buf); -} - -void -tee_file::puts (const char *linebuffer) -{ - m_one->puts (linebuffer); - m_two->puts (linebuffer); -} - -bool -tee_file::isatty () -{ - return m_one->isatty (); -} - -/* See ui-file.h. */ - -bool -tee_file::term_out () -{ - return m_one->term_out (); -} - -/* See ui-file.h. */ - -bool -tee_file::can_emit_style_escape () -{ - return (m_one->term_out () - && term_cli_styling ()); -} - /* See ui-file.h. */ void diff --git a/gdb/ui-file.h b/gdb/ui-file.h index 84529de3618..94897ff0b77 100644 --- a/gdb/ui-file.h +++ b/gdb/ui-file.h @@ -333,43 +333,6 @@ class stderr_file : public stdio_file void puts (const char *linebuffer) override; }; -/* A ui_file implementation that maps onto two ui-file objects. */ - -class tee_file : public ui_file -{ -public: - /* Create a file which writes to both ONE and TWO. Ownership of - both files is up to the user. */ - tee_file (ui_file *one, ui_file *two); - ~tee_file () override; - - void write (const char *buf, long length_buf) override; - void write_async_safe (const char *buf, long length_buf) override; - void puts (const char *) override; - - bool isatty () override; - bool term_out () override; - bool can_emit_style_escape () override; - void flush () override; - - void emit_style_escape (const ui_file_style &style) override - { - m_one->emit_style_escape (style); - m_two->emit_style_escape (style); - } - - void puts_unfiltered (const char *str) override - { - m_one->puts_unfiltered (str); - m_two->puts_unfiltered (str); - } - -private: - /* The two underlying ui_files. */ - ui_file *m_one; - ui_file *m_two; -}; - /* A ui_file implementation that buffers terminal escape sequences. Note that this does not buffer in general -- it only buffers when an incomplete but potentially recognizable escape sequence is -- 2.49.0