aboutsummaryrefslogtreecommitdiff
path: root/gdb/break-catch-throw.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/break-catch-throw.c')
-rw-r--r--gdb/break-catch-throw.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 2e18d2a..2714bbf 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -205,17 +205,14 @@ re_set_exception_catchpoint (struct breakpoint *self)
struct symtabs_and_lines sals_end = {0};
struct cleanup *cleanup;
enum exception_event_kind kind = classify_exception_breakpoint (self);
- struct event_location *location;
struct program_space *filter_pspace = current_program_space;
/* We first try to use the probe interface. */
TRY
{
- location
+ event_location_up location
= new_probe_location (exception_functions[kind].probe);
- cleanup = make_cleanup_delete_event_location (location);
- sals = parse_probes (location, filter_pspace, NULL);
- do_cleanups (cleanup);
+ sals = parse_probes (location.get (), filter_pspace, NULL);
}
CATCH (e, RETURN_MASK_ERROR)
{
@@ -228,10 +225,9 @@ re_set_exception_catchpoint (struct breakpoint *self)
initialize_explicit_location (&explicit_loc);
explicit_loc.function_name
= ASTRDUP (exception_functions[kind].function);
- location = new_explicit_location (&explicit_loc);
- cleanup = make_cleanup_delete_event_location (location);
- self->ops->decode_location (self, location, filter_pspace, &sals);
- do_cleanups (cleanup);
+ event_location_up location = new_explicit_location (&explicit_loc);
+ self->ops->decode_location (self, location.get (), filter_pspace,
+ &sals);
}
CATCH (ex, RETURN_MASK_ERROR)
{