From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id CEB893858C74 for ; Wed, 9 Mar 2022 19:51:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CEB893858C74 Received: from [2001:470:142:3::e] (port=42486 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nS2LA-0002Wv-Ih; Wed, 09 Mar 2022 14:51:24 -0500 Received: from [87.69.77.57] (port=4843 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nS2L5-0002Ai-Vb; Wed, 09 Mar 2022 14:51:18 -0500 Date: Wed, 09 Mar 2022 21:51:10 +0200 Message-Id: <83o82eewgh.fsf@gnu.org> From: Eli Zaretskii To: "Maciej W. Rozycki" Cc: gdb-patches@sourceware.org, simonsobisch@web.de, tom@tromey.com, aburgess@redhat.com In-Reply-To: (macro@embecosm.com) Subject: Re: [PATCH v4 7/8] GDB: Add a character string limiting option References: X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Level: * 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: Wed, 09 Mar 2022 19:51:26 -0000 > Date: Wed, 9 Mar 2022 19:18:46 +0000 (GMT) > From: "Maciej W. Rozycki" > Cc: Simon Sobisch , Tom Tromey , > Andrew Burgess > > --- src.orig/gdb/NEWS > +++ src/gdb/NEWS > @@ -119,6 +119,17 @@ show ada source-charset > values for this follow the values that can be passed to the GNAT > compiler via the '-gnati' option. The default is ISO-8859-1. > > +set print characters LIMIT > +show print characters > +print -characters LIMIT > + This new setting is like 'set print elements', but controls how many "This new setting" is okay for "set print characters", but not for "print -characters". I suggest to move "print -characters" to after the description, and then to say that its effect is the same as a temporary use of "set print characters". > +@item -characters @var{number-of-characters}|@code{elements}|@code{unlimited} > +Set limit on string characters to print. The value @code{elements} > +causes the limit on array elements to print to be used. The value ^^^^^^^^^^^^^^ "characters", not "array elements", right? And, btw, we actually count bytes, not characters, right? If the string contains multibyte sequences, we don't count characters. I think this should be mentioned. > +@item -elements @var{number-of-elements}|@code{unlimited} > +Set limit on array elements and optionally string characters to print. > +See @ref{set print characters} and the @code{-characters} option above ^ Please insert a comma after the closing brace. Some relatively old versions of makeinfo require that. > +for when this option applies to strings. The value @code{unlimited} > +causes there to be no limit. Related setting: @ref{set print elements}. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is not a very good idea. Texinfo is not HTML, so the results produced for this in some formats will look awkward or even downright incorrect English. It is better to use something like: @xref{set print elements}, for a related CLI command. Thanks.