diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index b4771be3731..188e6b13588 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-05-03 Andrew Burgess + + * gdb.base/callfuncs.exp (fetch_all_registers): Add riscv register + filter pattern. + 2018-05-02 Pedro Alves * gdb.base/breakpoint-in-ro-region.exp: Adjust to to_resume and diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 94636938752..c5e39918c2a 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -285,6 +285,16 @@ proc fetch_all_registers {test} { } exp_continue } + -re "^\(?:cycle\|instret\)\[ \t\]+\[^\r\n\]+\r\n" { + if [istarget "riscv*-*-*"] { + # Filter out the cycle counter and instructions + # retired counter CSRs which are read-only, giving + # spurious differences. + } else { + lappend all_registers_lines $expect_out(0,string) + } + exp_continue + } -re "^\[^ \t\]+\[ \t\]+\[^\r\n\]+\r\n" { lappend all_registers_lines $expect_out(0,string) exp_continue