static struct cleanup *cleanup_chain; /* cleaned up after a failed command */
static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */
-static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */
/* Pointer to what is left to do for an execution command after the
target stops. Used only in asynchronous mode, by targets that
return make_my_cleanup (&final_cleanup_chain, function, arg);
}
-struct cleanup *
-make_exec_cleanup (make_cleanup_ftype *function, void *arg)
-{
- return make_my_cleanup (&exec_cleanup_chain, function, arg);
-}
-
static void
do_freeargv (void *arg)
{
do_my_cleanups (&final_cleanup_chain, old_chain);
}
-void
-do_exec_cleanups (struct cleanup *old_chain)
-{
- do_my_cleanups (&exec_cleanup_chain, old_chain);
-}
-
static void
do_my_cleanups (struct cleanup **pmy_chain,
struct cleanup *old_chain)
/* Add a continuation to the continuation list, the global list
cmd_continuation. The new continuation will be added at the front.*/
void
-add_continuation (void (*continuation_hook) (struct continuation_arg *),
+add_continuation (void (*continuation_hook) (struct continuation_arg *, int),
struct continuation_arg *arg_list)
{
struct continuation *continuation_ptr;
and do the continuations from there on, instead of using the
global beginning of list as our iteration pointer. */
void
-do_all_continuations (void)
+do_all_continuations (int error)
{
struct continuation *continuation_ptr;
struct continuation *saved_continuation;
/* Work now on the list we have set aside. */
while (continuation_ptr)
{
- (continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
+ (continuation_ptr->continuation_hook) (continuation_ptr->arg_list, error);
saved_continuation = continuation_ptr;
continuation_ptr = continuation_ptr->next;
xfree (saved_continuation);
the front. */
void
add_intermediate_continuation (void (*continuation_hook)
- (struct continuation_arg *),
+ (struct continuation_arg *, int),
struct continuation_arg *arg_list)
{
struct continuation *continuation_ptr;
and do the continuations from there on, instead of using the
global beginning of list as our iteration pointer.*/
void
-do_all_intermediate_continuations (void)
+do_all_intermediate_continuations (int error)
{
struct continuation *continuation_ptr;
struct continuation *saved_continuation;
/* Work now on the list we have set aside. */
while (continuation_ptr)
{
- (continuation_ptr->continuation_hook) (continuation_ptr->arg_list);
+ (continuation_ptr->continuation_hook) (continuation_ptr->arg_list, error);
saved_continuation = continuation_ptr;
continuation_ptr = continuation_ptr->next;
xfree (saved_continuation);