From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by sourceware.org (Postfix) with ESMTPS id DE4253858C2D for ; Thu, 24 Mar 2022 18:05:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DE4253858C2D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f46.google.com with SMTP id u3so7783926wrg.3 for ; Thu, 24 Mar 2022 11:05:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=Xk9l3xqILuld7s+BNFeYMfXtve8dphOI+PEOFajHRfQ=; b=xHGUn7MaMneWA+3a5dXqr/a41QUUxhAwYlpBOphrVigRRXEgexSxvDeO7CQqkswOxx PlL3icNXNafIdesWUtHXFZDJOZCl77Gwey7wUlNYoJKIxYT4oagsW04HxYDC0/pYUlK9 coGCtHQCGavRo6MekxayZpKbBUlLNRmI8QgUefsRwbKDUfrr7o8s72J2iyZprSZ+mQVk AjH3UJXzVHnai4Fcn02YhpT2EeqazIhsKSBljs/DUhhAyLEUrW2DKDCHjsBTXj54GW2g XIajWlrz4NlStJKE9Wu76PUFURuRyLm9CcW5jkwTevW2cqki3/A27nvUjFbYQp2C9s8H drBg== X-Gm-Message-State: AOAM533WwUpdIFhdiv+Oq/ouEDGfVQCSRLyWZ43sL6j0E6pV6fiVPI5a PuYugBgxxCLa3MGdEd8HsbJ695CDEmk= X-Google-Smtp-Source: ABdhPJwdtEuSF/eARRFBT6+Mtqqr82eNZ97xQoMqpLFAbx9wWY/nUyaeexRNsGNmOBOePrdEz1t6qw== X-Received: by 2002:adf:d1ee:0:b0:204:1f72:2d78 with SMTP id g14-20020adfd1ee000000b002041f722d78mr5592641wrd.471.1648145147577; Thu, 24 Mar 2022 11:05:47 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id x3-20020a5d6b43000000b001e317fb86ecsm3087359wrw.57.2022.03.24.11.05.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Mar 2022 11:05:46 -0700 (PDT) Message-ID: <82655a78-dbee-1ee6-a2aa-0d620ea21aeb@palves.net> Date: Thu, 24 Mar 2022 18:05:45 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 18/19] Minor comment updates in utils.h Content-Language: en-US To: Tom Tromey , gdb-patches@sourceware.org References: <20220122013801.666659-1-tom@tromey.com> <20220122013801.666659-19-tom@tromey.com> From: Pedro Alves In-Reply-To: <20220122013801.666659-19-tom@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Thu, 24 Mar 2022 18:05:50 -0000 Just some nits. On 2022-01-22 01:38, Tom Tromey wrote: > /* Truly global ui_file streams. These are all defined in main.c. */ > > -/* Target output that should bypass normal stdout/stderr filtering. > - For moment, always call this stream using *_unfiltered. In the > - very near future that restriction shall be removed - either call > - shall be unfiltered. (cagney 1999-07-02). */ > +/* Target output that should bypass the pager, if one is in use. */ > extern struct ui_file *gdb_stdtarg; > extern struct ui_file *gdb_stdtargerr; > extern struct ui_file *gdb_stdtargin; > @@ -224,12 +217,6 @@ extern struct ui_file *gdb_stdtargin; > > extern void set_screen_width_and_height (int width, int height); > > -/* More generic printf like operations. Filtered versions may return > - non-locally on error. As an extension over plain printf, these > - support some GDB-specific format specifiers. Particularly useful > - here are the styling formatters: '%p[', '%p]' and '%ps'. See > - ui_out::message for details. */ > - This comment might have been originally put here and not close to gdb_printf (old printf_filtered) because it was alluding to the whole family of stdio.h functions, puts, putc, etc. Maybe leave such a comment here, like: /* Generic stdio-like operations. */ > extern void gdb_puts (const char *, struct ui_file *); > > extern int gdb_putc (int c, struct ui_file *); > @@ -245,6 +232,11 @@ extern void gdb_vprintf (const char *, va_list) ATTRIBUTE_PRINTF (1, 0); > extern void gdb_vprintf (struct ui_file *, const char *, va_list) > ATTRIBUTE_PRINTF (2, 0); Since GDB-specific format specifiers apply to gdb_vprintf as well at least, then it seems to me from the diff context that the comment should be above it, not below. You may want to hyphenate "printf like" as printf-like instead to make it a bit clearer. Maybe remove the "More" as well, I'm not sure why it is there, is there some preceding comment talking about generic printf like operations, such that here we'd have more of the same? > > +/* More generic printf like operations. As an extension over plain > + printf, these support some GDB-specific format specifiers. > + Particularly useful here are the styling formatters: '%p[', '%p]' > + and '%ps'. See ui_out::message for details. */ > + > extern void gdb_printf (struct ui_file *, const char *, ...) > ATTRIBUTE_PRINTF (2, 3); >