GDBserver

Classes | Macros | Typedefs | Enumerations | Functions | Variables
lynx-i386-low.c File Reference
`#include "server.h"`
`#include "lynx-low.h"`
`#include <limits.h>`
`#include <sys/ptrace.h>`
`#include "x86-xstate.h"`
`#include "arch/i386.h"`

Go to the source code of this file.

## Classes
struct | usr_econtext
struct | usr_fcontext
struct | usr_fcontext::ufp387_real
struct | usr_fcontext::uxmm_register

## Macros
#define | lynx_i386_collect_gp(regnum, fld)
#define | lynx_i386_supply_gp(regnum, fld)

## Typedefs
typedef struct usr_econtext | usr_econtext_t
typedef struct usr_fcontext | usr_fcontext_t

## Enumerations
enum | lynx_i386_gdb_regnum { I386_EAX_REGNUM, I386_ECX_REGNUM, I386_EDX_REGNUM, I386_EBX_REGNUM, I386_ESP_REGNUM, I386_EBP_REGNUM, I386_ESI_REGNUM, I386_EDI_REGNUM, I386_EIP_REGNUM, I386_EFLAGS_REGNUM, I386_CS_REGNUM, I386_SS_REGNUM, I386_DS_REGNUM, I386_ES_REGNUM, I386_FS_REGNUM, I386_GS_REGNUM, I386_ST0_REGNUM, I386_FCTRL_REGNUM = I386_ST0_REGNUM + 8, I386_FSTAT_REGNUM, I386_FTAG_REGNUM, I386_FISEG_REGNUM, I386_FIOFF_REGNUM, I386_FOSEG_REGNUM, I386_FOOFF_REGNUM, I386_FOP_REGNUM, I386_XMM0_REGNUM = 32, I386_MXCSR_REGNUM = I386_XMM0_REGNUM + 8, I386_SENTINEL_REGUM }

## Functions
static void | lynx_i386_fill_gregset (struct regcache *regcache, char *buf)
static void | lynx_i386_store_gregset (struct regcache *regcache, const char *buf)
static void | collect_16bit_register (struct regcache *regcache, int regnum, char *dest)
static void | lynx_i386_fill_fpregset (struct regcache *regcache, char *buf)
static void | supply_16bit_register (struct regcache *regcache, int regnum, const char *buf)
static void | lynx_i386_store_fpregset (struct regcache *regcache, const char *buf)
static void | lynx_i386_arch_setup (void)

## Variables
struct lynx_regset_info | lynx_target_regsets []
struct lynx_target_ops | the_low_target

## Macro Definition Documentation

## ◆ lynx_i386_collect_gp

#define lynx_i386_collect_gp | ( |  | regnum,
|  |  | fld
| ) |  |

Value:
collect_register (regcache, regnum, \
buf + offsetof (usr_econtext_t, uec_##fld))
collect_register
void collect_register(struct regcache *regcache, int n, void *buf)
Definition: regcache.c:402
regnum
regnum
Definition: linux-xtensa-low.c:34
regcache
Definition: regcache.h:31
usr_econtext
Definition: lynx-i386-low.c:30

Referenced by lynx_i386_fill_gregset().

## ◆ lynx_i386_supply_gp

#define lynx_i386_supply_gp | ( |  | regnum,
|  |  | fld
| ) |  |

Value:
supply_register (regcache, regnum, \
buf + offsetof (usr_econtext_t, uec_##fld))
regnum
regnum
Definition: linux-xtensa-low.c:34
regcache
Definition: regcache.h:31
supply_register
void supply_register(struct regcache *regcache, int n, const void *buf)
Definition: regcache.c:318
usr_econtext
Definition: lynx-i386-low.c:30

Referenced by lynx_i386_store_gregset().

## Typedef Documentation

## ◆ usr_econtext_t

typedef struct usr_econtext usr_econtext_t

## ◆ usr_fcontext_t

typedef struct usr_fcontext usr_fcontext_t

## Enumeration Type Documentation

## ◆ lynx_i386_gdb_regnum

enum lynx_i386_gdb_regnum

Enumerator
I386_EAX_REGNUM |
I386_ECX_REGNUM |
I386_EDX_REGNUM |
I386_EBX_REGNUM |
I386_ESP_REGNUM |
I386_EBP_REGNUM |
I386_ESI_REGNUM |
I386_EDI_REGNUM |
I386_EIP_REGNUM |
I386_EFLAGS_REGNUM |
I386_CS_REGNUM |
I386_SS_REGNUM |
I386_DS_REGNUM |
I386_ES_REGNUM |
I386_FS_REGNUM |
I386_GS_REGNUM |
I386_ST0_REGNUM |
I386_FCTRL_REGNUM |
I386_FSTAT_REGNUM |
I386_FTAG_REGNUM |
I386_FISEG_REGNUM |
I386_FIOFF_REGNUM |
I386_FOSEG_REGNUM |
I386_FOOFF_REGNUM |
I386_FOP_REGNUM |
I386_XMM0_REGNUM |
I386_MXCSR_REGNUM |
I386_SENTINEL_REGUM |

Definition at line 91 of file lynx-i386-low.c.

## Function Documentation

## ◆ collect_16bit_register()

static void collect_16bit_register | ( | struct regcache * | regcache,
|  | int | regnum,
|  | char * | dest
| ) |  |
| static

Definition at line 185 of file lynx-i386-low.c.

References collect_register().

Referenced by lynx_i386_fill_fpregset().

## ◆ lynx_i386_arch_setup()

static void lynx_i386_arch_setup | ( | void |  | ) |
| static

Definition at line 294 of file lynx-i386-low.c.

References init_target_desc(), lynx_tdesc, and X86_XSTATE_SSE_MASK.

## ◆ lynx_i386_fill_fpregset()

static void lynx_i386_fill_fpregset | ( | struct regcache * | regcache,
|  | char * | buf
| ) |  |
| static

Definition at line 196 of file lynx-i386-low.c.

References collect_16bit_register(), collect_register(), I386_FCTRL_REGNUM, I386_FIOFF_REGNUM, I386_FISEG_REGNUM, I386_FOOFF_REGNUM, I386_FOP_REGNUM, I386_FOSEG_REGNUM, I386_FSTAT_REGNUM, I386_FTAG_REGNUM, I386_MXCSR_REGNUM, I386_ST0_REGNUM, and I386_XMM0_REGNUM.

## ◆ lynx_i386_fill_gregset()

static void lynx_i386_fill_gregset | ( | struct regcache * | regcache,
|  | char * | buf
| ) |  |
| static

Definition at line 126 of file lynx-i386-low.c.

References I386_CS_REGNUM, I386_DS_REGNUM, I386_EAX_REGNUM, I386_EBP_REGNUM, I386_EBX_REGNUM, I386_ECX_REGNUM, I386_EDI_REGNUM, I386_EDX_REGNUM, I386_EFLAGS_REGNUM, I386_EIP_REGNUM, I386_ES_REGNUM, I386_ESI_REGNUM, I386_ESP_REGNUM, I386_FS_REGNUM, I386_GS_REGNUM, I386_SS_REGNUM, and lynx_i386_collect_gp.

## ◆ lynx_i386_store_fpregset()

static void lynx_i386_store_fpregset | ( | struct regcache * | regcache,
|  | const char * | buf
| ) |  |
| static

Definition at line 254 of file lynx-i386-low.c.

References I386_FCTRL_REGNUM, I386_FIOFF_REGNUM, I386_FISEG_REGNUM, I386_FOOFF_REGNUM, I386_FOP_REGNUM, I386_FOSEG_REGNUM, I386_FSTAT_REGNUM, I386_FTAG_REGNUM, I386_MXCSR_REGNUM, I386_ST0_REGNUM, I386_XMM0_REGNUM, supply_16bit_register(), and supply_register().

## ◆ lynx_i386_store_gregset()

static void lynx_i386_store_gregset | ( | struct regcache * | regcache,
|  | const char * | buf
| ) |  |
| static

Definition at line 153 of file lynx-i386-low.c.

References I386_CS_REGNUM, I386_DS_REGNUM, I386_EAX_REGNUM, I386_EBP_REGNUM, I386_EBX_REGNUM, I386_ECX_REGNUM, I386_EDI_REGNUM, I386_EDX_REGNUM, I386_EFLAGS_REGNUM, I386_EIP_REGNUM, I386_ES_REGNUM, I386_ESI_REGNUM, I386_ESP_REGNUM, I386_FS_REGNUM, I386_GS_REGNUM, I386_SS_REGNUM, and lynx_i386_supply_gp.

## ◆ supply_16bit_register()

static void supply_16bit_register | ( | struct regcache * | regcache,
|  | int | regnum,
|  | const char * | buf
| ) |  |
| static

Definition at line 242 of file lynx-i386-low.c.

References memset(), and supply_register().

Referenced by lynx_i386_store_fpregset().

## Variable Documentation

## ◆ lynx_target_regsets

struct lynx_regset_info lynx_target_regsets[]

Initial value:
= {
{PTRACE_GETREGS, PTRACE_SETREGS, sizeof(usr_econtext_t),
lynx_i386_fill_gregset, lynx_i386_store_gregset},
{ PTRACE_GETFPREGS, PTRACE_SETFPREGS, sizeof(usr_fcontext_t),
lynx_i386_fill_fpregset, lynx_i386_store_fpregset },
{0, 0, -1, NULL, NULL }
}
lynx_i386_store_fpregset
static void lynx_i386_store_fpregset(struct regcache *regcache, const char *buf)
Definition: lynx-i386-low.c:254
lynx_i386_fill_gregset
static void lynx_i386_fill_gregset(struct regcache *regcache, char *buf)
Definition: lynx-i386-low.c:126
usr_fcontext_t
struct usr_fcontext usr_fcontext_t
lynx_i386_store_gregset
static void lynx_i386_store_gregset(struct regcache *regcache, const char *buf)
Definition: lynx-i386-low.c:153
usr_econtext_t
struct usr_econtext usr_econtext_t
lynx_i386_fill_fpregset
static void lynx_i386_fill_fpregset(struct regcache *regcache, char *buf)
Definition: lynx-i386-low.c:196

Definition at line 306 of file lynx-i386-low.c.

Referenced by lynx_fetch_registers(), and lynx_store_registers().

## ◆ the_low_target

struct lynx_target_ops the_low_target

Initial value:
= {
lynx_i386_arch_setup,
}
lynx_i386_arch_setup
static void lynx_i386_arch_setup(void)
Definition: lynx-i386-low.c:294

Definition at line 319 of file lynx-i386-low.c.