GDB (xrefs)
Defines | Functions | Variables
/home/stan/gdb/src/gdb/m68klinux-nat.c File Reference
#include "defs.h"
#include "frame.h"
#include "inferior.h"
#include "language.h"
#include "gdbcore.h"
#include "gdb_string.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/file.h>
#include "gdb_stat.h"
#include "floatformat.h"
#include "gregset.h"
#include "gdb_proc_service.h"

Go to the source code of this file.

Defines

#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)
static void fetch_core_registers (struct regcache *regcache, char *core_reg_sect, unsigned core_reg_size, int which, CORE_ADDR reg_addr)
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
static struct core_fns linux_elf_core_fns

Define Documentation

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

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

Referenced by fill_fpregset(), and supply_fpregset().

#define MAX_NUM_REGS   (NUM_GREGS + 11)

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

#define NUM_GREGS   (18)

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

Referenced by fill_gregset(), and getregs_supplies().

#define PTRACE_GET_THREAD_AREA   25

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

Referenced by ps_get_thread_area().


Function Documentation

void _initialize_m68k_linux_nat ( void  )
static void fetch_core_registers ( struct regcache regcache,
char *  core_reg_sect,
unsigned  core_reg_size,
int  which,
CORE_ADDR  reg_addr 
) [static]

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

References _, memcpy(), supply_fpregset(), supply_gregset(), and warning().

static void fetch_fpregs ( struct regcache regcache,
int  tid 
) [static]

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

Referenced by m68k_linux_fetch_inferior_registers().

static void fetch_register ( struct regcache regcache,
int  regno 
) [static]
static void fetch_regs ( struct regcache regcache,
int  tid 
) [static]

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

Referenced by m68k_linux_fetch_inferior_registers().

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 240 of file m68klinux-nat.c.

References NUM_GREGS, regcache_raw_collect(), and regmap.

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 570 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]

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

Referenced by m68k_linux_store_inferior_registers().

static void store_register ( const struct regcache regcache,
int  regno 
) [static]
static void store_regs ( const struct regcache regcache,
int  tid,
int  regno 
) [static]

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

Referenced by m68k_linux_store_inferior_registers().

void supply_fpregset ( struct regcache regcache,
const elf_fpregset_t *  fpregsetp 
)
void supply_gregset ( struct regcache regcache,
const elf_gregset_t gregsetp 
)

Variable Documentation

Initial value:



  0

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

struct core_fns linux_elf_core_fns [static]
Initial value:

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

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 62 of file m68klinux-nat.c.

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines