Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/doco] Document "set/show print frame-arguments"
Date: Fri, 09 Nov 2007 19:13:00 -0000	[thread overview]
Message-ID: <20071109191300.GC4339@adacore.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

Hello,

Here is the documentation related to the "set/show print frame-arguments"
that I recently added.

2007-11-09  Joel Brobecker  <brobecker@adacore.com>

        * gdb.texinfo (Print Settings): Add documentation for "set/show
        print frame-arguments".

I am debating whether the last paragraphe should be merged with the
first one, or not...

Thanks,
-- 
Joel

[-- Attachment #2: args-doc.diff --]
[-- Type: text/plain, Size: 1890 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	9 Nov 2007 18:37:05 -0000
@@ -6250,6 +6250,41 @@ identical repetitions, instead of displa
 themselves.  Setting the threshold to zero will cause all elements to
 be individually printed.  The default threshold is 10.
 
+@item set print frame-arguments @var{value}
+This command allows to control how the value of arguments are printed
+when the debugger prints a frame (@pxref{Frames}).  The possible
+values are:
+
+@table @code
+@item all
+The value of all arguments is 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{...}. Here is an example where only scalar arguments are shown:
+
+@smallexample
+#1  0x08048361 in call_me (i=3, s=..., ss=0xbf8d508c, u=..., 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{...}. In this case, the example above now becomes:
+
+@smallexample
+#1  0x08048361 in call_me (i=..., s=..., ss=..., u=..., e=...) at frame-args.c:23
+@end smallexample
+@end table
+
+By default, all argument values are always printed. But this command
+can be useful to make a backtrace more readable, for instance, by
+reducing the amount of information printed for each frame, particularly
+when large objects would normally be printed.
+
+@item show print frame-arguments
+Show how the value of arguments should be displayed when printing a frame.
+
 @item show print repeats
 Display the current threshold for printing repeated identical
 elements.

             reply	other threads:[~2007-11-09 19:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-09 19:13 Joel Brobecker [this message]
2007-11-10 11:11 ` Eli Zaretskii
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

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=20071109191300.GC4339@adacore.com \
    --to=brobecker@adacore.com \
    --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