public inbox for
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie
@ 2022-06-27 10:47 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-06-27 10:47 UTC (permalink / raw)
  To: gdb-cvs;h=772f8196d621a8009035ff4cb8aab2d7343269a9

commit 772f8196d621a8009035ff4cb8aab2d7343269a9
Author: Tom de Vries <>
Date:   Mon Jun 27 12:47:26 2022 +0200

    [gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie
    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.

 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"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-27 10:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 10:47 [binutils-gdb] [gdb/testsuite] Fix gdb.reverse/i387-env-reverse.exp for -pie Tom de Vries

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).