GDB (xrefs)
Macros | Functions | Variables
/tmp/gdb-7.10/gdb/m68klinux-nat.c File Reference
#include "defs.h"
#include "frame.h"
#include "inferior.h"
#include "language.h"
#include "gdbcore.h"
#include "regcache.h"
#include "target.h"
#include "linux-nat.h"
#include "m68k-tdep.h"
#include <sys/dir.h>
#include <signal.h>
#include <sys/ptrace.h>
#include <sys/user.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <sys/procfs.h>
#include <sys/reg.h>
#include <sys/file.h>
#include <sys/stat.h>
#include "floatformat.h"
#include "gregset.h"
#include "gdb_proc_service.h"

Go to the source code of this file.

Macros

#define PTRACE_GET_THREAD_AREA   25
 
#define NUM_GREGS   (18)
 
#define MAX_NUM_REGS   (NUM_GREGS + 11)
 
#define FPREG_ADDR(f, n)   (&(f)->fpregs[(n) * 3])
 

Functions

static int getregs_supplies (int regno)
 
static int getfpregs_supplies (int regno)
 
static void fetch_register (struct regcache *regcache, int regno)
 
static void old_fetch_inferior_registers (struct regcache *regcache, int regno)
 
static void store_register (const struct regcache *regcache, int regno)
 
static void old_store_inferior_registers (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 void m68k_linux_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
 
static void m68k_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)
 
void _initialize_m68k_linux_nat (void)
 

Variables

static const int regmap []
 
static int have_ptrace_getregs
 

Macro Definition Documentation

#define FPREG_ADDR (   f,
 
)    (&(f)->fpregs[(n) * 3])

Definition at line 307 of file m68klinux-nat.c.

Referenced by fill_fpregset(), and supply_fpregset().

#define MAX_NUM_REGS   (NUM_GREGS + 11)

Definition at line 73 of file m68klinux-nat.c.

#define NUM_GREGS   (18)

Definition at line 72 of file m68klinux-nat.c.

Referenced by fill_gregset(), and getregs_supplies().

#define PTRACE_GET_THREAD_AREA   25

Definition at line 55 of file m68klinux-nat.c.

Referenced by ps_get_thread_area().

Function Documentation

void _initialize_m68k_linux_nat ( void  )
static void fetch_fpregs ( 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
void fill_fpregset ( const struct regcache regcache,
elf_fpregset_t *  fpregsetp,
int  regno 
)
void fill_gregset ( const struct regcache regcache,
elf_gregset_t *  gregsetp,
int  regno 
)

Definition at line 237 of file m68klinux-nat.c.

References NUM_GREGS, regcache_raw_collect(), and regmap.

Referenced by store_regs().

static int getfpregs_supplies ( int  regno)
static
static int getregs_supplies ( int  regno)
static
static void m68k_linux_fetch_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
)
static
static void m68k_linux_store_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
)
static
static void old_fetch_inferior_registers ( struct regcache regcache,
int  regno 
)
static
static void old_store_inferior_registers ( const 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 511 of file m68klinux-nat.c.

References PS_ERR, PS_OK, ptrace(), and PTRACE_GET_THREAD_AREA.

static void store_fpregs ( 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
void supply_fpregset ( struct regcache regcache,
const elf_fpregset_t *  fpregsetp 
)
void supply_gregset ( struct regcache regcache,
const elf_gregset_t *  gregsetp 
)

Variable Documentation

int have_ptrace_getregs
static
Initial value:
=
1

Definition at line 88 of file m68klinux-nat.c.

Referenced by fetch_regs(), m68k_linux_fetch_inferior_registers(), and m68k_linux_store_inferior_registers().

const int regmap[]
static
Initial value:
=
{
PT_D0, PT_D1, PT_D2, PT_D3, PT_D4, PT_D5, PT_D6, PT_D7,
PT_A0, PT_A1, PT_A2, PT_A3, PT_A4, PT_A5, PT_A6, PT_USP,
PT_SR, PT_PC,
21, 24, 27, 30, 33, 36, 39, 42,
45, 46, 47
}

Definition at line 59 of file m68klinux-nat.c.

Referenced by fetch_register(), fill_gregset(), store_register(), and supply_gregset().