set test "break <MixedCaseFunc>, in C"
gdb_test_multiple "break <MixedCaseFunc>" $test {
- -re "Function \"<MixedCaseFunc>\" not defined\..*Make breakpoint pending on future shared library load.*y or .n.. $" {
+ -re "Function \"<MixedCaseFunc>\" not defined\\..*Make breakpoint pending on future shared library load.*y or .n.. $" {
gdb_test_no_output "n" $test
}
}
set test "break <NoDebugMixedCaseFunc>, in C"
gdb_test_multiple "break <NoDebugMixedCaseFunc>" $test {
- -re "Function \"<NoDebugMixedCaseFunc>\" not defined\..*Make breakpoint pending on future shared library load.*y or .n.. $" {
+ -re "Function \"<NoDebugMixedCaseFunc>\" not defined\\..*Make breakpoint pending on future shared library load.*y or .n.. $" {
gdb_test_no_output "n" $test
}
}
}
gdb_test "continue" \
- "Continuing\..*$inferior_exited_re.*" \
+ "Continuing\\..*$inferior_exited_re.*" \
"continuing to program completion"
[multi_line \
"Multiple matches for last_node_id" \
"\\\[0\\\] cancel" \
- "\\\[1\\\] pck\.last_node_id at .*.adb:17" \
- "\\\[2\\\] pck\.last_node_id at .*.adb:17" \
+ "\\\[1\\\] pck\\.last_node_id at .*.adb:17" \
+ "\\\[2\\\] pck\\.last_node_id at .*.adb:17" \
"> $"]
# Make sure that last_node_id is set to zero...
set catchpoint_msg \
"Catchpoint $decimal, failed assertion at $hex in bla \\\(\\\).*at .*bla.adb:$bp_location"
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_msg$eol.*STOP" \
+ "Continuing\\.$eol$eol$catchpoint_msg$eol.*STOP" \
"continuing to expected failed assertion"
gdb_test "continue" \
- "Continuing\..*$inferior_exited_re.*" \
+ "Continuing\\..*$inferior_exited_re.*" \
"continuing to program completion"
set catchpoint_msg \
"Catchpoint $any_nb, CONSTRAINT_ERROR (\\\(ignore C_E\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT1" \
+ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT1" \
"continuing to first exception"
set catchpoint_msg \
"Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo\\.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
+ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
"continuing to second exception"
################################################
set catchpoint_msg \
"Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
+ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
"continuing to Program_Error exception"
set catchpoint_msg \
"Catchpoint $any_nb, failed assertion at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT3" \
+ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT3" \
"continuing to failed assertion"
set catchpoint_msg \
"Catchpoint $any_nb, unhandled CONSTRAINT_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_msg$eol.*SPOT4" \
+ "Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT4" \
"continuing to unhandled exception"
gdb_test "continue" \
- "Continuing\..*$inferior_exited_re.*" \
+ "Continuing\\..*$inferior_exited_re.*" \
"continuing to program completion"
#################################
set temp_catchpoint_msg \
"Temporary catchpoint $any_nb, CONSTRAINT_ERROR (\\\(.*\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
- "Continuing\.$eol$eol$temp_catchpoint_msg$eol.*SPOT1" \
+ "Continuing\\.$eol$eol$temp_catchpoint_msg$eol.*SPOT1" \
"continuing to temporary catchpoint"
with_test_prefix "temporary catchpoint" {
gdb_test "continue" \
- "Continuing\..*$inferior_exited_re.*" \
+ "Continuing\\..*$inferior_exited_re.*" \
"continuing to program completion"
}
"Catchpoint \[0-9\]+: `some_kind_of_error' Ada exception"
gdb_test "cont" \
- "Catchpoint \[0-9\]+, .* at .*foo\.adb:\[0-9\]+.*" \
+ "Catchpoint \[0-9\]+, .* at .*foo\\.adb:\[0-9\]+.*" \
"caught the exception"
gdb_test "print \$_ada_exception = some_package.some_kind_of_error'Address" \
# Continue. The program should stop at first exception handling.
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_constraint_error_msg" \
+ "Continuing\\.$eol$eol$catchpoint_constraint_error_msg" \
"continuing to first Constraint_Error exception handlers"
# Resume the program's exception.
# the next exception being raised.
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_storage_error_msg" \
+ "Continuing\\.$eol$eol$catchpoint_storage_error_msg" \
"continuing and stopping in Storage_Error exception handlers"
gdb_test_no_output "delete 2" \
# Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_program_error_msg" \
+ "Continuing\\.$eol$eol$catchpoint_program_error_msg" \
"continuing without stopping to Program_Error exception handlers"
gdb_test_no_output \
# Continue, we should stop at Storage_Error handlers.
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_storage_error_msg" \
+ "Continuing\\.$eol$eol$catchpoint_storage_error_msg" \
"continuing without stopping to Storage_Error exception handlers"
gdb_test_no_output \
# Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_constraint_error_msg" \
+ "Continuing\\.$eol$eol$catchpoint_constraint_error_msg" \
"continuing to second Constraint_Error exception handlers"
gdb_test_no_output \
# the second one.
gdb_test "continue" \
- "Continuing\.$eol$eol$catchpoint_program_error_msg" \
+ "Continuing\\.$eol$eol$catchpoint_program_error_msg" \
"continuing to Program_Error exception handlers"
# Continue, the program should exit properly.
gdb_test "continue" \
- "Continuing\..*$inferior_exited_re.*" \
+ "Continuing\\..*$inferior_exited_re.*" \
"continuing to program completion"
with_test_prefix "func" {
test_menu "f (1, null)" "f" \
[multi_line \
- "\\\[1\\\] foo\.f \\(integer; foo\.integer_access\\) return boolean at .*foo.adb:.*" \
- "\\\[2\\\] foo\.f \\(foo\.new_integer; foo\.integer_access\\) return boolean at .*foo.adb:.*"] \
+ "\\\[1\\\] foo\\.f \\(integer; foo\\.integer_access\\) return boolean at .*foo.adb:.*" \
+ "\\\[2\\\] foo\\.f \\(foo\\.new_integer; foo\\.integer_access\\) return boolean at .*foo.adb:.*"] \
"1" "= true"
}
with_test_prefix "proc" {
test_menu "p (1, null)" "p" \
[multi_line \
- "\\\[1\\\] foo\.p \\(integer; foo\.integer_access\\) at .*foo.adb:.*" \
- "\\\[2\\\] foo\.p \\(foo\.new_integer; foo\.integer_access\\) at .*foo.adb:.*" ] \
+ "\\\[1\\\] foo\\.p \\(integer; foo\\.integer_access\\) at .*foo.adb:.*" \
+ "\\\[2\\\] foo\\.p \\(foo\\.new_integer; foo\\.integer_access\\) at .*foo.adb:.*" ] \
"1" "= (void)"
}
with_test_prefix "signatures disabled" {
test_menu "f (1, null)" "f" \
[multi_line \
- "\\\[1\\\] foo\.f at .*foo.adb:.*" \
- "\\\[2\\\] foo\.f at .*foo.adb:.*"] \
+ "\\\[1\\\] foo\\.f at .*foo.adb:.*" \
+ "\\\[2\\\] foo\\.f at .*foo.adb:.*"] \
"1" "= true"
}
set test "print fun_rename_test_n(1)"
gdb_test_multiple $test $test {
- -re " = 2\..*$gdb_prompt $" {
+ -wrap -re " = 2" {
pass $test
}
- -re "No definition of \"fun_rename_test_n\" in current context\..*$gdb_prompt $" {
+ -wrap -re "No definition of \"fun_rename_test_n\" in current context\\." {
if {[test_compiler_info {gcc-6*}]} {
fail $test
} else {
}
set test "print renamed_fun_rename_test_next(1)"
gdb_test_multiple $test $test {
- -re " = 2\..*$gdb_prompt $" {
+ -wrap -re " = 2" {
pass $test
}
- -re "No definition of \"renamed_fun_rename_test_next\" in current context\..*$gdb_prompt $" {
+ -wrap -re "No definition of \"renamed_fun_rename_test_next\" in current context\\." {
if {[test_compiler_info {gcc-6*}]} {
fail $test
} else {
set test "print pack.renamed_fun_rename_test_next(1)"
gdb_test_multiple $test $test {
- -re " = 2\..*$gdb_prompt $" {
+ -wrap -re " = 2" {
pass $test
}
- -re "No definition of \"pack\.renamed_fun_rename_test_next\" in current context\..*$gdb_prompt $" {
+ -wrap -re "No definition of \"pack\\.renamed_fun_rename_test_next\" in current context\\." {
if {[test_compiler_info {gcc-6*}]} {
fail $test
} else {
xfail $test
}
}
- -re "Type <data variable, no debug info> is not a structure or union type\..*$gdb_prompt $" {
+ -wrap -re "Type <data variable, no debug info> is not a structure or union type\\." {
if {[test_compiler_info {gcc-6*}]} {
fail $test
} else {
set bp_location [gdb_get_line_number "BREAK_2" ${testdir}/homonym.adb]
gdb_test "break homonym.adb:$bp_location" \
- "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*homonym\.adb, line \[0-9\]+\." \
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*homonym\\.adb, line \[0-9\]+\\." \
"break at BREAK_2"
gdb_test "continue" \
# The value of NUMCHILD may vary on different systems. Use generic $decimal
# to match possible values.
set re_ok "\\^done,name=\"A_String_Access\",numchild=\"$decimal\",.*"
-set re_error "\\^error,msg=\"Value out of range\.\".*"
+set re_error "\\^error,msg=\"Value out of range\\.\".*"
set re_error2 "\\^error,msg=\"Cannot access memory at address $hex\""
mi_gdb_test "-var-create A_String_Access * A_String_Access" \
"($re_ok|$re_error|$re_error2)" \
set bp_re "Breakpoint $decimal at $hex"
foreach op { "+" "-" } {
set op_re [string_to_regexp $op]
- gdb_test "break \"$op\"" "$bp_re: \"$op_re\"\. \\($decimal locations\\).*"
+ gdb_test "break \"$op\"" "$bp_re: \"$op_re\"\\. \\($decimal locations\\).*"
}
foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
-re -wrap "$bp_re: file .*ops.adb, line $decimal." {
pass $gdb_test_name
}
- -re -wrap "$bp_re: \"$op_re\"\. \\($decimal locations\\).*" {
+ -re -wrap "$bp_re: \"$op_re\"\\. \\($decimal locations\\).*" {
pass $gdb_test_name
}
}
foreach op { "+" "-" } {
set op_re [string_to_regexp $op]
gdb_test "break ops.\"$op\"" \
- "Breakpoint $decimal at $hex: ops\\.\"$op_re\"\. \\(2 locations\\)"
+ "Breakpoint $decimal at $hex: ops\\.\"$op_re\"\\. \\(2 locations\\)"
}
foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
gdb_test "whatis r.ia" " = bar_o203_012.int_access"
gdb_test "ptype r" \
- " = record\r\n *ia: bar_o203_012\.int_access;\r\nend record"
+ " = record\r\n *ia: bar_o203_012\\.int_access;\r\nend record"
gdb_test "ptype r.ia" " = access <$decimal-byte integer>"
proc test_bp { loc msg } {
gdb_test "break $loc" \
- "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*pck.adb, line \[0-9\]+\." \
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*pck.adb, line \[0-9\]+\\." \
"break $loc - $msg"
gdb_run_cmd