GDBserver
Macros | Functions | Variables
win32-i386-low.c File Reference
#include "server.h"
#include "win32-low.h"
#include "x86-low.h"
#include "x86-xstate.h"
#include "arch/i386.h"
#include "tdesc.h"

Go to the source code of this file.

Macros

#define CONTEXT_EXTENDED_REGISTERS   0
 
#define FCS_REGNUM   27
 
#define FOP_REGNUM   31
 
#define FLAG_TRACE_BIT   0x100
 
#define RET_DR(DR)
 
#define context_offset(x)   ((int)&(((CONTEXT *)NULL)->x))
 
#define i386_win32_breakpoint_len   1
 

Functions

static void update_debug_registers (thread_info *thread)
 
static void x86_dr_low_set_addr (int regnum, CORE_ADDR addr)
 
static void x86_dr_low_set_control (unsigned long control)
 
static DWORD64 win32_get_current_dr (int dr)
 
static CORE_ADDR x86_dr_low_get_addr (int regnum)
 
static unsigned long x86_dr_low_get_control (void)
 
static unsigned long x86_dr_low_get_status (void)
 
static int i386_supports_z_point_type (char z_type)
 
static int i386_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
 
static int i386_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
 
static int x86_stopped_by_watchpoint (void)
 
static CORE_ADDR x86_stopped_data_address (void)
 
static void i386_initial_stuff (void)
 
static void i386_get_thread_context (win32_thread_info *th)
 
static void i386_prepare_to_resume (win32_thread_info *th)
 
static void i386_thread_added (win32_thread_info *th)
 
static void i386_single_step (win32_thread_info *th)
 
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 void i386_arch_setup (void)
 

Variables

static struct x86_debug_reg_state debug_reg_state
 
struct x86_dr_low_type x86_dr_low
 
static const int mappings []
 
static const unsigned char i386_win32_breakpoint = 0xcc
 
struct win32_target_ops the_low_target
 

Macro Definition Documentation

◆ CONTEXT_EXTENDED_REGISTERS

#define CONTEXT_EXTENDED_REGISTERS   0

Definition at line 29 of file win32-i386-low.c.

Referenced by i386_get_thread_context().

◆ context_offset

#define context_offset (   x)    ((int)&(((CONTEXT *)NULL)->x))

Definition at line 280 of file win32-i386-low.c.

Referenced by i386_fetch_inferior_register(), and i386_store_inferior_register().

◆ FCS_REGNUM

#define FCS_REGNUM   27

Definition at line 32 of file win32-i386-low.c.

Referenced by i386_fetch_inferior_register().

◆ FLAG_TRACE_BIT

#define FLAG_TRACE_BIT   0x100

Definition at line 35 of file win32-i386-low.c.

Referenced by i386_single_step().

◆ FOP_REGNUM

#define FOP_REGNUM   31

Definition at line 33 of file win32-i386-low.c.

Referenced by i386_fetch_inferior_register().

◆ i386_win32_breakpoint_len

#define i386_win32_breakpoint_len   1

Definition at line 429 of file win32-i386-low.c.

◆ RET_DR

#define RET_DR (   DR)
Value:
case DR: \
return th->context.Dr ## DR

Referenced by win32_get_current_dr().

Function Documentation

◆ i386_arch_setup()

static void i386_arch_setup ( void  )
static

Definition at line 432 of file win32-i386-low.c.

References init_target_desc(), win32_tdesc, and X86_XSTATE_SSE_MASK.

◆ i386_fetch_inferior_register()

static void i386_fetch_inferior_register ( struct regcache regcache,
win32_thread_info th,
int  r 
)
static

◆ i386_get_thread_context()

static void i386_get_thread_context ( win32_thread_info th)
static

◆ i386_initial_stuff()

static void i386_initial_stuff ( void  )
static

Definition at line 206 of file win32-i386-low.c.

References debug_reg_state, and x86_low_init_dregs().

◆ i386_insert_point()

static int i386_insert_point ( enum raw_bkpt_type  type,
CORE_ADDR  addr,
int  size,
struct raw_breakpoint bp 
)
static

◆ i386_prepare_to_resume()

static void i386_prepare_to_resume ( win32_thread_info th)
static

◆ i386_remove_point()

static int i386_remove_point ( enum raw_bkpt_type  type,
CORE_ADDR  addr,
int  size,
struct raw_breakpoint bp 
)
static

◆ i386_single_step()

static void i386_single_step ( win32_thread_info th)
static

Definition at line 266 of file win32-i386-low.c.

References win32_thread_info::context, and FLAG_TRACE_BIT.

◆ i386_store_inferior_register()

static void i386_store_inferior_register ( struct regcache regcache,
win32_thread_info th,
int  r 
)
static

◆ i386_supports_z_point_type()

static int i386_supports_z_point_type ( char  z_type)
static

Definition at line 136 of file win32-i386-low.c.

References Z_PACKET_ACCESS_WP, and Z_PACKET_WRITE_WP.

◆ i386_thread_added()

static void i386_thread_added ( win32_thread_info th)
static

Definition at line 260 of file win32-i386-low.c.

References win32_thread_info::debug_registers_changed.

◆ update_debug_registers()

static void update_debug_registers ( thread_info thread)
static

◆ win32_get_current_dr()

static DWORD64 win32_get_current_dr ( int  dr)
static

◆ x86_dr_low_get_addr()

static CORE_ADDR x86_dr_low_get_addr ( int  regnum)
static

Definition at line 100 of file win32-i386-low.c.

References DR_FIRSTADDR, DR_LASTADDR, gdb_assert, and win32_get_current_dr().

◆ x86_dr_low_get_control()

static unsigned long x86_dr_low_get_control ( void  )
static

Definition at line 108 of file win32-i386-low.c.

References win32_get_current_dr().

◆ x86_dr_low_get_status()

static unsigned long x86_dr_low_get_status ( void  )
static

Definition at line 117 of file win32-i386-low.c.

References win32_get_current_dr().

◆ x86_dr_low_set_addr()

static void x86_dr_low_set_addr ( int  regnum,
CORE_ADDR  addr 
)
static

◆ x86_dr_low_set_control()

static void x86_dr_low_set_control ( unsigned long  control)
static

◆ x86_stopped_by_watchpoint()

static int x86_stopped_by_watchpoint ( void  )
static

Definition at line 191 of file win32-i386-low.c.

References debug_reg_state, and x86_dr_stopped_by_watchpoint().

◆ x86_stopped_data_address()

static CORE_ADDR x86_stopped_data_address ( void  )
static

Definition at line 197 of file win32-i386-low.c.

References debug_reg_state, and x86_dr_stopped_data_address().

Variable Documentation

◆ debug_reg_state

struct x86_debug_reg_state debug_reg_state
static

◆ i386_win32_breakpoint

const unsigned char i386_win32_breakpoint = 0xcc
static

Definition at line 428 of file win32-i386-low.c.

◆ mappings

const int mappings[]
static

Definition at line 281 of file win32-i386-low.c.

Referenced by i386_fetch_inferior_register(), and i386_store_inferior_register().

◆ the_low_target

struct win32_target_ops the_low_target
Initial value:
= {
sizeof (mappings) / sizeof (mappings[0]),
}
static void i386_prepare_to_resume(win32_thread_info *th)
static int i386_supports_z_point_type(char z_type)
static void i386_get_thread_context(win32_thread_info *th)
static CORE_ADDR x86_stopped_data_address(void)
static int x86_stopped_by_watchpoint(void)
static int i386_insert_point(enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
static void i386_thread_added(win32_thread_info *th)
#define i386_win32_breakpoint_len
static const int mappings[]
static void i386_arch_setup(void)
static void i386_single_step(win32_thread_info *th)
static void i386_initial_stuff(void)
static const unsigned char i386_win32_breakpoint
static int i386_remove_point(enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
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)

Definition at line 448 of file win32-i386-low.c.

◆ x86_dr_low

struct x86_dr_low_type x86_dr_low
Initial value:
=
{
sizeof (void *),
}
static CORE_ADDR x86_dr_low_get_addr(int regnum)
static unsigned long x86_dr_low_get_control(void)
static unsigned long x86_dr_low_get_status(void)
static void x86_dr_low_set_control(unsigned long control)
static void x86_dr_low_set_addr(int regnum, CORE_ADDR addr)

Definition at line 123 of file win32-i386-low.c.