From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11035 invoked by alias); 12 Nov 2007 05:27:21 -0000 Received: (qmail 11025 invoked by uid 22791); 12 Nov 2007 05:27:21 -0000 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Nov 2007 05:27:18 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BF3852A97E4; Mon, 12 Nov 2007 00:27:15 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mHO6aDqkmbnk; Mon, 12 Nov 2007 00:27:15 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 8AE8A2A9B17; Mon, 12 Nov 2007 00:27:09 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 49FBFE7ACA; Sun, 11 Nov 2007 21:27:06 -0800 (PST) Date: Mon, 12 Nov 2007 05:27:00 -0000 From: Joel Brobecker To: Eli Zaretskii Cc: gdb-patches@sourceware.org Subject: Re: [RFA/doco] Document "set/show print frame-arguments" Message-ID: <20071112052706.GB2141@adacore.com> References: <20071109191300.GC4339@adacore.com> <20071110181955.GA2141@adacore.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00226.txt.bz2 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 571 > > > Please use @dots{} here and elsewhere, it looks better in print. > > > > Should I use that in @smallexample too? > > Sure, why not? I was thinking that the @smallexample should probably be a verbatim copy of debugger output, and so the style should be consistent. But I used @dots like you said. > > +is replaced by @dots{}. In this case, the example above now becomes: > > @code{@dots{}} Oups, fixed. > Otherwise, fine with me. Thanks! Thanks. Attached is what I ended up checking in. The NEWS change is also now in. Thanks for your help, Eli. -- Joel --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="doc-frame-args.diff" Content-length: 2455 Index: gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.442 diff -u -p -r1.442 gdb.texinfo --- gdb.texinfo 5 Nov 2007 11:32:31 -0000 1.442 +++ gdb.texinfo 12 Nov 2007 05:11:01 -0000 @@ -6240,6 +6240,51 @@ Setting @var{number-of-elements} to zer Display the number of elements of a large array that @value{GDBN} will print. If the number is 0, then the printing is unlimited. +@item set print frame-arguments @var{value} +@cindex printing frame argument values +@cindex print all frame argument values +@cindex print frame argument values for scalars only +@cindex do not print frame argument values +This command allows to control how the values of arguments are printed +when the debugger prints a frame (@pxref{Frames}). The possible +values are: + +@table @code +@item all +The values of all arguments are printed. This is the default. + +@item scalars +Print the value of an argument only if it is a scalar. The value of more +complex arguments such as arrays, structures, unions, etc, is replaced +by @code{@dots{}}. Here is an example where only scalar arguments are shown: + +@smallexample +#1 0x08048361 in call_me (i=3, s=@dots{}, ss=0xbf8d508c, u=@dots{}, e=green) + at frame-args.c:23 +@end smallexample + +@item none +None of the argument values are printed. Instead, the value of each argument +is replaced by @code{@dots{}}. In this case, the example above now becomes: + +@smallexample +#1 0x08048361 in call_me (i=@dots{}, s=@dots{}, ss=@dots{}, u=@dots{}, e=@dots{}) + at frame-args.c:23 +@end smallexample +@end table + +By default, all argument values are always printed. But this command +can be useful in several cases. For instance, it can be used to reduce +the amount of information printed in each frame, making the backtrace +more readable. Also, this command can be used to improve performance +when displaying Ada frames, because the computation of large arguments +can sometimes be CPU-intensive, especiallly in large applications. +Setting @code{print frame-arguments} to @code{scalars} or @code{none} +avoids this computation, thus speeding up the display of each Ada frame. + +@item show print frame-arguments +Show how the value of arguments should be displayed when printing a frame. + @item set print repeats @cindex repeated array elements Set the threshold for suppressing display of repeated array --mojUlQ0s9EVzWg2t--