GDB (xrefs)

Macros | Functions | Variables
/tmp/gdb-8.1/gdb/i386-bsd-nat.c File Reference
`#include "defs.h"`
`#include "inferior.h"`
`#include "regcache.h"`
`#include <signal.h>`
`#include <sys/types.h>`
`#include <sys/ptrace.h>`
`#include <machine/reg.h>`
`#include <machine/frame.h>`
`#include "i386-tdep.h"`
`#include "i387-tdep.h"`
`#include "x86-bsd-nat.h"`
`#include "i386-bsd-nat.h"`
`#include "inf-ptrace.h"`

Go to the source code of this file.

## Macros
#define | REG_OFFSET(member) offsetof (struct reg, member)
#define | GETREGS_SUPPLIES(regnum) ((0 <= (regnum) && (regnum) <= 15))

## Functions
static void | i386bsd_supply_gregset (struct regcache *regcache, const void *gregs)
static void | i386bsd_collect_gregset (const struct regcache *regcache, void *gregs, int regnum)
static void | i386bsd_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static void | i386bsd_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
struct target_ops * | i386bsd_target (void)
void | _initialize_i386bsd_nat (void)

## Variables
static int | i386bsd_r_reg_offset []

## Macro Definition Documentation

## ◆ GETREGS_SUPPLIES

#define GETREGS_SUPPLIES | ( |  | regnum | ) | ((0 <= (regnum) && (regnum) <= 15))

Definition at line 77 of file i386-bsd-nat.c.

Referenced by i386bsd_fetch_inferior_registers(), and i386bsd_store_inferior_registers().

## ◆ REG_OFFSET

#define REG_OFFSET | ( |  | member | ) | offsetof (struct reg, member)

Definition at line 43 of file i386-bsd-nat.c.

## Function Documentation

## ◆ _initialize_i386bsd_nat()

void _initialize_i386bsd_nat | ( | void |  | ) |

Definition at line 285 of file i386-bsd-nat.c.

References _, offset, and warning().

## ◆ i386bsd_collect_gregset()

static void i386bsd_collect_gregset | ( | const struct regcache * | regcache,
|  | void * | gregs,
|  | int | regnum
| ) |  |
| static

Definition at line 109 of file i386-bsd-nat.c.

References i386bsd_r_reg_offset, offset, regcache_raw_collect(), and regnum.

Referenced by i386bsd_store_inferior_registers().

## ◆ i386bsd_fetch_inferior_registers()

static void i386bsd_fetch_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 131 of file i386-bsd-nat.c.

References _, get_ptrace_pid(), GETREGS_SUPPLIES, I386_ST0_REGNUM, i386bsd_supply_gregset(), i387_supply_fsave(), i387_supply_fxsave(), i387_supply_xsave(), perror_with_name(), pid, ptrace(), PTRACE_TYPE_ARG3, regcache_get_ptid(), regnum, and x86bsd_xsave_len.

Referenced by i386bsd_target().

## ◆ i386bsd_store_inferior_registers()

static void i386bsd_store_inferior_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regnum
| ) |  |
| static

Definition at line 195 of file i386-bsd-nat.c.

References _, get_ptrace_pid(), GETREGS_SUPPLIES, I386_ST0_REGNUM, i386bsd_collect_gregset(), i387_collect_fsave(), i387_collect_fxsave(), i387_collect_xsave(), perror_with_name(), pid, ptrace(), PTRACE_TYPE_ARG3, regcache_get_ptid(), regnum, and x86bsd_xsave_len.

Referenced by i386bsd_target().

## ◆ i386bsd_supply_gregset()

static void i386bsd_supply_gregset | ( | struct regcache * | regcache,
|  | const void * | gregs
| ) |  |
| static

Definition at line 90 of file i386-bsd-nat.c.

References i386bsd_r_reg_offset, offset, regcache_raw_supply(), and regnum.

Referenced by i386bsd_fetch_inferior_registers().

## ◆ i386bsd_target()

struct target_ops* i386bsd_target | ( | void |  | ) |

Definition at line 274 of file i386-bsd-nat.c.

References i386bsd_fetch_inferior_registers(), i386bsd_store_inferior_registers(), target_ops::to_fetch_registers, target_ops::to_store_registers, and x86bsd_target().

Referenced by _initialize_i386fbsd_nat(), _initialize_i386nbsd_nat(), and _initialize_i386obsd_nat().

## Variable Documentation

## ◆ i386bsd_r_reg_offset

int i386bsd_r_reg_offset[]
| static

Initial value:
=
{
REG_OFFSET (r_eax),
REG_OFFSET (r_ecx),
REG_OFFSET (r_edx),
REG_OFFSET (r_ebx),
REG_OFFSET (r_esp),
REG_OFFSET (r_ebp),
REG_OFFSET (r_esi),
REG_OFFSET (r_edi),
REG_OFFSET (r_eip),
REG_OFFSET (r_eflags),
REG_OFFSET (r_cs),
REG_OFFSET (r_ss),
REG_OFFSET (r_ds),
REG_OFFSET (r_es),
-1,
-1
}
REG_OFFSET
#define REG_OFFSET(member)
Definition: i386-bsd-nat.c:43

Definition at line 48 of file i386-bsd-nat.c.

Referenced by i386bsd_collect_gregset(), and i386bsd_supply_gregset().