GDB (xrefs)
|
#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 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.
void _initialize_i386gnu_nat | ( | void | ) |
Definition at line 316 of file i386gnu-nat.c.
References add_target(), gnu_fetch_registers(), gnu_store_registers(), gnu_target(), target_ops::to_fetch_registers, and target_ops::to_store_registers.
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] |
Definition at line 126 of file i386gnu-nat.c.
References _, error(), fetch_fpregs(), proc::fetched_regs, gdbarch_register_name(), get_regcache_arch(), gnu_current_inf, I386_NUM_GREGS, inf_tid_to_thread(), inf_update_procs(), inferior_ptid, proc_debug, proc_get_state(), proc_string(), ptid_get_lwp(), REG_ADDR, regcache_raw_supply(), proc::state, target_pid_to_str(), and warning().
Referenced by _initialize_i386gnu_nat().
static void gnu_store_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 218 of file i386gnu-nat.c.
References _, proc::aborted, error(), proc::fetched_regs, gdb_assert, gdbarch_register_name(), get_regcache_arch(), gnu_current_inf, I386_NUM_GREGS, inf_tid_to_thread(), inf_update_procs(), inferior_ptid, memcpy(), proc_debug, proc_get_state(), proc_string(), ptid_get_lwp(), REG_ADDR, REG_VALID, 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().
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().
int creg_offset[] [static] |
{ 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] |
{ 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) }
Definition at line 50 of file i386gnu-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(), read_pieced_value(), score_xfer_register(), tic6x_linux_rt_sigreturn_init(), and write_pieced_value().