]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.base/reset-catchpoint-cond.exp for !supports_catch_syscall
authorTom de Vries <tdevries@suse.de>
Wed, 8 Jan 2025 09:06:28 +0000 (10:06 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 8 Jan 2025 09:06:28 +0000 (10:06 +0100)
I ran test-case gdb.base/reset-catchpoint-cond.exp on riscv64-linux, and got:
...
(gdb) catch syscall write^M
The feature 'catch syscall' is not supported on this architecture yet.^M
(gdb) FAIL: $exp: mode=syscall: catch syscall write
...

Fix this by checking for supports_catch_syscall.

Tested on riscv64-linux and x86_64-linux.

gdb/testsuite/gdb.base/reset-catchpoint-cond.exp

index dabacd474671bb4b6bcb5d37ab7c4f8fe6452b4d..d9539383c95fba6777c6f34ea04b90845d2ea5f0 100644 (file)
@@ -165,7 +165,8 @@ proc run_test { mode } {
 
 # Run the tests.
 foreach_with_prefix mode { syscall signal fork } {
-    if { $mode == "syscall" && ![allow_xml_test] } {
+    if { $mode == "syscall"
+        && ( ![allow_xml_test] || ![supports_catch_syscall] ) } {
        continue
     }
     run_test $mode