From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: gdb-patches@sourceware.org
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Subject: [RFA 3/3] Document 'set print frame-info|frame-arguments presence'.
Date: Sat, 04 May 2019 21:57:00 -0000 [thread overview]
Message-ID: <20190504215538.29821-4-philippe.waroquiers@skynet.be> (raw)
In-Reply-To: <20190504215538.29821-1-philippe.waroquiers@skynet.be>
---
gdb/NEWS | 12 +++++++++++
gdb/doc/ChangeLog | 5 +++++
gdb/doc/gdb.texinfo | 51 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 68 insertions(+)
diff --git a/gdb/NEWS b/gdb/NEWS
index b21b2cbb47..893b220acc 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -48,6 +48,18 @@ show may-call-functions
an error when a command (such as print expression) calls a function
in the program.
+set print frame-info [short_loc|location|loc_and_address|src_and_loc
+ |src_line|auto]
+show print frame-info
+ This controls what frame information is printed by the commands printing
+ a frame.
+
+* Changed commands
+
+set print frame-arguments
+ The new value 'presence' indicates to only indicate the presence of
+ arguments using ..., instead of printing argument names and values.
+
*** Changes in GDB 8.3
* GDB and GDBserver now support access to additional registers on
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index a26e20c823..53ba452a7f 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -12825,3 +12825,8 @@ fill-column: 74
version-control: never
coding: utf-8
End:
+2019-05-04 Philippe Waroquiers <philippe.waroquiers@skynet.be>
+
+ * gdb.texinfo (Print Settings): Document 'set|show print frame-info'.
+ (Backtraces): Reference 'set print frame-info'.
+
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index dd8ae91b93..5d065c9c79 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -7554,6 +7554,8 @@ The value of parameter @code{data} in frame 1 has been replaced by
only if it is a scalar (integer, pointer, enumeration, etc). See command
@kbd{set print frame-arguments} in @ref{Print Settings} for more details
on how to configure the way function parameter values are printed.
+The command @kbd{set print frame-info} (see @ref{Print Settings}) controls
+what frame information is printed.
@cindex optimized out, in backtrace
@cindex function call arguments, optimized out
@@ -10386,6 +10388,7 @@ If the number is 0, then the printing is unlimited.
@cindex print all frame argument values
@cindex print frame argument values for scalars only
@cindex do not print frame argument values
+@cindex do not print frame argument names
This command allows to control how the values of arguments are printed
when the debugger prints a frame (@pxref{Frames}). The possible
values are:
@@ -10413,6 +10416,17 @@ is replaced by @code{@dots{}}. In this case, the example above now becomes:
#1 0x08048361 in call_me (i=@dots{}, s=@dots{}, ss=@dots{}, u=@dots{}, e=@dots{})
at frame-args.c:23
@end smallexample
+
+@item presence
+Only the presence of arguments is signaled by @code{@dots{}}.
+The @dots{} are not printed for function without any arguments.
+None of the argument names and values are printed.
+In this case, the example above now becomes:
+
+@smallexample
+#1 0x08048361 in call_me (@dots{}) at frame-args.c:23
+@end smallexample
+
@end table
By default, only scalar arguments are printed. This command can be used
@@ -10556,6 +10570,43 @@ entry resolution see @ref{set debug entry-values}.
Show the method being used for printing of frame argument values at function
entry.
+@item set print frame-info @var{value}
+@kindex set print frame-info
+@cindex printing frame information
+@cindex frame information, printing
+This command allows to control the information printed when
+the debugger prints a frame. See @ref{Frames} and @ref{Backtrace}
+for a general explanation about frames and frame information.
+Note that some other settings (such as @code{set print frame-arguments}
+and @code{set print address}) are also influencing if and how some frame
+information is displayed. In particular, the frame program counter is never
+printed if @code{set print address} is off.
+
+The possible values for @code{set print frame-info} are:
+@table @code
+@item short_loc
+Print the frame level, the program counter if not at the
+beginning of the location source line, the function, the function
+arguments.
+@item location
+Same as @code{short_loc} but also print the source file and source line
+number.
+@item loc_and_address
+Same as @code{location} but print the program counter even if located at the
+beginning of the location source line.
+@item src_line
+Print the program counter if not at the beginning of the location
+source line, the line number and the source line.
+@item src_and_loc
+Print what @code{location} and @code{src_line} are printing.
+@item auto
+The information printed for a frame is decided automatically
+by the @value{GDBN} command that prints a frame.
+For example, @code{frame} prints the information printed by
+@code{src_and_loc} while @code{stepi} will switch between
+@code{src_line} and @code{src_and_loc} depending on the program counter.
+@end table
+
@item set print repeats @var{number-of-repeats}
@itemx set print repeats unlimited
@cindex repeated array elements
--
2.20.1
next prev parent reply other threads:[~2019-05-04 21:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-04 21:57 [RFA 0/3] Better control about frame information to print Philippe Waroquiers
2019-05-04 21:57 ` Philippe Waroquiers [this message]
2019-05-05 16:43 ` [RFA 3/3] Document 'set print frame-info|frame-arguments presence' Eli Zaretskii
2019-05-04 21:57 ` [RFA 2/3] Test " Philippe Waroquiers
2019-05-04 21:57 ` [RFA 1/3] Implement " Philippe Waroquiers
2019-05-05 20:24 ` Andreas Schwab
2019-05-06 19:43 ` Tom Tromey
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=20190504215538.29821-4-philippe.waroquiers@skynet.be \
--to=philippe.waroquiers@skynet.be \
--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