aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2017-11-27 11:38:54 -0800
committerJoel Brobecker <brobecker@adacore.com>2017-11-27 11:39:45 -0800
commit10329bb27fa5531bf97da184c4d0ed9c4ed85605 (patch)
tree57a88e16e1ae1e2e42b52fc508a86bb786da433c /gdb
parent6dda7875a8021787f11bd95a69d81a079e408a57 (diff)
downloadgdb-10329bb27fa5531bf97da184c4d0ed9c4ed85605.zip
gdb-10329bb27fa5531bf97da184c4d0ed9c4ed85605.tar.gz
gdb-10329bb27fa5531bf97da184c4d0ed9c4ed85605.tar.bz2
fix two issues in gdb.ada/mi_catch_ex.exp (re: "exception-message")
The following patch introduced a new feature related to Ada exception catchpoints: commit e547c119d043f2ecffb70452020ab9150d083a91 Author: Joel Brobecker <brobecker@adacore.com> Date: Fri Nov 24 17:09:42 2017 -0500 Subject: (Ada) provide the exception message when hitting an exception catchpoint Unfortunately, the patch left 2 errors in gdb.ada/mi_catch_ex.exp, both inside the "continue_to_exception" function: 1. The exception message on the console can include the exception message, and thus this patch adjust the expected output in the corresponding gdb_expect call to allow it; to allow it. 2. There was a TCL syntax confusion in "$exception_name(..." that caused TCL to evaluate "exception_name as an array, rather than as a variable. This patch fixes this by escaping the '(' (and the corresponding closing parenthesis, for consistency). gdb/testsuite/ChangeLog: * gdb.ada/mi_catch_ex.exp (continue_to_exception): Adjust expected output in gdb_expect call to allow the exception message to be present as well. Fix syntax confusion to avoid TCL thinking that exception_name is an array. Tested on x86_64-linux, with: DejaGnu version 1.6 Expect version 5.45 Tcl version 8.6
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_ex.exp4
2 files changed, 9 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 76e2883..16c93dc 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2017-11-27 Joel Brobecker <brobecker@adacore.com>
+
+ * gdb.ada/mi_catch_ex.exp (continue_to_exception): Adjust
+ expected output in gdb_expect call to allow the exception
+ message to be present as well. Fix syntax confusion to avoid
+ TCL thinking that exception_name is an array.
+
2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
* gdb.arch/spu-info.c: Include <unistd.h>.
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index 2ca3b6c..2440be5 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -87,7 +87,7 @@ proc continue_to_exception { exception_name exception_message test } {
# Match console stream output.
gdb_expect {
- -re " $exception_name at $hex in foo " {
+ -re " $exception_name\( \\($exception_message\\)\)? at $hex in foo " {
}
timeout {
fail "$test (timeout)"
@@ -97,7 +97,7 @@ proc continue_to_exception { exception_name exception_message test } {
# Now MI stream output.
mi_expect_stop \
- "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"$exception_name(\",exception-message=\"$exception_message)?" \
+ "breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"$exception_name\(\",exception-message=\"$exception_message\)?" \
"foo" "" ".*" ".*" \
".*" \
$test