diff options
author | Pedro Alves <pedro@codesourcery.com> | 2008-07-12 19:25:42 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2008-07-12 19:25:42 +0000 |
commit | 25689c9841bbf78589d6e3d014d1c018200c8a20 (patch) | |
tree | b3029e8dc0b6fc8af9c7ae82af059001e22cf97e /gdb/breakpoint.c | |
parent | 80c78add4d9210932d785257a3b591a7b228161e (diff) | |
download | gdb-25689c9841bbf78589d6e3d014d1c018200c8a20.tar.gz |
2008-07-12 Pedro Alves <pedro@codesourcery.com>
Rewrite continuations internals on top of cleanups and plug
continuation arguments leaks.
* defs.h (struct continuation): Make it opaque.
(add_continuation, add_intermediate_continuation): Drop the int
argument of the continuation hook argument. Add
continuation_free_args argument.
(do_all_continuations, do_all_intermediate_continuations): Drop
the error_p argument.
* utils.c (add_continuation): Drop the int argument of the
continuation hook argument. Add continuation_free_args argument.
Reimplement on top of cleanups.
(do_all_continuations): Drop error argument. Reimplement on top
of cleanups.
(discard_all_continuations): Reimplement on top of cleanups.
(add_intermediate_continuation): Drop the int argument of the
continuation hook argument. Add continuation_free_args argument.
Reimplement on top of cleanups.
(do_all_intermediate_continuations): Drop error argument.
Reimplement on top of cleanups.
(discard_all_intermediate_continuations): Reimplement on top of
cleanups.
* breakpoint.c (until_break_command_continuation): Drop error
argument. Add xfree as continuation argument deleter.
* inf-loop.c (inferior_event_handler): On error, discard all
continuations. Adjust to new do_all_intermediate_continuations
and do_all_continuations interfaces.
* infcmd.c (step_1_continuation): Drop error_p argument. Adjust.
Pass xfree as continuation argument deleter.
(finish_command_continuation): Drop error_p argument. Adjust.
(finish_command_continuation_free_arg): New.
(finish_command): Pass finish_command_continuation_free_arg as
continuation argument deleter. Adjust to new do_all_continuations
interfaces.
(attach_command_continuation): Drop error_p argument.
(attach_command_continuation_free_args): New.
(attach_command): Pass attach_command_continuation_free_args as
continuation argument deleter.
* interps.c (interp_set): Adjust to new do_all_continuations
interfaces.
* event-top.c (stdin_event_handler): In error, also discard the
intermediate continuations.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index ecef7fd5945..55cd0d86a82 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -62,8 +62,6 @@ /* Prototypes for local functions. */ -static void until_break_command_continuation (void *arg, int error); - static void catch_command_1 (char *, int, int); static void enable_delete_command (char *, int); @@ -6161,7 +6159,7 @@ struct until_break_command_continuation_args care of cleaning up the temporary breakpoints set up by the until command. */ static void -until_break_command_continuation (void *arg, int error) +until_break_command_continuation (void *arg) { struct until_break_command_continuation_args *a = arg; @@ -6243,7 +6241,8 @@ until_break_command (char *arg, int from_tty, int anywhere) args->breakpoint2 = breakpoint2; discard_cleanups (old_chain); - add_continuation (until_break_command_continuation, args); + add_continuation (until_break_command_continuation, args, + xfree); } else do_cleanups (old_chain); |