Skip to content

Commit 2b374e9

Browse files
committed
[gdb/testsuite] Fix gdb.base/break-dbg.exp without xml support
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 <[email protected]>
1 parent 028ad04 commit 2b374e9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

gdb/testsuite/gdb.base/break-dbg.exp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,17 @@ gdb_test "catch load" "^Catchpoint $decimal \\(load\\)"
4646
gdb_test "catch unload" "^Catchpoint $decimal \\(unload\\)"
4747

4848
gdb_test "catch signal" "^Catchpoint $decimal \\(standard signals\\)"
49-
gdb_test "catch syscall" "^Catchpoint $decimal \\(any syscall\\)"
49+
50+
set re_warning_xml_disabled \
51+
[string_to_regexp \
52+
[join \
53+
[list \
54+
"warning: Can not parse XML syscalls information;" \
55+
"XML support was disabled at compile time."]]]
56+
gdb_test "catch syscall" \
57+
[multi_line \
58+
"^($re_warning_xml_disabled" \
59+
")?Catchpoint $decimal [string_to_regexp {(any syscall)}]"]
5060

5161
gdb_test "watch -l global_var" "\[Ww]atchpoint $decimal: -location global_var"
5262

0 commit comments

Comments
 (0)