+2021-04-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ * continuations.h (do_all_inferior_continuations): Remove the 'err'
+ parameter. Update the references below.
+ * continuations.c (do_my_continuations_1)
+ (do_my_continuations)
+ (do_all_inferior_continuations): Update.
+ * inf-loop.c (inferior_event_handler): Update.
+ * infcmd.c (attach_command_continuation): Update.
+
2021-04-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
* infcmd.c (attach_post_wait): Update the function comment.
}
static void
-do_my_continuations_1 (struct continuation **pmy_chain, int err)
+do_my_continuations_1 (struct continuation **pmy_chain)
{
struct continuation *ptr;
while ((ptr = *pmy_chain) != NULL)
{
*pmy_chain = ptr->next; /* Do this first in case of recursion. */
- (*ptr->function) (ptr->arg, err);
+ (*ptr->function) (ptr->arg);
if (ptr->free_arg)
(*ptr->free_arg) (ptr->arg);
xfree (ptr);
}
static void
-do_my_continuations (struct continuation **list, int err)
+do_my_continuations (struct continuation **list)
{
struct continuation *continuations;
*list = NULL;
/* Work now on the list we have set aside. */
- do_my_continuations_1 (&continuations, err);
+ do_my_continuations_1 (&continuations);
}
static void
/* Do all continuations of the current inferior. */
void
-do_all_inferior_continuations (int err)
+do_all_inferior_continuations ()
{
struct inferior *inf = current_inferior ();
- do_my_continuations (&inf->continuations, err);
+ do_my_continuations (&inf->continuations);
}
/* Get rid of all the inferior-wide continuations of INF. */
/* Prototype of the continuation callback functions. ARG is the
continuation argument registered in the corresponding
- add_*_continuation call. ERR is true when the command should be
- cancelled instead of finished normally. In that case, the
- continuation should clean up whatever state had been set up for the
- command in question (e.g., remove momentary breakpoints). This
- happens e.g., when an error was thrown while handling a target
- event, or when the inferior thread the command was being executed
- on exits. */
-typedef void (continuation_ftype) (void *arg, int err);
+ add_*_continuation call. */
+typedef void (continuation_ftype) (void *arg);
/* Prototype of the function responsible for releasing the argument
passed to the continuation callback functions, either when the
extern void add_inferior_continuation (continuation_ftype *,
void *,
continuation_free_arg_ftype *);
-extern void do_all_inferior_continuations (int err);
+extern void do_all_inferior_continuations ();
extern void discard_all_inferior_continuations (struct inferior *inf);
#endif
/* Do all continuations associated with the whole inferior (not
a particular thread). */
if (inferior_ptid != null_ptid)
- do_all_inferior_continuations (0);
+ do_all_inferior_continuations ();
/* When running a command list (from a user command, say), these
are only run when the command list is all done. */
};
static void
-attach_command_continuation (void *args, int err)
+attach_command_continuation (void *args)
{
struct attach_command_continuation_args *a
= (struct attach_command_continuation_args *) args;
- if (err)
- return;
-
attach_post_wait (a->from_tty, a->mode);
}