23 #include "arch/amd64.h" 25 #include "arch/i386.h" 28 #ifndef CONTEXT_EXTENDED_REGISTERS 29 #define CONTEXT_EXTENDED_REGISTERS 0 35 #define FLAG_TRACE_BIT 0x100 82 return th->context.Dr ## DR 161 hw_type, addr, size);
182 hw_type, addr, size);
219 th->
context.ContextFlags = (CONTEXT_FULL
221 | CONTEXT_DEBUG_REGISTERS
222 | extended_registers);
224 if (!GetThreadContext (th->
h, &th->
context))
226 DWORD e = GetLastError ();
228 if (extended_registers && e == ERROR_INVALID_PARAMETER)
230 extended_registers = 0;
234 error (
"GetThreadContext failure %ld\n", (
long) e);
280 #define context_offset(x) ((int)&(((CONTEXT *)NULL)->x)) 326 #undef context_offset 330 #define context_offset(x) (offsetof (CONTEXT, x)) 393 #undef context_offset 429 #define i386_win32_breakpoint_len 1 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)
constexpr int pid() const
static void i386_prepare_to_resume(win32_thread_info *th)
#define X86_XSTATE_SSE_MASK
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 void for_each_thread(Func func)
static CORE_ADDR x86_dr_low_get_addr(int regnum)
static unsigned long x86_dr_low_get_control(void)
void win32_require_context(win32_thread_info *th)
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)
void * thread_target_data(struct thread_info *thread)
struct win32_target_ops the_low_target
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)
int x86_dr_stopped_by_watchpoint(struct x86_debug_reg_state *state)
void init_target_desc(struct target_desc *tdesc)
void x86_low_init_dregs(struct x86_debug_reg_state *state)
static void i386_thread_added(win32_thread_info *th)
static void update_debug_registers(thread_info *thread)
#define CONTEXT_FLOATING_POINT
#define i386_win32_breakpoint_len
int debug_registers_changed
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)
struct x86_dr_low_type x86_dr_low
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
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)