From: Joel Brobecker <brobecker@adacore.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/doco] Document "set/show print frame-arguments"
Date: Mon, 12 Nov 2007 05:27:00 -0000 [thread overview]
Message-ID: <20071112052706.GB2141@adacore.com> (raw)
In-Reply-To: <uejexp6jc.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 571 bytes --]
> > > 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
[-- Attachment #2: doc-frame-args.diff --]
[-- Type: text/plain, Size: 2455 bytes --]
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
next prev parent reply other threads:[~2007-11-12 5:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-09 19:13 Joel Brobecker
2007-11-10 11:11 ` Eli Zaretskii
2007-11-10 18:20 ` Joel Brobecker
2007-11-11 7:48 ` Eli Zaretskii
2007-11-12 5:27 ` Joel Brobecker [this message]
2007-11-10 11:11 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071112052706.GB2141@adacore.com \
--to=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox