callfuncs.exp: avoid spurious register differences in sparc64 targets.
authorJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 20 Nov 2015 10:36:07 +0000 (11:36 +0100)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 20 Nov 2015 10:36:07 +0000 (11:36 +0100)
The Linux kernel disables the FPU upon returning to userland.  This
introduces spurious failures in the register preservation tests in
callfuncs.exp, since the pstate.PEF bit gets cleared after system
calls.

This patch filters out the pstate register in sparc64-*-linux-gnu
targets, so the relevant tests are no longer fooled and pass.

gdb/testsuite/ChangeLog:

2015-11-20  Jose E. Marchesi  <jose.marchesi@oracle.com>

        * gdb.base/callfuncs.exp (fetch_all_registers): Filter out the
          pstate register when comparing registers values in
          sparc64-*-linux-gnu targets to avoid spurious differences.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/callfuncs.exp

index 68d564f3236833b43befc1d6cc1827739394ca41..68ede89f5662c34594751587ed40023f7a264a64 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-20  Jose E. Marchesi  <jose.marchesi@oracle.com>
+
+        * gdb.base/callfuncs.exp (fetch_all_registers): Filter out the
+       pstate register when comparing registers values in
+       sparc64-*-linux-gnu targets to avoid spurious differences.
+
 2015-11-20  Jose E. Marchesi  <jose.marchesi@oracle.com>
 
        * gdb.arch/sparc-sysstep.c: Include unistd.h for getpid.
index fda3cb79232dfb95c4bfd20e91f89e533a8280df..28e2fe11510ca88531cec6e4ba0810ced65a62d4 100644 (file)
@@ -254,6 +254,16 @@ proc fetch_all_registers {test} {
            }
            exp_continue
        }
+       -re  "^pstate\[ \t\]+\[^\r\n\]+\r\n" {
+           if [istarget "sparc64-*-linux-gnu"] {
+               # Filter out the pstate register, since in sparc64
+               # targets the Linux kernel disables pstate.PEF when
+               # returning from traps, giving spurious differences.
+           } else {
+               lappend all_registers_lines $expect_out(0,string)
+           }
+           exp_continue
+       }
        -re "^last_break\[ \t\]+\[^\r\n\]+\r\n" {
            if [istarget "s390*-*-*"] {
                # Filter out last_break which is read-only,
This page took 0.031509 seconds and 4 git commands to generate.