GDB (xrefs)

Macros | Functions | Variables
/tmp/gdb-8.1/gdb/i386-gnu-nat.c File Reference
`#include <mach.h>`
`#include <mach_error.h>`
`#include <mach/message.h>`
`#include <mach/exception.h>`
`#include "defs.h"`
`#include "x86-nat.h"`
`#include "inferior.h"`
`#include "floatformat.h"`
`#include "regcache.h"`
`#include "i386-tdep.h"`
`#include "gnu-nat.h"`
`#include "inf-child.h"`
`#include "i387-tdep.h"`

Go to the source code of this file.

## Macros
#define | REG_OFFSET(reg) offsetof (struct i386_thread_state, reg)
#define | REG_ADDR(state, regnum) ((char *)(state) + reg_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 []

## Macro Definition Documentation

## ◆ REG_ADDR

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

Definition at line 54 of file i386-gnu-nat.c.

Referenced by gnu_fetch_registers(), and gnu_store_registers().

## ◆ REG_OFFSET

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

Definition at line 42 of file i386-gnu-nat.c.

## Function Documentation

## ◆ _initialize_i386gnu_nat()

void _initialize_i386gnu_nat | ( | void |  | ) |

Definition at line 413 of file i386-gnu-nat.c.

References add_target(), DR_FIRSTADDR, DR_LASTADDR, gdb_assert, x86_dr_low_type::get_addr, x86_dr_low_type::get_control, x86_dr_low_type::get_status, gnu_fetch_registers(), gnu_store_registers(), gnu_target(), x86_dr_low_type::set_addr, x86_dr_low_type::set_control, target_ops::to_fetch_registers, target_ops::to_store_registers, x86_dr_low, x86_set_debug_register_length(), and x86_use_watchpoints().

## ◆ fetch_fpregs()

static void fetch_fpregs | ( | struct regcache * | regcache,
|  | struct proc * | thread
| ) |  |
| static

Definition at line 61 of file i386-gnu-nat.c.

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

Referenced by gnu_fetch_registers().

## ◆ gnu_fetch_registers()

static void gnu_fetch_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

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

References _, regcache::arch(), error(), fetch_fpregs(), proc::fetched_regs, gdbarch_register_name(), gnu_current_inf, I386_NUM_GREGS, inf_tid_to_thread(), inf_update_procs(), proc_debug, proc_get_state(), proc_string(), ptid_get_lwp(), REG_ADDR, regcache_get_ptid(), regcache_raw_supply(), proc::state, target_pid_to_str(), and warning().

Referenced by _initialize_i386gnu_nat().

## ◆ gnu_store_registers()

static void gnu_store_registers | ( | struct target_ops * | ops,
|  | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 182 of file i386-gnu-nat.c.

References _, proc::aborted, regcache::arch(), error(), proc::fetched_regs, gdb_assert, gdbarch_register_name(), gnu_current_inf, I386_NUM_GREGS, inf_tid_to_thread(), inf_update_procs(), proc_debug, proc_get_state(), proc_string(), ptid_get_lwp(), REG_ADDR, REG_VALID, regcache_get_ptid(), regcache_raw_collect(), regcache_raw_supply(), regcache_register_status(), register_size(), proc::state, proc::state_valid, store_fpregs(), target_pid_to_str(), and warning().

Referenced by _initialize_i386gnu_nat().

## ◆ store_fpregs()

static void store_fpregs | ( | const struct regcache * | regcache,
|  | struct proc * | thread,
|  | int | regno
| ) |  |
| static

Definition at line 151 of file i386-gnu-nat.c.

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

Referenced by gnu_store_registers().

## Variable Documentation

## ◆ reg_offset

int reg_offset[]
| static

Initial value:
=
{
REG_OFFSET (eax), REG_OFFSET (ecx), REG_OFFSET (edx), REG_OFFSET (ebx),
REG_OFFSET (uesp), REG_OFFSET (ebp), REG_OFFSET (esi), REG_OFFSET (edi),
REG_OFFSET (eip), REG_OFFSET (efl), REG_OFFSET (cs), REG_OFFSET (ss),
REG_OFFSET (ds), REG_OFFSET (es), REG_OFFSET (fs), REG_OFFSET (gs)
}
REG_OFFSET
#define REG_OFFSET(reg)
Definition: i386-gnu-nat.c:42

Definition at line 46 of file i386-gnu-nat.c.

Referenced by amd64_native_gregset_reg_offset(), bfin_linux_sigframe_init(), hppanbsd_sigtramp_cache_init(), i386nbsd_sigtramp_cache_init(), mips_xfer_register(), read_frame_register_value(), score_xfer_register(), store_regs(), and tic6x_linux_rt_sigreturn_init().