diff options
Diffstat (limited to 'gdb/guile/scm-breakpoint.c')
-rw-r--r-- | gdb/guile/scm-breakpoint.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/guile/scm-breakpoint.c b/gdb/guile/scm-breakpoint.c index 9189446..3a1e4d3 100644 --- a/gdb/guile/scm-breakpoint.c +++ b/gdb/guile/scm-breakpoint.c @@ -413,8 +413,6 @@ gdbscm_register_breakpoint_x (SCM self) = bpscm_get_breakpoint_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME); struct gdb_exception except = exception_none; char *location, *copy; - struct event_location *eloc; - struct cleanup *cleanup; /* We only support registering breakpoints created with make-breakpoint. */ if (!bp_smob->is_scheme_bkpt) @@ -426,8 +424,8 @@ gdbscm_register_breakpoint_x (SCM self) pending_breakpoint_scm = self; location = bp_smob->spec.location; copy = skip_spaces (location); - eloc = string_to_event_location_basic (©, current_language); - cleanup = make_cleanup_delete_event_location (eloc); + event_location_up eloc = string_to_event_location_basic (©, + current_language); TRY { @@ -438,7 +436,7 @@ gdbscm_register_breakpoint_x (SCM self) case bp_breakpoint: { create_breakpoint (get_current_arch (), - eloc, NULL, -1, NULL, + eloc.get (), NULL, -1, NULL, 0, 0, bp_breakpoint, 0, @@ -474,7 +472,6 @@ gdbscm_register_breakpoint_x (SCM self) /* Ensure this gets reset, even if there's an error. */ pending_breakpoint_scm = SCM_BOOL_F; GDBSCM_HANDLE_GDB_EXCEPTION (except); - do_cleanups (cleanup); return SCM_UNSPECIFIED; } |