Adjust gdb.ada/mi_catch_ex.exp to use GDB/MI catch commands...
authorJoel Brobecker <brobecker@gnat.com>
Fri, 11 Oct 2013 13:49:36 +0000 (13:49 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 11 Oct 2013 13:49:36 +0000 (13:49 +0000)
... 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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/mi_catch_ex.exp

index 9f45e839bac15993f91bd12e7cae7a7e665d93bc..45da6fdf752545cd1d77e096cc6dfb117ff646eb 100644 (file)
@@ -1,3 +1,9 @@
+2013-10-11  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdb.ada/mi_catch_ex.exp: Adjusts all "catch ..." tests to
+       use the appropriate GDB/MI command instead, and verify
+       the test output.
+
 2013-10-11  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.base/source-nofile.gdb: New file.
index d30d44b27b3d323af03becfc7e69b364897cd491..f26fcdfcbfeccbafb82b4483268e3c64247a481e 100644 (file)
@@ -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" \