diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-07-01 18:35:36 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-07-01 18:35:36 +0000 |
commit | 00eb2c4ae81736e51d2bac0fbab4f8b04ab3d319 (patch) | |
tree | ab6eea88206b85df3e784f31f598a65b47555335 /gdb/testsuite | |
parent | 85a20c42eacf836502c5dc0cc2afbd24666b2e86 (diff) | |
download | gdb-00eb2c4ae81736e51d2bac0fbab4f8b04ab3d319.zip gdb-00eb2c4ae81736e51d2bac0fbab4f8b04ab3d319.tar.gz gdb-00eb2c4ae81736e51d2bac0fbab4f8b04ab3d319.tar.bz2 |
bettter display for temporary Ada exception catchpoints
Temporary catchpoints on Ada exceptions are now displayed as "Temporary
catchpoint" as opposed to just "Catchpoint". This is cosmetic only, but
in line with what's done for other catchpoints as well as breakpoints.
gdb/ChangeLog:
* ada-lang.c (print_it_exception): Print temporary catchpoints
as "Temporary catchpoint".
(print_mention_exception): Likewise.
gdb/testsuite/ChangeLog:
* gdb.ada/catch_ex.exp: Add temporary catchpoint tests.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.ada/catch_ex.exp | 30 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e0c4a0a..6f84e43 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-07-01 Joel Brobecker <brobecker@adacore.com> + + * gdb.ada/catch_ex.exp: Add temporary catchpoint tests. + 2011-07-01 Jan Kratochvil <jan.kratochvil@redhat.com> Test GCC PR debug/49546. diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp index 7fc2895..fa458d8 100644 --- a/gdb/testsuite/gdb.ada/catch_ex.exp +++ b/gdb/testsuite/gdb.ada/catch_ex.exp @@ -145,4 +145,34 @@ gdb_test "continue" \ "Continuing\..*$inferior_exited_re.*" \ "continuing to program completion" +################################# +# 3. Try temporary catchpoints. # +################################# + +# Scenario: +# - Insert a temporary catchpoint on all exceptions. +# - Run to that catchpoint +# - Continue; we should reach the program's exit, not stopping +# at any of the other exceptions that are being raised inside +# the program. + +if ![runto_main] then { + fail "Cannot run to main, testcase aborted" + return 0 +} + +gdb_test "tcatch exception" \ + "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" +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" + + |