#include "tdesc.h"
#include "x86-tdesc.h"
+using namespace windows_nat;
+
#ifndef CONTEXT_EXTENDED_REGISTERS
#define CONTEXT_EXTENDED_REGISTERS 0
#endif
static void
update_debug_registers (thread_info *thread)
{
- win32_thread_info *th = (win32_thread_info *) thread_target_data (thread);
+ windows_thread_info *th = (windows_thread_info *) thread_target_data (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. */
static DWORD64
win32_get_current_dr (int dr)
{
- win32_thread_info *th
- = (win32_thread_info *) thread_target_data (current_thread);
+ windows_thread_info *th
+ = (windows_thread_info *) thread_target_data (current_thread);
win32_require_context (th);
}
static void
-i386_get_thread_context (win32_thread_info *th)
+i386_get_thread_context (windows_thread_info *th)
{
/* Requesting the CONTEXT_EXTENDED_REGISTERS register set fails if
the system doesn't support extended registers. */
}
static void
-i386_prepare_to_resume (win32_thread_info *th)
+i386_prepare_to_resume (windows_thread_info *th)
{
if (th->debug_registers_changed)
{
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 (win32_thread_info *th)
+i386_thread_added (windows_thread_info *th)
{
- th->debug_registers_changed = 1;
+ th->debug_registers_changed = true;
}
static void
-i386_single_step (win32_thread_info *th)
+i386_single_step (windows_thread_info *th)
{
th->context.EFlags |= FLAG_TRACE_BIT;
}
/* Fetch register from gdbserver regcache data. */
static void
i386_fetch_inferior_register (struct regcache *regcache,
- win32_thread_info *th, int r)
+ windows_thread_info *th, int r)
{
char *context_offset = (char *) &th->context + mappings[r];
/* Store a new register value into the thread context of TH. */
static void
i386_store_inferior_register (struct regcache *regcache,
- win32_thread_info *th, int r)
+ windows_thread_info *th, int r)
{
char *context_offset = (char *) &th->context + mappings[r];
collect_register (regcache, r, context_offset);