From 349774efe258cff6b365b72df07f6ce2eb76cbd6 Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Fri, 11 Oct 2013 13:48:19 +0000 Subject: 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. --- gdb/mi/mi-cmds.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/mi/mi-cmds.h') diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h index a472582..bbca54d 100644 --- a/gdb/mi/mi-cmds.h +++ b/gdb/mi/mi-cmds.h @@ -39,6 +39,8 @@ extern mi_cmd_argv_ftype mi_cmd_dprintf_insert; extern mi_cmd_argv_ftype mi_cmd_break_commands; extern mi_cmd_argv_ftype mi_cmd_break_passcount; extern mi_cmd_argv_ftype mi_cmd_break_watch; +extern mi_cmd_argv_ftype mi_cmd_catch_assert; +extern mi_cmd_argv_ftype mi_cmd_catch_exception; extern mi_cmd_argv_ftype mi_cmd_catch_load; extern mi_cmd_argv_ftype mi_cmd_catch_unload; extern mi_cmd_argv_ftype mi_cmd_disassemble; -- cgit v1.1