Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Unified Diff: gdb/testsuite/gdb.ada/mi_catch_ex.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.ada/lang_switch/lang_switch.adb ('k') | gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.ada/mi_catch_ex.exp
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index 8d140b2b302dcc3c1eb970c52f445048dde689a2..f26fcdfcbfeccbafb82b4483268e3c64247a481e 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -1,4 +1,4 @@
-# Copyright 2011-2012 Free Software Foundation, Inc.
+# Copyright 2011-2013 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,12 +15,8 @@
load_lib "ada.exp"
-set testdir "mi_catch_ex"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
-file mkdir ${objdir}/${subdir}/${testdir}
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
return -1
}
@@ -78,19 +74,21 @@ 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" \
"foo" "" ".*" ".*" \
".*" \
- "continue to exception catchpoint hit"
+ "continue until CE caught by all-exceptions catchpoint"
mi_execute_to "exec-continue" \
"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR" \
"foo" "" ".*" ".*" \
".*" \
- "continue to exception catchpoint hit"
+ "continue until PE caught by all-exceptions catchpoint"
################################################
# 2. Try catching only some of the exceptions. #
@@ -111,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" \
@@ -127,11 +131,11 @@ mi_execute_to "exec-continue" \
"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb" \
"foo" "" ".*" ".*" \
".*" \
- "continue to exception catchpoint hit"
+ "continue to assert failure catchpoint hit"
mi_execute_to "exec-continue" \
"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR" \
"foo" "" ".*" ".*" \
".*" \
- "continue to exception catchpoint hit"
+ "continue to unhandled exception catchpoint hit"
« no previous file with comments | « gdb/testsuite/gdb.ada/lang_switch/lang_switch.adb ('k') | gdb/testsuite/gdb.ada/mi_catch_ex/foo.adb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698