static void
re_set_exception_catchpoint (struct breakpoint *self)
{
- struct symtabs_and_lines sals = {0};
- struct symtabs_and_lines sals_end = {0};
- struct cleanup *cleanup;
+ std::vector<symtab_and_line> sals;
enum exception_event_kind kind = classify_exception_breakpoint (self);
struct program_space *filter_pspace = current_program_space;
explicit_loc.function_name
= ASTRDUP (exception_functions[kind].function);
event_location_up location = new_explicit_location (&explicit_loc);
- self->ops->decode_location (self, location.get (), filter_pspace,
- &sals);
+ sals = self->ops->decode_location (self, location.get (),
+ filter_pspace);
}
CATCH (ex, RETURN_MASK_ERROR)
{
}
END_CATCH
- cleanup = make_cleanup (xfree, sals.sals);
- update_breakpoint_locations (self, filter_pspace, sals, sals_end);
- do_cleanups (cleanup);
+ update_breakpoint_locations (self, filter_pspace, sals, {});
}
static enum print_stop_action
the right thing. */
cp->type = bp_breakpoint;
cp->kind = ex_event;
- cp->exception_rx = except_rx;
+ cp->exception_rx = std::move (except_rx);
cp->pattern = std::move (pattern);
re_set_exception_catchpoint (cp.get ());
- install_breakpoint (0, cp.get (), 1);
- cp.release ();
+ install_breakpoint (0, std::move (cp), 1);
}
/* Look for an "if" token in *STRING. The "if" token must be preceded
const char *start;
const char *last, *last_space;
- start = skip_spaces_const (*string);
+ start = skip_spaces (*string);
last = start;
last_space = start;
/* No "if" token here. Skip to the next word start. */
last_space = skip_to_space (last);
- last = skip_spaces_const (last_space);
+ last = skip_spaces (last_space);
}
*string = last;
if (!arg)
arg = "";
- arg = skip_spaces_const (arg);
+ arg = skip_spaces (arg);
std::string except_rx = extract_exception_regexp (&arg);
ops->check_status = check_status_exception_catchpoint;
}
-initialize_file_ftype _initialize_break_catch_throw;
-
void
_initialize_break_catch_throw (void)
{