GDB (xrefs)
Macros | Functions | Variables
/tmp/gdb-7.10/gdb/i386-linux-nat.c File Reference
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
#include "elf/common.h"
#include <sys/ptrace.h>
#include <sys/uio.h>
#include "gregset.h"
#include "gdb_proc_service.h"
#include "i386-linux-nat.h"
#include "i387-tdep.h"
#include "i386-tdep.h"
#include "i386-linux-tdep.h"
#include "x86-xstate.h"
#include "linux-nat.h"
#include "x86-linux-nat.h"
#include "nat/linux-ptrace.h"

Go to the source code of this file.

Macros

#define GETREGS_SUPPLIES(regno)   ((0 <= (regno) && (regno) <= 15) || (regno) == I386_LINUX_ORIG_EAX_REGNUM)
 
#define GETFPXREGS_SUPPLIES(regno)   (I386_ST0_REGNUM <= (regno) && (regno) < I386_SSE_NUM_REGS)
 
#define GETXSTATEREGS_SUPPLIES(regno)   (I386_ST0_REGNUM <= (regno) && (regno) < I386_AVX512_NUM_REGS)
 
#define LINUX_SYSCALL_LEN   (sizeof linux_syscall)
 
#define LINUX_SYSCALL_REGNUM   I386_EAX_REGNUM
 
#define SYS_sigreturn   0x77
 
#define SYS_rt_sigreturn   0xad
 
#define LINUX_SIGCONTEXT_EFLAGS_OFFSET   (64)
 

Functions

static void fetch_register (struct regcache *regcache, int regno)
 
static void store_register (const struct regcache *regcache, int regno)
 
void supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
 
void fill_gregset (const struct regcache *regcache, elf_gregset_t *gregsetp, int regno)
 
static void fetch_regs (struct regcache *regcache, int tid)
 
static void store_regs (const struct regcache *regcache, int tid, int regno)
 
void supply_fpregset (struct regcache *regcache, const elf_fpregset_t *fpregsetp)
 
void fill_fpregset (const struct regcache *regcache, elf_fpregset_t *fpregsetp, int regno)
 
static void fetch_fpregs (struct regcache *regcache, int tid)
 
static void store_fpregs (const struct regcache *regcache, int tid, int regno)
 
static int fetch_xstateregs (struct regcache *regcache, int tid)
 
static int store_xstateregs (const struct regcache *regcache, int tid, int regno)
 
static int fetch_fpxregs (struct regcache *regcache, int tid)
 
static int store_fpxregs (const struct regcache *regcache, int tid, int regno)
 
static void i386_linux_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
 
static void i386_linux_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
 
ps_err_e ps_get_thread_area (const struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
 
static void i386_linux_resume (struct target_ops *ops, ptid_t ptid, int step, enum gdb_signal signal)
 
void _initialize_i386_linux_nat (void)
 

Variables

int have_ptrace_getregs
 
int have_ptrace_getfpxregs
 
static const unsigned char linux_syscall [] = { 0xcd, 0x80 }
 
initialize_file_ftype _initialize_i386_linux_nat
 

Macro Definition Documentation

#define GETFPXREGS_SUPPLIES (   regno)    (I386_ST0_REGNUM <= (regno) && (regno) < I386_SSE_NUM_REGS)
#define GETREGS_SUPPLIES (   regno)    ((0 <= (regno) && (regno) <= 15) || (regno) == I386_LINUX_ORIG_EAX_REGNUM)
#define GETXSTATEREGS_SUPPLIES (   regno)    (I386_ST0_REGNUM <= (regno) && (regno) < I386_AVX512_NUM_REGS)
#define LINUX_SIGCONTEXT_EFLAGS_OFFSET   (64)

Definition at line 643 of file i386-linux-nat.c.

Referenced by i386_linux_resume().

#define LINUX_SYSCALL_LEN   (sizeof linux_syscall)

Definition at line 627 of file i386-linux-nat.c.

Referenced by i386_linux_resume().

#define LINUX_SYSCALL_REGNUM   I386_EAX_REGNUM

Definition at line 630 of file i386-linux-nat.c.

Referenced by i386_linux_resume().

#define SYS_rt_sigreturn   0xad

Definition at line 639 of file i386-linux-nat.c.

Referenced by i386_linux_resume().

#define SYS_sigreturn   0x77

Definition at line 636 of file i386-linux-nat.c.

Referenced by i386_linux_resume(), and init_syscall_table().

Function Documentation

void _initialize_i386_linux_nat ( void  )
static void fetch_fpregs ( struct regcache regcache,
int  tid 
)
static
static int fetch_fpxregs ( struct regcache regcache,
int  tid 
)
static
static void fetch_register ( struct regcache regcache,
int  regno 
)
static
static void fetch_regs ( struct regcache regcache,
int  tid 
)
static
static int fetch_xstateregs ( struct regcache regcache,
int  tid 
)
static
void fill_fpregset ( const struct regcache regcache,
elf_fpregset_t *  fpregsetp,
int  regno 
)

Definition at line 264 of file i386-linux-nat.c.

References i387_collect_fsave().

Referenced by store_fpregs().

void fill_gregset ( const struct regcache regcache,
elf_gregset_t *  gregsetp,
int  regno 
)
static void i386_linux_fetch_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
)
static
static void i386_linux_resume ( struct target_ops ops,
ptid_t  ptid,
int  step,
enum gdb_signal  signal 
)
static
static void i386_linux_store_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
)
static
ps_err_e ps_get_thread_area ( const struct ps_prochandle ph,
lwpid_t  lwpid,
int  idx,
void **  base 
)

Definition at line 606 of file i386-linux-nat.c.

References PS_OK, and x86_linux_get_thread_area().

static void store_fpregs ( const struct regcache regcache,
int  tid,
int  regno 
)
static
static int store_fpxregs ( const struct regcache regcache,
int  tid,
int  regno 
)
static
static void store_register ( const struct regcache regcache,
int  regno 
)
static
static void store_regs ( const struct regcache regcache,
int  tid,
int  regno 
)
static
static int store_xstateregs ( const struct regcache regcache,
int  tid,
int  regno 
)
static
void supply_fpregset ( struct regcache regcache,
const elf_fpregset_t *  fpregsetp 
)

Definition at line 254 of file i386-linux-nat.c.

References i387_supply_fsave().

Referenced by fetch_fpregs().

void supply_gregset ( struct regcache regcache,
const elf_gregset_t *  gregsetp 
)

Variable Documentation

initialize_file_ftype _initialize_i386_linux_nat
int have_ptrace_getfpxregs
Initial value:
=
-1

Definition at line 81 of file i386-linux-nat.c.

Referenced by fetch_fpxregs(), store_fpxregs(), and x86_linux_read_description().

int have_ptrace_getregs
const unsigned char linux_syscall[] = { 0xcd, 0x80 }
static

Definition at line 625 of file i386-linux-nat.c.

Referenced by i386_linux_resume().