]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Fix gdb.base/break-dbg.exp without xml support
authorTom de Vries <tdevries@suse.de>
Sat, 19 Jul 2025 15:08:44 +0000 (17:08 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 19 Jul 2025 15:08:44 +0000 (17:08 +0200)
With a gdb build without xml support and test-case gdb.base/break-dbg.exp, I
run into:
...
(gdb) catch syscall^M
warning: Can not parse XML syscalls information; \
  XML support was disabled at compile time.^M
Catchpoint 11 (any syscall)^M
(gdb) FAIL: $exp: catch syscall
...

Fix this by updating the regexp.

Tested on aarch64-linux.

Reviewed-By: Keith Seitz <keiths@redhat.com>
gdb/testsuite/gdb.base/break-dbg.exp

index 3652b8e4ef046aeb1e5b6c85217f66f4f3d67fd0..a7c7d927c737f2f179c97f8fc370379aa54d3bc6 100644 (file)
@@ -46,7 +46,17 @@ gdb_test "catch load" "^Catchpoint $decimal \\(load\\)"
 gdb_test "catch unload" "^Catchpoint $decimal \\(unload\\)"
 
 gdb_test "catch signal" "^Catchpoint $decimal \\(standard signals\\)"
-gdb_test "catch syscall" "^Catchpoint $decimal \\(any syscall\\)"
+
+set re_warning_xml_disabled \
+    [string_to_regexp \
+        [join \
+             [list \
+                  "warning: Can not parse XML syscalls information;" \
+                  "XML support was disabled at compile time."]]]
+gdb_test "catch syscall" \
+    [multi_line \
+        "^($re_warning_xml_disabled" \
+        ")?Catchpoint $decimal [string_to_regexp {(any syscall)}]"]
 
 gdb_test "watch -l global_var" "\[Ww]atchpoint $decimal: -location global_var"