mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-19 01:19:41 +08:00
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.
This commit is contained in:
@@ -114,6 +114,16 @@ enum ada_renaming_category
|
||||
ADA_SUBPROGRAM_RENAMING
|
||||
};
|
||||
|
||||
/* The different types of catchpoints that we introduced for catching
|
||||
Ada exceptions. */
|
||||
|
||||
enum ada_exception_catchpoint_kind
|
||||
{
|
||||
ada_catch_exception,
|
||||
ada_catch_exception_unhandled,
|
||||
ada_catch_assert
|
||||
};
|
||||
|
||||
/* Ada task structures. */
|
||||
|
||||
struct ada_task_info
|
||||
@@ -374,6 +384,11 @@ extern char *ada_main_name (void);
|
||||
|
||||
extern char *ada_name_for_lookup (const char *name);
|
||||
|
||||
extern void create_ada_exception_catchpoint
|
||||
(struct gdbarch *gdbarch, enum ada_exception_catchpoint_kind ex_kind,
|
||||
char *excep_string, char *cond_string, int tempflag, int disabled,
|
||||
int from_tty);
|
||||
|
||||
/* Tasking-related: ada-tasks.c */
|
||||
|
||||
extern int valid_task_id (int);
|
||||
|
||||
Reference in New Issue
Block a user