@@ -44,7 +44,7 @@ update_debug_registers (thread_info *thread)
/* The actual update is done later just before resuming the lwp,
we just mark that the registers need updating. */
- th->debug_registers_changed = 1;
+ th->debug_registers_changed = true;
}
/* Update the inferior's debug register REGNUM from STATE. */
@@ -253,14 +253,14 @@ i386_prepare_to_resume (windows_thread_info *th)
FIXME: should we set dr6 also ?? */
th->context.Dr7 = dr->dr_control_mirror;
- th->debug_registers_changed = 0;
+ th->debug_registers_changed = false;
}
}
static void
i386_thread_added (windows_thread_info *th)
{
- th->debug_registers_changed = 1;
+ th->debug_registers_changed = true;
}
static void
@@ -46,7 +46,9 @@ struct windows_thread_info
/* Thread Information Block address. */
CORE_ADDR thread_local_base;
- /* Non zero if SuspendThread was called on this thread. */
+ /* This keeps track of whether SuspendThread was called on this
+ thread. -1 means there was a failure, 1 means it was called, and
+ 0 means it was not. */
int suspended = 0;
#ifdef _WIN32_WCE
@@ -59,11 +61,11 @@ struct windows_thread_info
/* Whether debug registers changed since we last set CONTEXT back to
the thread. */
- int debug_registers_changed = 0;
+ bool debug_registers_changed = false;
/* Nonzero if CONTEXT is invalidated and must be re-read from the
inferior thread. */
- int reload_context = 0;
+ bool reload_context = false;
/* The name of the thread, allocated by xmalloc. */
char *name = nullptr;
@@ -400,7 +400,7 @@ thread_rec (DWORD id, int get_context)
}
else if (get_context < 0)
th->suspended = -1;
- th->reload_context = 1;
+ th->reload_context = true;
}
return th;
}
@@ -604,7 +604,7 @@ windows_nat_target::fetch_registers (struct regcache *regcache, int r)
dr[7] = th->context.Dr7;
}
}
- th->reload_context = 0;
+ th->reload_context = false;
}
if (r < 0)