[v3,1/2] gdb/testsuite: Declare that riscv*-*-linux* cannot hardware_single_step

Message ID 20210707003043.447755-2-lsix@lancelotsix.com
State New
Headers show
Series
  • Fix gdb.base/sigstep.exp for riscv64-linux
Related show

Commit Message

Simon Marchi via Gdb-patches July 7, 2021, 12:30 a.m.
Many tests fail in gdb/testsuite/gdb.base/sigstep.exp on
riscv64-linux-gnu.  Those tests check that when stepping, if the
debuggee received a signal it should step inside the signal handler.

This feature requires hardware support for single stepping (or at least
kernel support), but none are available on riscv*-linux-gnu hosts.

This patch adds RISC-V to the list of configurations that does not
have hardware single step capability, disabling tests relying on such
feature.

Tested on riscv64-linux-gnu.
---
 gdb/testsuite/lib/gdb.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.30.2

Comments

Pedro Alves July 8, 2021, 10 a.m. | #1
On 2021-07-07 1:30 a.m., Lancelot SIX via Gdb-patches wrote:
> Many tests fail in gdb/testsuite/gdb.base/sigstep.exp on

> riscv64-linux-gnu.  Those tests check that when stepping, if the

> debuggee received a signal it should step inside the signal handler.

> 

> This feature requires hardware support for single stepping (or at least

> kernel support), but none are available on riscv*-linux-gnu hosts.

> 

> This patch adds RISC-V to the list of configurations that does not

> have hardware single step capability, disabling tests relying on such

> feature.

> 

> Tested on riscv64-linux-gnu.


Still OK.

Patch

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 38f40fdddb5..23798217bbb 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2831,7 +2831,7 @@  proc can_hardware_single_step {} {
 
     if { [istarget "arm*-*-*"] || [istarget "mips*-*-*"]
 	 || [istarget "tic6x-*-*"] || [istarget "sparc*-*-linux*"]
-	 || [istarget "nios2-*-*"] } {
+	 || [istarget "nios2-*-*"] || [istarget "riscv*-*-linux*"] } {
 	return 0
     }