-# Copyright 2007-2014 Free Software Foundation, Inc.
+# Copyright 2007-2020 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
set info_break_header "Num${sp}Type${sp}Disp${sp}Enb${sp}Address${sp}What"
set catch_exception_info \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}all Ada exceptions"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}all Ada exceptions"
####################################
# 1. Try catching all exceptions. #
####################################
if ![runto_main] then {
- fail "Cannot run to main, testcase aborted"
+ fail "cannot run to main, testcase aborted"
return 0
}
"info break, catch all Ada exceptions"
set catchpoint_msg \
- "Catchpoint $any_nb, CONSTRAINT_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
+ "Catchpoint $any_nb, CONSTRAINT_ERROR (\\\(ignore C_E\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\.$eol$catchpoint_msg$eol.*SPOT1" \
"continuing to first exception"
set catchpoint_msg \
- "Catchpoint $any_nb, PROGRAM_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
+ "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$catchpoint_msg$eol.*SPOT2" \
"continuing to second exception"
# - continue, the program exits.
if ![runto_main] then {
- fail "Cannot run to main, testcase aborted"
+ fail "cannot run to main, testcase aborted"
return 0
}
"insert catchpoint on unhandled exceptions"
set catch_exception_entry \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}\`Program_Error' Ada exception"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}\`Program_Error' Ada exception"
set catch_assert_entry \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}failed Ada assertions"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}failed Ada assertions"
set catch_unhandled_entry \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}unhandled Ada exceptions"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}unhandled Ada exceptions"
gdb_test "info break" \
"$info_break_header$eol.*$catch_exception_entry$eol$catch_assert_entry$eol$catch_unhandled_entry" \
"info break, second run"
set catchpoint_msg \
- "Catchpoint $any_nb, PROGRAM_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
+ "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$catchpoint_msg$eol.*SPOT2" \
"continuing to Program_Error exception"
# the program.
if ![runto_main] then {
- fail "Cannot run to main, testcase aborted"
+ fail "cannot run to main, testcase aborted"
return 0
}
"Temporary catchpoint $any_nb: all Ada exceptions"
set temp_catchpoint_msg \
- "Temporary catchpoint $any_nb, CONSTRAINT_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
+ "Temporary catchpoint $any_nb, CONSTRAINT_ERROR (\\\(.*\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\.$eol$temp_catchpoint_msg$eol.*SPOT1" \
"continuing to temporary catchpoint"
-gdb_test "continue" \
- "Continuing\..*$inferior_exited_re.*" \
- "continuing to program completion"
-
+with_test_prefix "temporary catchpoint" {
+ gdb_test "continue" \
+ "Continuing\..*$inferior_exited_re.*" \
+ "continuing to program completion"
+}