aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
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/ada-lang.c
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/ada-lang.c')
-rw-r--r--gdb/ada-lang.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index ae28265..deb5099 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -12283,7 +12283,7 @@ class ada_catchpoint_location : public bp_location
{
public:
ada_catchpoint_location (breakpoint *owner)
- : bp_location (owner)
+ : bp_location (owner, bp_loc_software_breakpoint)
{}
/* The condition that checks whether the exception that was raised
@@ -12546,14 +12546,11 @@ print_one_exception (enum ada_exception_catchpoint_kind ex,
struct value_print_options opts;
get_user_print_options (&opts);
+
if (opts.addressprint)
- {
- annotate_field (4);
- uiout->field_core_addr ("addr", b->loc->gdbarch, b->loc->address);
- }
+ uiout->field_skip ("addr");
annotate_field (5);
- *last_loc = b->loc;
switch (ex)
{
case ada_catch_exception:
@@ -12871,6 +12868,17 @@ print_recreate_catch_handlers (struct breakpoint *b,
static struct breakpoint_ops catch_handlers_breakpoint_ops;
+/* See ada-lang.h. */
+
+bool
+is_ada_exception_catchpoint (breakpoint *bp)
+{
+ return (bp->ops == &catch_exception_breakpoint_ops
+ || bp->ops == &catch_exception_unhandled_breakpoint_ops
+ || bp->ops == &catch_assert_breakpoint_ops
+ || bp->ops == &catch_handlers_breakpoint_ops);
+}
+
/* Split the arguments specified in a "catch exception" command.
Set EX to the appropriate catchpoint type.
Set EXCEP_STRING to the name of the specific exception if