GDB (xrefs)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/i386gnu-nat.c File Reference
#include "defs.h"
#include "inferior.h"
#include "floatformat.h"
#include "regcache.h"
#include "gdb_assert.h"
#include <errno.h>
#include <stdio.h>
#include "gdb_string.h"
#include <mach.h>
#include <mach_error.h>
#include <mach/message.h>
#include <mach/exception.h>
#include "i386-tdep.h"
#include "gnu-nat.h"
#include "i387-tdep.h"

Go to the source code of this file.

Defines

#define REG_OFFSET(reg)   offsetof (struct i386_thread_state, reg)
#define CREG_OFFSET(reg)   (REG_##reg * 4)
#define REG_ADDR(state, regnum)   ((char *)(state) + reg_offset[regnum])
#define CREG_ADDR(state, regnum)   ((const char *)(state) + creg_offset[regnum])

Functions

static void fetch_fpregs (struct regcache *regcache, struct proc *thread)
static void gnu_fetch_registers (struct target_ops *ops, struct regcache *regcache, int regno)
static void store_fpregs (const struct regcache *regcache, struct proc *thread, int regno)
static void gnu_store_registers (struct target_ops *ops, struct regcache *regcache, int regno)
void _initialize_i386gnu_nat (void)

Variables

static int reg_offset []
static int creg_offset []
initialize_file_ftype _initialize_i386gnu_nat

Define Documentation

#define CREG_ADDR (   state,
  regnum 
)    ((const char *)(state) + creg_offset[regnum])

Definition at line 72 of file i386gnu-nat.c.

#define CREG_OFFSET (   reg)    (REG_##reg * 4)

Definition at line 59 of file i386gnu-nat.c.

#define REG_ADDR (   state,
  regnum 
)    ((char *)(state) + reg_offset[regnum])

Definition at line 71 of file i386gnu-nat.c.

Referenced by gnu_fetch_registers(), and gnu_store_registers().

#define REG_OFFSET (   reg)    offsetof (struct i386_thread_state, reg)

Definition at line 46 of file i386gnu-nat.c.


Function Documentation

void _initialize_i386gnu_nat ( void  )
static void fetch_fpregs ( struct regcache regcache,
struct proc thread 
) [static]

Definition at line 79 of file i386gnu-nat.c.

References _, i387_supply_fsave(), proc::port, proc_string(), and warning().

Referenced by gnu_fetch_registers().

static void gnu_fetch_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
) [static]
static void gnu_store_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
) [static]
static void store_fpregs ( const struct regcache regcache,
struct proc thread,
int  regno 
) [static]

Definition at line 187 of file i386gnu-nat.c.

References _, i387_collect_fsave(), proc::port, proc_string(), and warning().

Referenced by gnu_store_registers().


Variable Documentation

int creg_offset[] [static]
Initial value:
{
  CREG_OFFSET (EAX), CREG_OFFSET (ECX), CREG_OFFSET (EDX), CREG_OFFSET (EBX),
  CREG_OFFSET (UESP), CREG_OFFSET (EBP), CREG_OFFSET (ESI), CREG_OFFSET (EDI),
  CREG_OFFSET (EIP), CREG_OFFSET (EFL), CREG_OFFSET (CS), CREG_OFFSET (SS),
  CREG_OFFSET (DS), CREG_OFFSET (ES), CREG_OFFSET (FS), CREG_OFFSET (GS)
}

Definition at line 63 of file i386gnu-nat.c.

int reg_offset[] [static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines