67 {
"-probe-stap libstdcxx:throw",
"__cxa_throw" },
68 {
"-probe-stap libstdcxx:rethrow",
"__cxa_rethrow" },
69 {
"-probe-stap libstdcxx:catch",
"__cxa_begin_catch" }
113 if (pc_probe.
probe == NULL
115 || (strcmp (pc_probe.
probe->
name,
"catch") != 0
116 && strcmp (pc_probe.
probe->
name,
"throw") != 0
117 && strcmp (pc_probe.
probe->
name,
"rethrow") != 0))
118 error (
_(
"not stopped at a C++ exception catchpoint"));
122 error (
_(
"C++ exception catchpoint has too few arguments"));
128 if ((arg0 != NULL && *arg0 == NULL) || *arg1 == NULL)
129 error (
_(
"error computing probe argument at c++ exception catchpoint"));
165 char *type_name = NULL;
171 if (self->pattern == NULL)
176 struct value *typeinfo_arg;
195 if (type_name != NULL)
197 if (regexec (self->pattern, type_name, 0, NULL, 0) != 0)
217 char *spec = ASTRDUP (exception_functions[kind].
probe);
229 char *spec = ASTRDUP (exception_functions[kind].
function);
231 self->ops->decode_linespec (
self, &spec, &sals);
261 bp_temp ?
"Temporary catchpoint "
268 :
" (exception rethrown), ")));
348 ui_out_text (uiout, bp_temp ?
_(
"Temporary catchpoint ")
353 :
_(
" (rethrow)"))));
389 regex_t *pattern = NULL;
391 if (except_rx != NULL)
393 pattern = XNEW (regex_t);
397 _(
"invalid type-matching regexp"));
432 char *last, *last_space;
438 while (*last !=
'\0')
440 char *if_token = last;
452 if (last_space > start)
453 return savestring (start, last_space - start);
462 int tempflag,
int from_tty)
465 char *cond_string = NULL;
477 if ((*arg !=
'\0') && !isspace (*arg))
478 error (
_(
"Junk at end of arguments."));
483 error (
_(
"Unsupported or unknown exception event; cannot catch it"));
527 static struct value *
530 struct value *arg0, *arg1;
531 struct type *obj_type;
582 Catch an exception, when caught."),
588 Catch an exception, when thrown."),
594 Catch an exception, when rethrown."),
void(* print_recreate)(struct breakpoint *, struct ui_file *fp)
static void print_recreate_exception_catchpoint(struct breakpoint *b, struct ui_file *fp)
struct frame_info * get_selected_frame(const char *message)
void * get_cmd_context(struct cmd_list_element *cmd)
CORE_ADDR get_frame_pc(struct frame_info *frame)
void ui_out_field_int(struct ui_out *uiout, const char *fldname, int value)
static void check_status_exception_catchpoint(struct bpstats *bs)
enum print_stop_action(* print_it)(struct bpstats *bs)
void annotate_field(int num)
int ui_out_is_mi_like_p(struct ui_out *uiout)
struct symtabs_and_lines parse_probes(char **argptr, struct linespec_result *canonical)
void(* print_mention)(struct breakpoint *)
static struct value * compute_exception(struct gdbarch *argc, struct internalvar *var, void *ignore)
struct type * make_pointer_type(struct type *type, struct type **typeptr)
struct type * cplus_type_from_type_info(struct value *value)
struct value * value_ind(struct value *arg1)
static void catch_throw_command(char *arg, int from_tty, struct cmd_list_element *command)
static void print_mention_exception_catchpoint(struct breakpoint *b)
char * skip_spaces(char *chp)
void add_catch_command(char *name, char *docstring, cmd_sfunc_ftype *sfunc, completer_ftype *completer, void *user_data_catch, void *user_data_tcatch)
char * cplus_typename_from_type_info(struct value *value)
void ui_out_text(struct ui_out *uiout, const char *string)
static void fetch_probe_arguments(struct value **arg0, struct value **arg1)
void null_cleanup(void *arg)
int check_for_argument(char **str, char *arg, int arg_len)
static void handle_gnu_v3_exceptions(int tempflag, char *except_rx, char *cond_string, enum exception_event_kind ex_event, int from_tty)
static enum print_stop_action print_it_exception_catchpoint(bpstat bs)
#define CATCH(EXCEPTION, MASK)
static void print_one_exception_catchpoint(struct breakpoint *b, struct bp_location **last_loc)
void initialize_file_ftype(void)
void init_catchpoint(struct breakpoint *b, struct gdbarch *gdbarch, int tempflag, char *cond_string, const struct breakpoint_ops *ops)
struct cleanup * compile_rx_or_error(regex_t *pattern, const char *rx, const char *message)
unsigned get_probe_argument_count(struct probe *probe, struct frame_info *frame)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
void exception_print(struct ui_file *file, struct gdb_exception e)
static enum exception_event_kind classify_exception_breakpoint(struct breakpoint *b)
initialize_file_ftype _initialize_break_catch_throw
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
static struct breakpoint_ops gnu_v3_exception_catchpoint_ops
static void catch_catch_command(char *arg, int from_tty, struct cmd_list_element *command)
struct gdbarch * get_current_arch(void)
struct value * value_cast(struct type *type, struct value *arg2)
enum exception_event_kind kind
static void dtor_exception_catchpoint(struct breakpoint *self)
char * cp_canonicalize_string(const char *string)
struct breakpoint_ops bkpt_breakpoint_ops
void(* check_status)(struct bpstats *bs)
static void catch_exception_command_1(enum exception_event_kind ex_event, char *arg, int tempflag, int from_tty)
void print_recreate_thread(struct breakpoint *b, struct ui_file *fp)
struct breakpoint * breakpoint_at
void throw_exception(struct gdb_exception exception)
void discard_cleanups(struct cleanup *old_chain)
void install_breakpoint(int internal, struct breakpoint *b, int update_gll)
const char * async_reason_lookup(enum async_reply_reason reason)
struct ui_file * gdb_stderr
void update_breakpoint_locations(struct breakpoint *b, struct symtabs_and_lines sals, struct symtabs_and_lines sals_end)
void get_user_print_options(struct value_print_options *opts)
static char * extract_exception_regexp(char **string)
void(* print_one_detail)(const struct breakpoint *, struct ui_out *)
struct bound_probe find_probe_by_pc(CORE_ADDR pc)
static void re_set_exception_catchpoint(struct breakpoint *self)
char * ep_parse_optional_if_clause(char **arg)
void ui_out_field_core_addr(struct ui_out *uiout, const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void initialize_breakpoint_ops(void)
char * savestring(const char *ptr, size_t len)
void(* dtor)(struct breakpoint *self)
void ui_out_field_string(struct ui_out *uiout, const char *fldname, const char *string)
struct symtab_and_line * sals
struct value * evaluate_probe_argument(struct probe *probe, unsigned n, struct frame_info *frame)
void annotate_catchpoint(int num)
struct ui_out * current_uiout
static void initialize_throw_catchpoint_ops(void)
void(* print_one)(struct breakpoint *, struct bp_location **)
struct internalvar * create_internalvar_type_lazy(const char *name, const struct internalvar_funcs *funcs, void *data)
void error(const char *fmt,...)
void(* re_set)(struct breakpoint *self)
#define skip_to_space(INP)
static void print_one_detail_exception_catchpoint(const struct breakpoint *b, struct ui_out *uiout)
static void catch_rethrow_command(char *arg, int from_tty, struct cmd_list_element *command)
void do_cleanups(struct cleanup *old_chain)
const char * bpdisp_text(enum bpdisp disp)