]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/testsuite/gdb.cp/exceptprint.exp
PR c++/13588:
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.cp / exceptprint.exp
index 6e03fd9ab556d97ce31c1523224ea75929d6626b..d9f4fd51d02469f50f14e45f4558c0d327917fba 100644 (file)
@@ -71,3 +71,24 @@ do_exceptprint_tests string "$hex \"hi bob\""
 do_exceptprint_tests int 23
 do_exceptprint_tests struct "{mv = 77}"
 do_exceptprint_tests "reference to struct" "{mv = 77}"
+
+
+delete_breakpoints
+
+if {![runto_main]} {
+    return -1
+}
+
+gdb_test "catch catch int if \$_exception == 23" \
+    "Catchpoint \[0-9\]+ \\(catch\\)" \
+    "catch catch"
+gdb_test "catch throw int if \$_exception == 23" \
+    "Catchpoint \[0-9\]+ \\(throw\\)" \
+    "catch throw"
+gdb_test "catch rethrow int if \$_exception == 23" \
+    "Catchpoint \[0-9\]+ \\(rethrow\\)" \
+    "catch rethrow"
+
+# This tests both the case where the regular expression does not
+# match, and the case where it does.
+do_exceptprint_tests int 23