aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-07-10 11:05:20 -0600
committerTom Tromey <tromey@adacore.com>2019-07-10 14:48:53 -0600
commitf06f1252b0b8ef20adb4296faaf8293c9d36f615 (patch)
tree3fd450906d0d4f71e257283f03d6ae3558a2ac36 /gdb/testsuite/gdb.ada
parent7a5d944b9e86bf73ae5acaa984df24d175b80f68 (diff)
downloadgdb-f06f1252b0b8ef20adb4296faaf8293c9d36f615.zip
gdb-f06f1252b0b8ef20adb4296faaf8293c9d36f615.tar.gz
gdb-f06f1252b0b8ef20adb4296faaf8293c9d36f615.tar.bz2
Change Ada catchpoints to be bp_catchpoint
Like Pedro's earlier patches to change catchpoint to be of type bp_catchpoint, this changes the Ada catchpoints to follow. Tested on x86-64 Fedora 29. gdb/ChangeLog 2019-07-10 Tom Tromey <tromey@adacore.com> * ada-lang.h (is_ada_exception_catchpoint): Declare. * breakpoint.c (init_ada_exception_breakpoint): Register as bp_catchpoint. (print_one_breakpoint_location, print_one_breakpoint): Use is_ada_exception_catchpoint. * ada-lang.c (class ada_catchpoint_location): Pass bp_loc_software_breakpoint to bp_location constructor. (is_ada_exception_catchpoint): New function. gdb/testsuite/ChangeLog 2019-07-10 Tom Tromey <tromey@adacore.com> * gdb.ada/mi_ex_cond.exp: Update expected results. * gdb.ada/mi_catch_ex_hand.exp: Update expected results. * gdb.ada/mi_catch_ex.exp: Update expected results. * gdb.ada/mi_catch_assert.exp: Update expected results. * gdb.ada/catch_ex.exp (catch_exception_info) (catch_exception_entry, catch_assert_entry) (catch_unhandled_entry): Update. * gdb.ada/catch_assert_if.exp: Update expected results.
Diffstat (limited to 'gdb/testsuite/gdb.ada')
-rw-r--r--gdb/testsuite/gdb.ada/catch_assert_if.exp2
-rw-r--r--gdb/testsuite/gdb.ada/catch_ex.exp8
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_assert.exp2
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_ex.exp8
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp4
-rw-r--r--gdb/testsuite/gdb.ada/mi_ex_cond.exp2
6 files changed, 13 insertions, 13 deletions
diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp b/gdb/testsuite/gdb.ada/catch_assert_if.exp
index 0bf2dd6..61a12a7 100644
--- a/gdb/testsuite/gdb.ada/catch_assert_if.exp
+++ b/gdb/testsuite/gdb.ada/catch_assert_if.exp
@@ -70,7 +70,7 @@ gdb_test "catch assert if Global_Var = 2" \
# Check that condition is stored and properly displayed.
-set exp_bp ".*$decimal${sp}breakpoint${sp}keep${sp}y${sp}$hex failed Ada assertions$eol${sp}stop only if Global_Var = 2.*"
+set exp_bp ".*$decimal${sp}catchpoint${sp}keep${sp}y${sp}failed Ada assertions$eol${sp}stop only if Global_Var = 2.*"
gdb_test "info breakpoint" $exp_bp "Check catch assertions with condition"
set bp_location [gdb_get_line_number "STOP" ${testdir}/bla.adb]
diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp
index 772100a..5a560c1 100644
--- a/gdb/testsuite/gdb.ada/catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex.exp
@@ -32,7 +32,7 @@ set sp "\[ \t\]*"
set info_break_header "Num${sp}Type${sp}Disp${sp}Enb${sp}Address${sp}What"
set catch_exception_info \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}all Ada exceptions"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}all Ada exceptions"
####################################
# 1. Try catching all exceptions. #
@@ -105,11 +105,11 @@ gdb_test "catch exception unhandled" \
"insert catchpoint on unhandled exceptions"
set catch_exception_entry \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}\`Program_Error' Ada exception"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}\`Program_Error' Ada exception"
set catch_assert_entry \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}failed Ada assertions"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}failed Ada assertions"
set catch_unhandled_entry \
- "$any_nb${sp}breakpoint${sp}keep${sp}y${sp}$any_addr${sp}unhandled Ada exceptions"
+ "$any_nb${sp}catchpoint${sp}keep${sp}y${sp}unhandled Ada exceptions"
gdb_test "info break" \
"$info_break_header$eol.*$catch_exception_entry$eol$catch_assert_entry$eol$catch_unhandled_entry" \
diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
index ebecf03..6e6093e 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
@@ -81,7 +81,7 @@ if ![mi_run_to_main] then {
}
mi_gdb_test "-catch-assert -c \"Global_Var = 2\"" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"failed Ada assertions\",.*,cond=\"Global_Var = 2\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*,cond=\"Global_Var = 2\",.*}" \
"catch assert failures with condition"
set bp_location [gdb_get_line_number "STOP" ${testdir}/bla.adb]
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index 772a050..9358598 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -75,7 +75,7 @@ if ![mi_run_to_main] then {
}
mi_gdb_test "-catch-exception" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"all Ada exceptions\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions\",.*}" \
"catch all exceptions"
# Continue to caught exception.
@@ -131,15 +131,15 @@ if ![mi_run_to_main] then {
}
mi_gdb_test "-catch-exception -e Program_Error" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"`Program_Error' Ada exception\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Program_Error' Ada exception\",.*}" \
"catch Program_Error"
mi_gdb_test "-catch-assert" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"failed Ada assertions\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*}" \
"catch assert failures"
mi_gdb_test "-catch-exception -u" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"unhandled Ada exceptions\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"unhandled Ada exceptions\",.*}" \
"catch unhandled exceptions"
mi_execute_to "exec-continue" \
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
index 11a9d1d..a4734b9 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
@@ -70,7 +70,7 @@ if ![mi_run_to_main] then {
}
mi_gdb_test "-catch-handlers" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"all Ada exceptions handlers\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions handlers\",.*}" \
"catch all exceptions handlers"
# Continue to exception handler.
@@ -120,7 +120,7 @@ if ![mi_run_to_main] then {
}
mi_gdb_test "-catch-handlers -e Constraint_Error" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"`Constraint_Error' Ada exception handlers\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Constraint_Error' Ada exception handlers\",.*}" \
"catch Constraint_Error"
mi_execute_to "exec-continue" \
diff --git a/gdb/testsuite/gdb.ada/mi_ex_cond.exp b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
index ccbbe1f..16aa198 100644
--- a/gdb/testsuite/gdb.ada/mi_ex_cond.exp
+++ b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
@@ -69,7 +69,7 @@ mi_gdb_load ${binfile}
# catchpoint that uses both conditions and exception name.
mi_gdb_test "-catch-exception -c \"i = 2\" -e constraint_error" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",addr=\"$hex\",what=\"`constraint_error' Ada exception\",.*,cond=\"i = 2\",.*}" \
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`constraint_error' Ada exception\",.*,cond=\"i = 2\",.*}" \
"catch C_E if i = 2"
# It is important that we start the program's execution after having