From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] Fix scm-ports.exp regression
Date: Fri, 05 Jan 2018 17:01:00 -0000 [thread overview]
Message-ID: <37ddb96c-2b32-2fcd-9c36-17f32d8701e3@redhat.com> (raw)
In-Reply-To: <20180103182048.8495-1-tom@tromey.com>
On 01/03/2018 06:20 PM, Tom Tromey wrote:
> In https://sourceware.org/ml/gdb-patches/2017-12/msg00215.html, Jan
> pointed out that the scalar printing patches caused a regression in
> scm-ports.exp on x86.
>
> I think the simplest fix is to use "print/u" rather than "print/d" to
> get the value of sp_reg in the test case.
Can you expand a bit on this rationale, please?
There's:
(parse-and-eval \"*(char*) \$sp\")
in the context of the diff. Is that related? I ask because
that "char" in there would look like something that could print
as signed or unsigned depending on target.
It'll probably be obvious with a bit more info.
Thanks,
Pedro Alves
>
> Tested on x86-64 Fedora 26 using an ordinary build and also a -m32
> build.
>
> 2018-01-03 Tom Tromey <tom@tromey.com>
>
> * gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to
> compute sp_reg.
> ---
> gdb/testsuite/ChangeLog | 5 +++++
> gdb/testsuite/gdb.guile/scm-ports.exp | 2 +-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
> index 500dbddf1c..e3903cca6b 100644
> --- a/gdb/testsuite/ChangeLog
> +++ b/gdb/testsuite/ChangeLog
> @@ -1,3 +1,8 @@
> +2018-01-03 Tom Tromey <tom@tromey.com>
> +
> + * gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to
> + compute sp_reg.
> +
> 2018-01-03 Xavier Roirand <roirand@adacore.com>
>
> * gdb.ada/excep_handle.exp: New testcase.
> diff --git a/gdb/testsuite/gdb.guile/scm-ports.exp b/gdb/testsuite/gdb.guile/scm-ports.exp
> index 48af5e30e1..04170ef4b8 100644
> --- a/gdb/testsuite/gdb.guile/scm-ports.exp
> +++ b/gdb/testsuite/gdb.guile/scm-ports.exp
> @@ -104,7 +104,7 @@ proc test_mem_port_rw { kind } {
> "get sp reg"
> # Note: Only use $sp_reg for gdb_test result matching, don't use it in
> # gdb commands. Otherwise transcript.N becomes unusable.
> - set sp_reg [get_integer_valueof "\$sp" 0]
> + set sp_reg [get_valueof /u "\$sp" 0]
> gdb_test_no_output "guile (define byte-at-sp (parse-and-eval \"*(char*) \$sp\"))" \
> "save current value at sp"
> # Pass the result of parse-and-eval through value-fetch-lazy!,
>
next prev parent reply other threads:[~2018-01-05 17:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 18:20 Tom Tromey
2018-01-05 17:01 ` Pedro Alves [this message]
2018-01-09 18:27 ` Tom Tromey
2018-01-15 16:51 ` Pedro Alves
2018-01-15 18:17 ` Tom Tromey
2018-01-15 20:59 ` Sergio Durigan Junior
2018-01-15 22:10 ` Tom Tromey
2018-01-16 7:39 ` Joel Brobecker
2018-01-05 17:59 Doug Evans via gdb-patches
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=37ddb96c-2b32-2fcd-9c36-17f32d8701e3@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.com \
/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