68 {
"-probe-stap libstdcxx:throw",
"__cxa_throw" },
69 {
"-probe-stap libstdcxx:rethrow",
"__cxa_rethrow" },
70 {
"-probe-stap libstdcxx:catch",
"__cxa_begin_catch" }
109 if (pc_probe.
prob == NULL
114 error (
_(
"not stopped at a C++ exception catchpoint"));
118 error (
_(
"C++ exception catchpoint has too few arguments"));
124 if ((arg0 != NULL && *arg0 == NULL) || *arg1 == NULL)
125 error (
_(
"error computing probe argument at c++ exception catchpoint"));
154 if (self->pattern == NULL)
159 struct value *typeinfo_arg;
167 std::swap (type_name, canon);
175 if (!type_name.empty ())
177 if (self->pattern->exec (type_name.c_str (), 0, NULL, 0) != 0)
187 std::vector<symtab_and_line> sals;
196 sals =
parse_probes (location.get (), filter_pspace, NULL);
210 sals =
self->ops->decode_location (
self, location.get (),
239 uiout->
text (bp_temp ?
"Temporary catchpoint " 245 :
" (exception rethrown), ")));
311 uiout->
text (
_(
"\tmatching: "));
325 uiout->
text (bp_temp ?
_(
"Temporary catchpoint ")
330 :
_(
" (rethrow)"))));
362 const char *cond_string,
365 std::unique_ptr<compiled_regex> pattern;
367 if (!except_rx.empty ())
370 _(
"invalid type-matching regexp")));
381 cp->exception_rx = std::move (except_rx);
382 cp->pattern = std::move (pattern);
403 const char *last, *last_space;
409 while (*last !=
'\0')
411 const char *if_token = last;
423 if (last_space > start)
434 int tempflag,
int from_tty)
436 const char *cond_string = NULL;
446 if ((*arg !=
'\0') && !isspace (*arg))
447 error (
_(
"Junk at end of arguments."));
452 error (
_(
"Unsupported or unknown exception event; cannot catch it"));
496 static struct value *
499 struct value *arg0, *arg1;
500 struct type *obj_type;
548 Catch an exception, when caught."),
554 Catch an exception, when thrown."),
560 Catch an exception, when rethrown."),
void(* print_recreate)(struct breakpoint *, struct ui_file *fp)
static std::string extract_exception_regexp(const char **string)
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)
virtual struct value * evaluate_argument(unsigned n, struct frame_info *frame)=0
void field_core_addr(const char *fldname, struct gdbarch *gdbarch, CORE_ADDR address)
CORE_ADDR get_frame_pc(struct frame_info *frame)
void field_string(const char *fldname, const char *string)
static void check_status_exception_catchpoint(struct bpstats *bs)
static const struct internalvar_funcs exception_funcs
enum print_stop_action(* print_it)(struct bpstats *bs)
void install_breakpoint(int internal, std::unique_ptr< breakpoint > &&arg, int update_gll)
void annotate_field(int num)
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 print_mention_exception_catchpoint(struct breakpoint *b)
static void catch_rethrow_command(const char *arg, int from_tty, struct cmd_list_element *command)
char * skip_spaces(char *chp)
void text(const char *string)
const std::string & get_provider() const
void initialize_explicit_location(struct explicit_location *explicit_loc)
static void handle_gnu_v3_exceptions(int tempflag, std::string &&except_rx, const char *cond_string, enum exception_event_kind ex_event, int from_tty)
static void fetch_probe_arguments(struct value **arg0, struct value **arg1)
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)
const std::string & get_name() const
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
void exception_print(struct ui_file *file, struct gdb_exception e)
static void catch_exception_command_1(enum exception_event_kind ex_event, const char *arg, int tempflag, int from_tty)
static enum exception_event_kind classify_exception_breakpoint(struct breakpoint *b)
void update_breakpoint_locations(struct breakpoint *b, struct program_space *filter_pspace, gdb::array_view< const symtab_and_line > sals, gdb::array_view< const symtab_and_line > sals_end)
std::vector< symtab_and_line > parse_probes(const struct event_location *location, struct program_space *search_pspace, struct linespec_result *canonical)
static struct breakpoint_ops gnu_v3_exception_catchpoint_ops
struct gdbarch * get_current_arch(void)
void _initialize_break_catch_throw(void)
struct value * value_cast(struct type *type, struct value *arg2)
event_location_up new_explicit_location(const struct explicit_location *explicit_loc)
const char * skip_to_space(const char *chp)
std::unique_ptr< event_location, event_location_deleter > event_location_up
enum exception_event_kind kind
struct breakpoint_ops bkpt_breakpoint_ops
virtual unsigned get_argument_count(struct frame_info *frame)=0
void(* check_status)(struct bpstats *bs)
static void catch_throw_command(const char *arg, int from_tty, struct cmd_list_element *command)
std::string cplus_typename_from_type_info(struct value *value)
const char * ep_parse_optional_if_clause(const char **arg)
void print_recreate_thread(struct breakpoint *b, struct ui_file *fp)
event_location_up new_probe_location(const char *probe)
struct breakpoint * breakpoint_at
void throw_exception(struct gdb_exception exception)
static void catch_catch_command(const char *arg, int from_tty, struct cmd_list_element *command)
const char * async_reason_lookup(enum async_reply_reason reason)
void add_catch_command(const char *name, const char *docstring, cmd_const_sfunc_ftype *sfunc, completer_ftype *completer, void *user_data_catch, void *user_data_tcatch)
void field_int(const char *fldname, int value)
static const struct exception_names exception_functions[]
void get_user_print_options(struct value_print_options *opts)
std::string cp_canonicalize_string(const 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)
struct program_space * current_program_space
static int ignore(struct target_ops *ops, struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
void initialize_breakpoint_ops(void)
void annotate_catchpoint(int num)
std::unique_ptr< compiled_regex > pattern
static void initialize_throw_catchpoint_ops(void)
void(* print_one)(struct breakpoint *, struct bp_location **)
void maybe_print_thread_hit_breakpoint(struct ui_out *uiout)
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)
int check_for_argument(const char **str, const char *arg, int arg_len)
static void print_one_detail_exception_catchpoint(const struct breakpoint *b, struct ui_out *uiout)
const char * bpdisp_text(enum bpdisp disp)
void init_catchpoint(struct breakpoint *b, struct gdbarch *gdbarch, int tempflag, const char *cond_string, const struct breakpoint_ops *ops)