#include "cli/cli-decode.h"
#include "gdb_regex.h"
#include "cli/cli-utils.h"
-#include "continuations.h"
+#include "thread-fsm.h"
/* Definition of struct thread_info exported to gdbthread.h. */
&& breakpoint_has_location_inserted_here (ss_bps, aspace, addr));
}
+/* See gdbthread.h. */
+
+void
+thread_cancel_execution_command (struct thread_info *thr)
+{
+ if (thr->thread_fsm != NULL)
+ {
+ thread_fsm_clean_up (thr->thread_fsm);
+ thread_fsm_delete (thr->thread_fsm);
+ thr->thread_fsm = NULL;
+ }
+}
+
static void
clear_thread_inferior_resources (struct thread_info *tp)
{
btrace_teardown (tp);
- do_all_intermediate_continuations_thread (tp, 1);
- do_all_continuations_thread (tp, 1);
+ thread_cancel_execution_command (tp);
}
static void
static void
disable_thread_stack_temporaries (void *data)
{
- ptid_t *pd = data;
+ ptid_t *pd = (ptid_t *) data;
struct thread_info *tp = find_thread_ptid (*pd);
if (tp != NULL)
void
finish_thread_state_cleanup (void *arg)
{
- ptid_t *ptid_p = arg;
+ ptid_t *ptid_p = (ptid_t *) arg;
gdb_assert (arg);
do_restore_current_thread_cleanup (void *arg)
{
struct thread_info *tp;
- struct current_thread_cleanup *old = arg;
+ struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
tp = find_thread_ptid (old->inferior_ptid);
static void
restore_current_thread_cleanup_dtor (void *arg)
{
- struct current_thread_cleanup *old = arg;
+ struct current_thread_cleanup *old = (struct current_thread_cleanup *) arg;
struct thread_info *tp;
struct inferior *inf;
set_thread_refcount (void *data)
{
int k;
- struct thread_array_cleanup *ta_cleanup = data;
+ struct thread_array_cleanup *ta_cleanup
+ = (struct thread_array_cleanup *) data;
for (k = 0; k != ta_cleanup->count; k++)
ta_cleanup->tp_array[k]->refcount--;
static int
tp_array_compar (const void *ap_voidp, const void *bp_voidp)
{
- const struct thread_info *const *ap = ap_voidp;
- const struct thread_info *const *bp = bp_voidp;
+ const struct thread_info *const *ap
+ = (const struct thread_info * const*) ap_voidp;
+ const struct thread_info *const *bp
+ = (const struct thread_info * const*) bp_voidp;
return ((((*ap)->num > (*bp)->num) - ((*ap)->num < (*bp)->num))
* (tp_array_compar_ascending ? +1 : -1));
int num;
struct thread_info *tp;
- num = value_as_long (parse_and_eval (tidstr));
+ num = value_as_long (parse_and_eval ((const char *) tidstr));
tp = find_thread_id (num);