public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [committed][gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie
Date: Tue, 28 Jun 2022 17:10:10 +0200	[thread overview]
Message-ID: <45414685-748a-00f4-4bd9-6a0d4d53eaa4@suse.de> (raw)
In-Reply-To: <20220622130529.GA2260@delia.com>

On 6/22/22 15:05, Tom de Vries wrote:
> Hi,
> 
> When running test-case gdb.reverse/i387-env-reverse.exp for x86_64-linux with
> target board unix/-m32/-fPIE/-pie, we run into:
> ...
> (gdb) PASS: gdb.reverse/i387-env-reverse.exp: push st0
> info register eax^M
> eax            0x56550000          1448411136^M
> (gdb) FAIL: gdb.reverse/i387-env-reverse.exp: verify eax == 0x8040000
> ...
> 
> The problem is that the tested instruction (fstsw) only sets $ax, not $eax.
> 
> Fix this by verifying $ax instead of $eax.
> 
> Tested on x86_64-linux with target boards unix/-m32 and unix/-m32/-fPIE/-pie.
> 
> Any comments?

Committed.

Thanks,
- Tom

> [gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie
> 
> ---
>   gdb/testsuite/gdb.reverse/i387-env-reverse.exp | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
> index a0a79c22ed0..53fee0986df 100644
> --- a/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
> +++ b/gdb/testsuite/gdb.reverse/i387-env-reverse.exp
> @@ -64,7 +64,7 @@ with_test_prefix "forward" {
>       gdb_test "n" "asm.*fstsw.*"               "store status word in EAX"
>       gdb_test "n" "asm.*fld1.*"                "push st0"
>   
> -    gdb_test "info register eax" "eax *0x8040000.*\[ \t\]+.*"  "verify eax == 0x8040000"
> +    gdb_test "info register ax" "ax *0x0.*\[ \t\]+.*"  "verify eax == 0x0"
>       gdb_test "info register fstat" "fstat *0.*\[ \t\]+.*"      "verify fstat == 0"
>       gdb_test "info register ftag" "ftag *0xffff.*\[ \t\]+.*"   "verify ftag == 0xffff"
>   

      reply	other threads:[~2022-06-28 15:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22 13:05 [PATCH][gdb/testsuite] " Tom de Vries
2022-06-28 15:10 ` Tom de Vries [this message]

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=45414685-748a-00f4-4bd9-6a0d4d53eaa4@suse.de \
    --to=tdevries@suse.de \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).