From: Pedro Alves <palves@redhat.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>,
gdb-patches@sourceware.org
Subject: Re: PING^3 Re: [RFA] Implement 'print -raw-values' and 'set print raw-values on|off'
Date: Wed, 04 Dec 2019 16:18:00 -0000 [thread overview]
Message-ID: <896334b9-1d3e-d485-7d1b-2e23dac2dfaa@redhat.com> (raw)
In-Reply-To: <c4e1de4c5456cbcbad307785d9ef27bb928d8a04.camel@skynet.be>
On 10/20/19 11:26 AM, Philippe Waroquiers wrote:
> --- a/gdb/printcmd.c
> +++ b/gdb/printcmd.c
> @@ -1152,6 +1152,9 @@ print_command_parse_format (const char **expp, const char *cmdname,
> {
> const char *exp = *expp;
>
> + /* opts->raw value might already have been set by 'set print raw-values'
> + or by using 'print -raw-values'.
> + So, do not set opts->raw to 0, only set it to 1 if /r is given. */
> if (exp && *exp == '/')
Given this ...
> diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
> index 82e7e65031..3d88f7e9f2 100644
> --- a/gdb/testsuite/gdb.python/py-prettyprint.exp
> +++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
> @@ -199,3 +199,13 @@ gdb_test_no_output "python enable_lookup_function ()"
>
> gdb_test "print ss" " = a=< a=<1> b=<$hex>> b=< a=<2> b=<$hex>>" \
> "print ss enabled #2"
> +
> +gdb_test "print -raw-values -- ss" " = {a = {a = 1, b = $hex}, b = {a = 2, b = $hex}}" \
> + "print -raw-values -- ss"
> +
> +gdb_test "print -raw-values on -- ss" " = {a = {a = 1, b = $hex}, b = {a = 2, b = $hex}}" \
> + "print -raw-values on -- ss"
> +
... could you add some tests combining /r and -raw-values, to show & exercise
what the comment above means?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2019-12-04 16:18 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
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 [this message]
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=896334b9-1d3e-d485-7d1b-2e23dac2dfaa@redhat.com \
--to=palves@redhat.com \
--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