aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.ada')
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_assert.exp11
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_ex.exp13
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp9
-rw-r--r--gdb/testsuite/gdb.ada/mi_dyn_arr.exp11
-rw-r--r--gdb/testsuite/gdb.ada/mi_exc_info.exp7
-rw-r--r--gdb/testsuite/gdb.ada/mi_interface.exp13
-rw-r--r--gdb/testsuite/gdb.ada/mi_prot.exp7
-rw-r--r--gdb/testsuite/gdb.ada/mi_ref_changeable.exp11
-rw-r--r--gdb/testsuite/gdb.ada/mi_string_access.exp11
-rw-r--r--gdb/testsuite/gdb.ada/mi_var_access.exp10
-rw-r--r--gdb/testsuite/gdb.ada/mi_var_array.exp11
-rw-r--r--gdb/testsuite/gdb.ada/mi_var_union.exp11
-rw-r--r--gdb/testsuite/gdb.ada/mi_variant.exp11
13 files changed, 29 insertions, 107 deletions
diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
index 30543e5..095815d 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
@@ -58,14 +58,7 @@ gdb_test_multiple "catch exception" $msg {
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_clean_restart $binfile
###################################################
# 2. Try catching conditionnal failed assertion. #
@@ -77,7 +70,7 @@ mi_gdb_load ${binfile}
# - continue, we should see the second failed assertion
# - continue, the program exits.
-if ![mi_run_to_main] then {
+if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index 63c6984..103ec85 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -58,21 +58,14 @@ gdb_test_multiple "catch exception" $msg {
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_clean_restart $binfile
####################################
# 1. Try catching all exceptions. #
####################################
with_test_prefix "scenario 1" {
- if ![mi_run_to_main] then {
+ if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
@@ -130,7 +123,7 @@ continue_to_exception \
# - continue, the program exits.
with_test_prefix "scenario 2" {
- if ![mi_run_to_main] then {
+ if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
index 06e4666..ef3dd24 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
@@ -57,17 +57,14 @@ gdb_test_multiple "catch handlers" $msg {
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
+mi_clean_restart $binfile
#############################################
# 1. Try catching all exceptions handlers. #
#############################################
with_test_prefix "scenario 1" {
- if ![mi_run_to_main] then {
+ if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
@@ -119,7 +116,7 @@ continue_to_exception_handler \
# but exit instead.
with_test_prefix "scenario 2" {
- if ![mi_run_to_main] then {
+ if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
index 5c8b986..4b5d2c1 100644
--- a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
+++ b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
@@ -26,16 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_clean_restart $binfile
-if ![mi_run_to_main] then {
+if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp
index eeb8247..52c37c4 100644
--- a/gdb/testsuite/gdb.ada/mi_exc_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp
@@ -26,12 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
+mi_clean_restart $binfile
-if ![mi_run_to_main] then {
+if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp
index f948237..a2c0d045 100644
--- a/gdb/testsuite/gdb.ada/mi_interface.exp
+++ b/gdb/testsuite/gdb.ada/mi_interface.exp
@@ -26,17 +26,10 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_clean_restart $binfile
-if ![mi_run_to_main] then {
- fail "cannot run to main, testcase aborted"
+if {[mi_runto_main] < 0} {
+ fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_prot.exp b/gdb/testsuite/gdb.ada/mi_prot.exp
index fb4ca8d..703fabd 100644
--- a/gdb/testsuite/gdb.ada/mi_prot.exp
+++ b/gdb/testsuite/gdb.ada/mi_prot.exp
@@ -30,12 +30,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if {[mi_gdb_start]} {
- continue
-}
+mi_clean_restart $binfile
-if {![mi_run_to_main]} then {
+if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
index 71f26c0..86df568 100644
--- a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
+++ b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
@@ -26,16 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_clean_restart $binfile
-if ![mi_run_to_main] then {
+if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_string_access.exp b/gdb/testsuite/gdb.ada/mi_string_access.exp
index 5e07f1e..56c8522 100644
--- a/gdb/testsuite/gdb.ada/mi_string_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_string_access.exp
@@ -26,16 +26,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" }
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-gdb_exit
-if [mi_gdb_start] {
- continue
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_clean_restart $binfile
-if ![mi_run_to_main] then {
+if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_var_access.exp b/gdb/testsuite/gdb.ada/mi_var_access.exp
index 14e8992..196daff 100644
--- a/gdb/testsuite/gdb.ada/mi_var_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_access.exp
@@ -28,15 +28,9 @@ if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != "" } {
return -1
}
-if {[mi_gdb_start]} {
- continue
-}
-
-mi_delete_breakpoints
-mi_gdb_reinitialize_dir $srcdir/$subdir
-mi_gdb_load ${binfile}
+mi_clean_restart $binfile
-if ![mi_run_to_main] then {
+if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_var_array.exp b/gdb/testsuite/gdb.ada/mi_var_array.exp
index 4ef213b..09b89ce 100644
--- a/gdb/testsuite/gdb.ada/mi_var_array.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_array.exp
@@ -32,16 +32,9 @@ foreach_with_prefix scenario {none all minimal} {
return -1
}
- gdb_exit
- if [mi_gdb_start] {
- continue
- }
-
- mi_delete_breakpoints
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
+ mi_clean_restart $binfile
- if ![mi_run_to_main] then {
+ if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_var_union.exp b/gdb/testsuite/gdb.ada/mi_var_union.exp
index f950855..da09d7a 100644
--- a/gdb/testsuite/gdb.ada/mi_var_union.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_union.exp
@@ -34,16 +34,9 @@ foreach_with_prefix scenario {none all minimal} {
return -1
}
- gdb_exit
- if [mi_gdb_start] {
- continue
- }
-
- mi_delete_breakpoints
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
+ mi_clean_restart $binfile
- if ![mi_run_to_main] then {
+ if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}
diff --git a/gdb/testsuite/gdb.ada/mi_variant.exp b/gdb/testsuite/gdb.ada/mi_variant.exp
index 01c6720..d7e6191 100644
--- a/gdb/testsuite/gdb.ada/mi_variant.exp
+++ b/gdb/testsuite/gdb.ada/mi_variant.exp
@@ -33,16 +33,9 @@ foreach_with_prefix scenario {none all minimal} {
return -1
}
- gdb_exit
- if [mi_gdb_start] {
- continue
- }
-
- mi_delete_breakpoints
- mi_gdb_reinitialize_dir $srcdir/$subdir
- mi_gdb_load ${binfile}
+ mi_clean_restart $binfile
- if ![mi_run_to_main] then {
+ if {[mi_runto_main] < 0} {
fail "cannot run to main, testcase aborted"
return 0
}