From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2610:1c1:1:606c::19:2]) by sourceware.org (Postfix) with ESMTPS id C31E93858405 for ; Sat, 22 Jan 2022 17:40:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C31E93858405 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits)) (Client CN "mx1.freebsd.org", Issuer "R3" (verified OK)) by mx2.freebsd.org (Postfix) with ESMTPS id 0D84D7B85A; Sat, 22 Jan 2022 17:40:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jh3Rm6XVTz3wQl; Sat, 22 Jan 2022 17:40:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642873220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PBt6UNqf9zHjZE7RoI/QQSGT5MBjG1uDFR402avbmfc=; b=dgbc4Sn+DyLNSrvOWhZFEc86nrPuLo044lhqquT+O/yYlsofalC8DHDOc0KmEXaDdJDuSi m2acLeuSJ6CiXyVVNlHhYXc/Cp5tdNtv8XNnNRoyIWirDYdm0dJP8jbqzPIWA8A0/pwYG2 ENhKA2O5wuar6oo+dBk05jMHjw/OavV2y1eYsEyqHHiNfB62QYaBU8kg3RONfQ9so5hXa6 3JEtjOeolS99WzLVlILA1gxvWzZIdNK/DZ581ah5L2oEoWCdsnQ5LYuiyzKXVQyvHbzK7f 8xYv2ItS4KsTbMpQAQX+jogwjNVNuqnTJSfcxDQDSqO65iKXpcNDMN+qW1rvxg== Received: from [IPV6:2601:648:8601:8b20:954f:bb36:9b91:458d] (unknown [IPv6:2601:648:8601:8b20:954f:bb36:9b91:458d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 11FF99208; Sat, 22 Jan 2022 17:40:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Sat, 22 Jan 2022 09:40:17 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH 00/19] Simplify GDB output functions Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20220122013801.666659-1-tom@tromey.com> From: John Baldwin In-Reply-To: <20220122013801.666659-1-tom@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642873220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PBt6UNqf9zHjZE7RoI/QQSGT5MBjG1uDFR402avbmfc=; b=hF3Rxlnc11MZnw8wMjSLTzLV2MVIMQ1KhQgBYegxm5bFMKj6O5W0Lps+tbQY1YfB/eb5du 8CgK08B8gx2CramVUW5ZZwS/d9jBTQOaUJD3gzPcxMeigTLOoOzmpjr0H/f52fY+71fDAf LX+bStRSThXUVonK5ElW6q5mBp3Jmn7gDUf/uDUVGbU1JmEOwEnQbpt3KOZFSZZgTmeU4W S9QT6nYAsF8wxkvSlVb9S+i1wKruhAX8AF3JjstKS/Trtgg//u05fRK6g78o+Pb1ab6Qqj 4As9Et46VpAdP5QVTfqAUwRBUZs+H1cbAKi5/wriQN2inP9hXu3mIOZfXQExfw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642873220; a=rsa-sha256; cv=none; b=SLiW0Px6MaEqV3bFldhsfWWDANxJAfA0fXNMCDBBNyfFoimYM24+Ldr4qQUXVrebRijHqZ Ga+V9tefYaVq9hA64jXNlsG+ni8D8Rvi2R6+ZkhNJsx4NNBiA7dQlllBa79dNp/ggldjR2 u5sDrjqI/hqhodBTi4gqD8ND4UUnVthoou4Ily/WTwDRJmeIxV0pV70knj0H56e4quj0J8 d2pwOLvfTEKhFPYyLgG5GI4unMJW3GNYEd/V4reHiwTlD18sKNYTzVW8FOjatl8fJXJnLk ijcCG4xfhYgI7kDWapD9hz+z1geNxnj9vSLKz3w4jM7Fis0eB6UGItDwQfoRDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jan 2022 17:40:25 -0000 On 1/21/22 5:37 PM, Tom Tromey wrote: > This series tries to untangle and simplify the GDB output functions. > > By the end of this series, whether a particular bit of output goes > through the filter will largely depend on the particular stream that > is being written to. This means that new code can be much simpler -- > there's no need to decide between using a _filtered or _unfiltered > form of a function, and in fact, that distinction will no longer > exist. (Some unfiltered output is still needed, but only to > gdb_stdout, and only via a single API. New such cases should be > rare.) > > A few cleanups are still possible after this series goes in. For > example, ui-file.c could be broken up a bit, and the pager > implementation should be moved out of utils.c. I also have a couple > of pager bug fixes that I will apply afterward. > > This series is based on a couple of still-pending output series that > I've already sent. I'll probably check those in reasonably soon. > > Regression tested on x86-64 Fedora 34. I only skimmed the patches, but I like the idea in general. I wasn't previously really aware of when to use filtered vs unfiltered and just depended on matching existing code in other targets, etc. To that end I appreciate making the "default" API clearer. I do think having to use 'gdb_*' for functions that would alias stdio is slightly unfortunate, but I understand the reason and I don't have a better naming suggestion (gdb_* is consistent with other things like our local versions of STL types, etc. so is the best choice I think) -- John Baldwin