From: Eli Zaretskii <eliz@gnu.org>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Implement 'print -raw-values' and 'set print raw-values on|off'
Date: Thu, 08 Aug 2019 17:25:00 -0000 [thread overview]
Message-ID: <8336ibbmd1.fsf@gnu.org> (raw)
In-Reply-To: <20190807193924.32268-1-philippe.waroquiers@skynet.be> (message from Philippe Waroquiers on Wed, 7 Aug 2019 21:39:24 +0200)
> From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
> Date: Wed, 7 Aug 2019 21:39:24 +0200
>
> diff --git a/gdb/NEWS b/gdb/NEWS
> index fa01adf6e8..8f27b102ea 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -101,6 +101,12 @@ show print max-depth
> The default max-depth is 20, but this can be set to unlimited to get
> the old behavior back.
>
> +set print raw-values [on|off]
> +show print raw-values
> + By default, GDB applies the enabled pretty printers when printing a
> + value. This allows to ignore the enabled pretty printers for a series
> + of commands. The default is 'off'.
> +
> set logging debugredirect [on|off]
> By default, GDB debug output will go to both the terminal and the logfile.
> Set if you want debug output to go only to the log file.
> @@ -200,6 +206,7 @@ maint show test-options-completion-result
> -null-stop [on|off]
> -object [on|off]
> -pretty [on|off]
> + -raw-values [on|off]
> -repeats NUMBER|unlimited
> -static-members [on|off]
> -symbol [on|off]
> @@ -244,11 +251,11 @@ maint show test-options-completion-result
> "on" if omitted. This allows writing compact command invocations,
> like for example:
>
> - (gdb) p -r -p -o 0 -- *myptr
> + (gdb) p -ra -p -o 0 -- *myptr
>
> The above is equivalent to:
>
> - (gdb) print -raw -pretty -object off -- *myptr
> + (gdb) print -raw-values -pretty -object off -- *myptr
>
> ** The "info types" command now supports the '-q' flag to disable
> printing of some header information in a similar fashion to "info
This part is OK.
> +@item set print raw-values off
> +Print values in pretty-printed form, if there is a pretty-printer
> +for the value (@pxref{Pretty Printing}),
> +otherwise print the value in raw form.
> +This is the default.
I suggest a slight rewording:
+@anchor{set print raw-values}
+@item set print raw-values on
+Print values in raw form, without applying the pretty
+printers for the value.
+
+@item set print raw-values off
+Print values in pretty-printed form, if there is a pretty-printer
+for the value (@pxref{Pretty Printing}),
+otherwise print the value in raw form.
+
+The default setting is OFF.
> +The print option @code{-raw-values} and @value{GDBN} setting @xref{set
> +print raw-values} can be used to print values without applying the
This use of @xref is a bad idea, because the printed output and even
the Info output that result from this look like a typo. For starters,
@xref produces a capitalized "See", which is inappropriate in the
middle of a sentence.
My suggestion is to use the following style:
The print option @code{-raw-values} and @value{GDBN} setting
@code{set print raw-values} (@pxref{set print raw-values}) can be
used to print ...
Yes, this repeats some of the text, but there's nothing much we can do
about that.
> +Similarly, the backtrace option @code{-raw-frame-arguments} and
> +@value{GDBN} setting @xref{set print raw-frame-arguments} can be used
> +to ignore the enabled pretty printers when printing frame argument
> +values
Likewise here. Also, a period is missing at the end of the last
sentence.
Thanks.
next prev parent reply other threads:[~2019-08-08 17:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 19:39 Philippe Waroquiers
2019-08-07 21:38 ` Tom Tromey
2019-08-08 18:59 ` Philippe Waroquiers
2019-08-08 17:25 ` Eli Zaretskii [this message]
2019-09-07 11:42 ` PING " Philippe Waroquiers
2019-09-29 15:29 ` PING^2 " Philippe Waroquiers
2019-09-29 15:33 ` Eli Zaretskii
2019-09-29 15:49 ` Philippe Waroquiers
2019-10-20 10:26 ` PING^3 " Philippe Waroquiers
2019-12-04 16:18 ` Pedro Alves
2019-12-04 3:43 ` Simon Marchi
2019-12-04 16:24 ` Pedro Alves
2019-12-04 16:34 ` Simon Marchi
2019-12-04 17:19 ` Pedro Alves
2019-12-07 14:01 ` Philippe Waroquiers
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=8336ibbmd1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=philippe.waroquiers@skynet.be \
/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