From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/commit 4/4] Adjust gdb.ada/mi_catch_ex.exp to use GDB/MI catch commands...
Date: Tue, 08 Oct 2013 11:48:00 -0000 [thread overview]
Message-ID: <1381232908-5868-5-git-send-email-brobecker@adacore.com> (raw)
In-Reply-To: <1381232908-5868-1-git-send-email-brobecker@adacore.com>
... in place of the CLI "catch ..." commands. The latter were used
because the GDB/MI equivalents were not available at the time.
gdb/testsuite/ChangeLog:
* gdb.ada/mi_catch_ex.exp: Adjusts all "catch ..." tests to
use the appropriate GDB/MI command instead, and verify
the test output.
Tested on x86_64-linux.
It's sufficiently straightforward that I'm tempted to call it obvious.
Hence the "commit" in "RFA/commit".
--
Joel
---
gdb/testsuite/gdb.ada/mi_catch_ex.exp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index d30d44b..f26fcdf 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -74,7 +74,9 @@ if ![mi_run_to_main] then {
return 0
}
-mi_gdb_test "catch exception"
+mi_gdb_test "-catch-exception" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"all Ada exceptions\",.*}" \
+ "catch all exceptions"
mi_execute_to "exec-continue" \
"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR" \
@@ -107,11 +109,17 @@ if ![mi_run_to_main] then {
return 0
}
-mi_gdb_test "catch exception Program_Error"
+mi_gdb_test "-catch-exception -e Program_Error" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"`Program_Error' Ada exception\",.*}" \
+ "catch Program_Error"
-mi_gdb_test "catch assert"
+mi_gdb_test "-catch-assert" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"failed Ada assertions\",.*}" \
+ "catch assert failures"
-mi_gdb_test "catch exception unhandled"
+mi_gdb_test "-catch-exception -u" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"unhandled Ada exceptions\",.*}" \
+ "catch unhandled exceptions"
mi_execute_to "exec-continue" \
"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR" \
--
1.8.1.2
next prev parent reply other threads:[~2013-10-08 11:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 11:48 GDB/MI: New commands to catch Ada exceptions Joel Brobecker
2013-10-08 11:48 ` [commit/Ada 2/4] Add "ada_" prefix to enum ada_exception_catchpoint_kind Joel Brobecker
2013-10-08 11:48 ` [commit/Ada 1/4] Rework a bit Ada exception catchpoint support (in prep for GDB/MI) Joel Brobecker
2013-10-08 11:48 ` [RFA/RFC 3/4] New GDB/MI commands to catch Ada exceptions Joel Brobecker
2013-10-08 11:48 ` Joel Brobecker [this message]
2013-10-10 20:50 ` GDB/MI: New " Tom Tromey
2013-10-11 10:47 ` Joel Brobecker
2013-10-11 13:52 ` checked in: " Joel Brobecker
2013-10-11 10:44 ` [RFA/doco+NEWS] Document the -catch-assert and -catch-exception new GDB/MI commands Joel Brobecker
2013-10-11 11:21 ` Eli Zaretskii
2013-10-11 13:53 ` checked in: " Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381232908-5868-5-git-send-email-brobecker@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox