22 #ifndef CONTEXT_EXTENDED_REGISTERS
23 #define CONTEXT_EXTENDED_REGISTERS 0
29 #define FLAG_TRACE_BIT 0x100
33 void init_registers_amd64 (
void);
49 int pid = *(
int *) pid_p;
98 return th->context.Dr ## DR
177 hw_type, addr, size);
198 hw_type, addr, size);
235 th->
context.ContextFlags = (CONTEXT_FULL
237 | CONTEXT_DEBUG_REGISTERS
238 | extended_registers);
240 if (!GetThreadContext (th->
h, &th->
context))
242 DWORD e = GetLastError ();
244 if (extended_registers && e == ERROR_INVALID_PARAMETER)
246 extended_registers = 0;
250 error (
"GetThreadContext failure %ld\n", (
long) e);
296 #define context_offset(x) ((int)&(((CONTEXT *)NULL)->x))
297 static const int mappings[] = {
342 #undef context_offset
346 #define context_offset(x) (offsetof (CONTEXT, x))
347 static const int mappings[] =
409 #undef context_offset
423 l = *((
long *) context_offset) & 0xffff;
428 l = (*((
long *) context_offset) >> 16) & ((1 << 11) - 1);
444 static const unsigned char i386_win32_breakpoint = 0xcc;
445 #define i386_win32_breakpoint_len 1
451 init_registers_amd64 ();
461 sizeof (
mappings) /
sizeof (mappings[0]),
enum target_hw_bp_type raw_bkpt_type_to_target_hw_bp_type(enum raw_bkpt_type raw_type)
struct thread_info * current_thread
void collect_register(struct regcache *regcache, int n, void *buf)
static void i386_prepare_to_resume(win32_thread_info *th)
static int i386_supports_z_point_type(char z_type)
unsigned dr_control_mirror
int x86_dr_remove_watchpoint(struct x86_debug_reg_state *state, enum target_hw_bp_type type, CORE_ADDR addr, int len)
static void i386_get_thread_context(win32_thread_info *th)
int x86_dr_stopped_data_address(struct x86_debug_reg_state *state, CORE_ADDR *addr_p)
static CORE_ADDR x86_dr_low_get_addr(int regnum)
void init_registers_i386(void)
static unsigned long x86_dr_low_get_control(void)
void win32_require_context(win32_thread_info *th)
static int update_debug_registers_callback(struct inferior_list_entry *entry, void *pid_p)
void * inferior_target_data(struct thread_info *inferior)
int x86_dr_insert_watchpoint(struct x86_debug_reg_state *state, enum target_hw_bp_type type, CORE_ADDR addr, int len)
#define context_offset(x)
static CORE_ADDR x86_stopped_data_address(void)
CORE_ADDR dr_mirror[DR_NADDR]
#define CONTEXT_EXTENDED_REGISTERS
static struct x86_debug_reg_state debug_reg_state
#define gdb_assert_not_reached(message)
static int x86_stopped_by_watchpoint(void)
static unsigned long x86_dr_low_get_status(void)
static int i386_insert_point(enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
struct inferior_list all_threads
int x86_dr_stopped_by_watchpoint(struct x86_debug_reg_state *state)
void x86_low_init_dregs(struct x86_debug_reg_state *state)
static void i386_thread_added(win32_thread_info *th)
#define CONTEXT_FLOATING_POINT
#define i386_win32_breakpoint_len
int debug_registers_changed
const struct target_desc * tdesc_i386
static const int mappings[]
static void i386_arch_setup(void)
const struct target_desc * win32_tdesc
static void i386_single_step(win32_thread_info *th)
#define Z_PACKET_ACCESS_WP
static void x86_dr_low_set_control(unsigned long control)
static void x86_dr_low_set_addr(int regnum, CORE_ADDR addr)
static void i386_initial_stuff(void)
static const unsigned char i386_win32_breakpoint
void supply_register(struct regcache *regcache, int n, const void *buf)
void error(const char *fmt,...)
static int i386_remove_point(enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
#define Z_PACKET_WRITE_WP
struct inferior_list_entry * find_inferior(struct inferior_list *list, int(*func)(struct inferior_list_entry *, void *), void *arg)
static void i386_fetch_inferior_register(struct regcache *regcache, win32_thread_info *th, int r)
static void i386_store_inferior_register(struct regcache *regcache, win32_thread_info *th, int r)
static DWORD64 win32_get_current_dr(int dr)