summaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2013-10-11 13:48:18 +0000
committerJoel Brobecker <brobecker@gnat.com>2013-10-11 13:48:18 +0000
commit1f8d858cab10848c0330706f5a287195cdd64ae6 (patch)
tree47920f8f62120b9372c4465ed1e806d0a9418adb /gdb/breakpoint.c
parent988805e84cab69ce3af29bbf24a9b0bb7f279ef9 (diff)
downloadgdb-1f8d858cab10848c0330706f5a287195cdd64ae6.tar.gz
New GDB/MI commands to catch Ada exceptions
This patch introduces two new GDB/MI commands implementing the equivalent of the "catch exception" and "catch assert" GDB/CLI commands. gdb/ChangeLog: * breakpoint.h (init_ada_exception_breakpoint): Add parameter "enabled". * breakpoint.c (init_ada_exception_breakpoint): Add parameter "enabled". Set B->ENABLE_STATE accordingly. * ada-lang.h (ada_exception_catchpoint_kind): Move here from ada-lang.c. (create_ada_exception_catchpoint): Add declaration. * ada-lang.c (ada_exception_catchpoint_kind): Move to ada-lang.h. (create_ada_exception_catchpoint): Make non-static. Add new parameter "disabled". Use it in call to init_ada_exception_breakpoint. (catch_ada_exception_command): Add parameter "enabled" in call to create_ada_exception_catchpoint. (catch_assert_command): Likewise. * mi/mi-cmds.h (mi_cmd_catch_assert, mi_cmd_catch_exception): Add declarations. * mi/mi-cmds.c (mi_cmds): Add the "catch-assert" and "catch-exception" commands. * mi/mi-cmd-catch.c: Add #include "ada-lang.h". (mi_cmd_catch_assert, mi_cmd_catch_exception): New functions.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index f0da90a5ce7..5ce50defc11 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -11621,6 +11621,7 @@ init_ada_exception_breakpoint (struct breakpoint *b,
char *addr_string,
const struct breakpoint_ops *ops,
int tempflag,
+ int enabled,
int from_tty)
{
if (from_tty)
@@ -11643,7 +11644,7 @@ init_ada_exception_breakpoint (struct breakpoint *b,
init_raw_breakpoint (b, gdbarch, sal, bp_breakpoint, ops);
- b->enable_state = bp_enabled;
+ b->enable_state = enabled ? bp_enabled : bp_disabled;
b->disposition = tempflag ? disp_del : disp_donttouch;
b->addr_string = addr_string;
b->language = language_ada;