From 154b8450272625dd694e94de666d65c2b10a6bdd Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 22 Jun 2011 17:52:37 +0000 Subject: 2011-06-22 Pedro Alves * ada-lang.c: Include arch-utils.h. (ada_decode_exception_location): Make static. (catch_ada_exception_command): Moved here from breakpoint.c. (ada_decode_assert_location): Make static. (catch_assert_command): Moved here from breakpoint.c. (_initialize_ada_lang): Install the exception and assert catchpoint commands here. * ada-lang.h (ada_decode_exception_location) (ada_decode_assert_location): Delete declarations. * breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): Moved to breakpoint.h. (create_ada_exception_breakpoint): Make extern. (catch_ada_exception_command, catch_assert_command): Moved to ada-lang.c. (add_catch_command): Make extern. (_initilize_breakpoint): Don't install the exception and assert catchpoint commands here. * breakpoint.h (CATCH_PERMANENT, CATCH_TEMPORARY): Moved from breakpoint.c (add_catch_command, create_ada_exception_breakpoint): Declare. --- gdb/breakpoint.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'gdb/breakpoint.h') diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h index b7be68cffe8..9dbf23b6ad8 100644 --- a/gdb/breakpoint.h +++ b/gdb/breakpoint.h @@ -984,6 +984,36 @@ extern void awatch_command_wrapper (char *, int, int); extern void rwatch_command_wrapper (char *, int, int); extern void tbreak_command (char *, int); +/* Arguments to pass as context to some catch command handlers. */ +#define CATCH_PERMANENT ((void *) (uintptr_t) 0) +#define CATCH_TEMPORARY ((void *) (uintptr_t) 1) + +/* Like add_cmd, but add the command to both the "catch" and "tcatch" + lists, and pass some additional user data to the command + function. */ + +extern void + add_catch_command (char *name, char *docstring, + void (*sfunc) (char *args, int from_tty, + struct cmd_list_element *command), + char **(*completer) (struct cmd_list_element *cmd, + char *text, char *word), + void *user_data_catch, + void *user_data_tcatch); + +/* Create a breakpoint struct for Ada exception catchpoints. */ + +extern void + create_ada_exception_breakpoint (struct gdbarch *gdbarch, + struct symtab_and_line sal, + char *addr_string, + char *exp_string, + char *cond_string, + struct expression *cond, + struct breakpoint_ops *ops, + int tempflag, + int from_tty); + extern int create_breakpoint (struct gdbarch *gdbarch, char *arg, char *cond_string, int thread, int parse_condition_and_thread, -- cgit v1.2.1