+2019-10-07 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * gdb.ada/catch_ex_std.exp: Handle being unabled to catch Ada
+ exceptions due to missing debug information.
+
2019-10-07 Tom de Vries <tdevries@suse.de>
* gdb.base/default.exp: Expect _gdb_major/_gdb_minor to be 9.1.
return 0
}
-gdb_test "catch exception some_kind_of_error" \
- "Catchpoint \[0-9\]+: `some_kind_of_error' Ada exception"
+set can_catch_exceptions 0
+gdb_test_multiple "catch exception some_kind_of_error" "" {
+ -re "Catchpoint \[0-9\]+: `some_kind_of_error' Ada exception\r\n$gdb_prompt $" {
+ pass $gdb_test_name
+ set can_catch_exceptions 1
+ }
-gdb_test "cont" \
- "Catchpoint \[0-9\]+, .* at .*foo\.adb:\[0-9\]+.*" \
- "caught the exception"
+ -re "Your Ada runtime appears to be missing some debugging information.\r\nCannot insert Ada exception catchpoint in this configuration.\r\n$gdb_prompt $" {
+ unsupported $gdb_test_name
+ }
+}
-gdb_test "print \$_ada_exception = some_package.some_kind_of_error'Address" \
- " = true"
+if { $can_catch_exceptions } {
+ gdb_test "cont" \
+ "Catchpoint \[0-9\]+, .* at .*foo\.adb:\[0-9\]+.*" \
+ "caught the exception"
+
+ gdb_test "print \$_ada_exception = some_package.some_kind_of_error'Address" \
+ " = true"
+}