GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
m68k-linux-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 "gdbarch.h"
#include "m68k-tdep.h"
#include <sys/dir.h>
#include <signal.h>
#include "nat/gdb_ptrace.h"
#include <sys/user.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <sys/procfs.h>
#include <sys/file.h>
#include <sys/stat.h>
#include "floatformat.h"
#include "gregset.h"
#include "gdb_proc_service.h"
#include "inf-ptrace.h"

Go to the source code of this file.

Classes

class  m68k_linux_nat_target
 

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)
 
ps_err_e ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
 
void _initialize_m68k_linux_nat ()
 

Variables

static m68k_linux_nat_target the_m68k_linux_nat_target
 
static const int regmap []
 
static int have_ptrace_getregs
 

Macro Definition Documentation

◆ FPREG_ADDR

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

Definition at line 307 of file m68k-linux-nat.c.

Referenced by fill_fpregset(), and supply_fpregset().

◆ MAX_NUM_REGS

#define MAX_NUM_REGS   (NUM_GREGS + 11)

Definition at line 87 of file m68k-linux-nat.c.

◆ NUM_GREGS

#define NUM_GREGS   (18)

Definition at line 86 of file m68k-linux-nat.c.

Referenced by fill_gregset(), and getregs_supplies().

◆ PTRACE_GET_THREAD_AREA

#define PTRACE_GET_THREAD_AREA   25

Definition at line 58 of file m68k-linux-nat.c.

Referenced by ps_get_thread_area().

Function Documentation

◆ _initialize_m68k_linux_nat()

void _initialize_m68k_linux_nat ( )

Definition at line 514 of file m68k-linux-nat.c.

References add_inf_child_target(), linux_target, and the_m68k_linux_nat_target.

◆ fetch_fpregs()

static void fetch_fpregs ( struct regcache * regcache,
int tid )
static

Definition at line 386 of file m68k-linux-nat.c.

Referenced by m68k_linux_nat_target::fetch_registers().

◆ fetch_register()

static void fetch_register ( struct regcache * regcache,
int regno )
static

◆ fetch_regs()

static void fetch_regs ( struct regcache * regcache,
int tid )
static

Definition at line 293 of file m68k-linux-nat.c.

Referenced by m68k_linux_nat_target::fetch_registers().

◆ fill_fpregset()

void fill_fpregset ( const struct regcache * regcache,
elf_fpregset_t * fpregsetp,
int regno )

◆ fill_gregset()

void fill_gregset ( const struct regcache * regcache,
elf_gregset_t * gregsetp,
int regno )

Definition at line 237 of file m68k-linux-nat.c.

References NUM_GREGS, reg_buffer::raw_collect(), and regmap.

◆ getfpregs_supplies()

static int getfpregs_supplies ( int regno)
static

◆ getregs_supplies()

static int getregs_supplies ( int regno)
static

◆ old_fetch_inferior_registers()

static void old_fetch_inferior_registers ( struct regcache * regcache,
int regno )
static

◆ old_store_inferior_registers()

static void old_store_inferior_registers ( const struct regcache * regcache,
int regno )
static

◆ ps_get_thread_area()

ps_err_e ps_get_thread_area ( struct ps_prochandle * ph,
lwpid_t lwpid,
int idx,
void ** base )

Definition at line 498 of file m68k-linux-nat.c.

References ptrace, and PTRACE_GET_THREAD_AREA.

◆ store_fpregs()

static void store_fpregs ( const struct regcache * regcache,
int tid,
int regno )
static

Definition at line 390 of file m68k-linux-nat.c.

Referenced by m68k_linux_nat_target::store_registers().

◆ store_register()

static void store_register ( const struct regcache * regcache,
int regno )
static

◆ store_regs()

static void store_regs ( const struct regcache * regcache,
int tid,
int regno )
static

Definition at line 297 of file m68k-linux-nat.c.

Referenced by m68k_linux_nat_target::store_registers().

◆ supply_fpregset()

void supply_fpregset ( struct regcache * regcache,
const elf_fpregset_t * fpregsetp )

◆ supply_gregset()

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

Variable Documentation

◆ have_ptrace_getregs

int have_ptrace_getregs
static
Initial value:
=
0

Definition at line 102 of file m68k-linux-nat.c.

Referenced by m68k_linux_nat_target::fetch_registers(), and m68k_linux_nat_target::store_registers().

◆ regmap

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 73 of file m68k-linux-nat.c.

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

◆ the_m68k_linux_nat_target

m68k_linux_nat_target the_m68k_linux_nat_target
static

Definition at line 70 of file m68k-linux-nat.c.

Referenced by _initialize_m68k_linux_nat().