GDBserver
Macros | Functions | Variables
win32-i386-low.c File Reference
#include "server.h"
#include "win32-low.h"
#include "x86-low.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

void init_registers_i386 (void)
 
static int update_debug_registers_callback (struct inferior_list_entry *entry, void *pid_p)
 
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

const struct target_desctdesc_i386
 
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

#define CONTEXT_EXTENDED_REGISTERS   0

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

Referenced by i386_get_thread_context().

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

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

Referenced by i386_fetch_inferior_register(), and i386_store_inferior_register().

#define FCS_REGNUM   27

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

Referenced by i386_fetch_inferior_register().

#define FLAG_TRACE_BIT   0x100

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

Referenced by i386_single_step().

#define FOP_REGNUM   31

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

Referenced by i386_fetch_inferior_register().

#define i386_win32_breakpoint_len   1

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

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

Referenced by win32_get_current_dr().

Function Documentation

static void i386_arch_setup ( void  )
static

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

References init_registers_i386(), tdesc_i386, and win32_tdesc.

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

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

References debug_reg_state, and x86_low_init_dregs().

static int i386_insert_point ( enum raw_bkpt_type  type,
CORE_ADDR  addr,
int  size,
struct raw_breakpoint bp 
)
static
static void i386_prepare_to_resume ( win32_thread_info th)
static
static int i386_remove_point ( enum raw_bkpt_type  type,
CORE_ADDR  addr,
int  size,
struct raw_breakpoint bp 
)
static
static void i386_single_step ( win32_thread_info th)
static

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

References win32_thread_info::context, and FLAG_TRACE_BIT.

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

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

References collect_register(), win32_thread_info::context, and context_offset.

static int i386_supports_z_point_type ( char  z_type)
static

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

References Z_PACKET_ACCESS_WP, and Z_PACKET_WRITE_WP.

static void i386_thread_added ( win32_thread_info th)
static

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

References win32_thread_info::debug_registers_changed.

void init_registers_i386 ( void  )

Referenced by i386_arch_setup().

static int update_debug_registers_callback ( struct inferior_list_entry entry,
void *  pid_p 
)
static
static DWORD64 win32_get_current_dr ( int  dr)
static
static CORE_ADDR x86_dr_low_get_addr ( int  regnum)
static

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

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

static unsigned long x86_dr_low_get_control ( void  )
static

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

References win32_get_current_dr().

static unsigned long x86_dr_low_get_status ( void  )
static

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

References win32_get_current_dr().

static void x86_dr_low_set_addr ( int  regnum,
CORE_ADDR  addr 
)
static
static void x86_dr_low_set_control ( unsigned long  control)
static
static int x86_stopped_by_watchpoint ( void  )
static

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

References debug_reg_state, and x86_dr_stopped_by_watchpoint().

static CORE_ADDR x86_stopped_data_address ( void  )
static

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

References debug_reg_state, and x86_dr_stopped_data_address().

Variable Documentation

struct x86_debug_reg_state debug_reg_state
static
const unsigned char i386_win32_breakpoint = 0xcc
static

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

const int mappings[]
static

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

const struct target_desc* tdesc_i386

Referenced by i386_arch_setup().

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 459 of file win32-i386-low.c.

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 139 of file win32-i386-low.c.