GDB (xrefs)
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/s390-nat.c File Reference
#include "defs.h"
#include "regcache.h"
#include "inferior.h"
#include "target.h"
#include "linux-nat.h"
#include "auxv.h"
#include "gregset.h"
#include "s390-tdep.h"
#include "elf/common.h"
#include <asm/ptrace.h>
#include <sys/ptrace.h>
#include <asm/types.h>
#include <sys/procfs.h>
#include <sys/ucontext.h>
#include <elf.h>

Go to the source code of this file.

Classes

struct  watch_area

Defines

#define PTRACE_GETREGSET   0x4204
#define PTRACE_SETREGSET   0x4205
#define regmap_gregset   s390_regmap_gregset
#define regmap_fpregset   s390_regmap_fpregset

Functions

static void s390_native_supply (struct regcache *regcache, const short *map, const gdb_byte *regp)
static void s390_native_collect (const struct regcache *regcache, const short *map, int regno, gdb_byte *regp)
void supply_gregset (struct regcache *regcache, const gregset_t *regp)
void fill_gregset (const struct regcache *regcache, gregset_t *regp, int regno)
void supply_fpregset (struct regcache *regcache, const fpregset_t *regp)
void fill_fpregset (const struct regcache *regcache, fpregset_t *regp, int regno)
static int s390_inferior_tid (void)
static void fetch_regs (struct regcache *regcache, int tid)
static void store_regs (const struct regcache *regcache, int tid, int regnum)
static void fetch_fpregs (struct regcache *regcache, int tid)
static void store_fpregs (const struct regcache *regcache, int tid, int regnum)
static void fetch_regset (struct regcache *regcache, int tid, int regset, int regsize, const short *regmap)
static void store_regset (struct regcache *regcache, int tid, int regset, int regsize, const short *regmap)
static int check_regset (int tid, int regset, int regsize)
static void s390_linux_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static void s390_linux_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regnum)
static int s390_stopped_by_watchpoint (void)
static void s390_fix_watch_points (struct lwp_info *lp)
static int s390_insert_watchpoint (CORE_ADDR addr, int len, int type, struct expression *cond)
static int s390_remove_watchpoint (CORE_ADDR addr, int len, int type, struct expression *cond)
static int s390_can_use_hw_breakpoint (int type, int cnt, int othertype)
static int s390_region_ok_for_hw_watchpoint (CORE_ADDR addr, int cnt)
static int s390_target_wordsize (void)
static int s390_auxv_parse (struct target_ops *ops, gdb_byte **readptr, gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
static struct target_descs390_read_description (struct target_ops *ops)
void _initialize_s390_nat (void)

Variables

static int have_regset_last_break = 0
static int have_regset_system_call = 0
static int have_regset_tdb = 0
static struct watch_areawatch_base = NULL

Define Documentation

#define PTRACE_GETREGSET   0x4204

Definition at line 41 of file s390-nat.c.

Referenced by check_regset(), fetch_regset(), and store_regset().

#define PTRACE_SETREGSET   0x4205

Definition at line 45 of file s390-nat.c.

Referenced by store_regset().

Definition at line 61 of file s390-nat.c.

Referenced by fill_fpregset(), and supply_fpregset().

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

Referenced by fill_gregset(), and supply_gregset().


Function Documentation

void _initialize_s390_nat ( void  )
static int check_regset ( int  tid,
int  regset,
int  regsize 
) [static]

Definition at line 350 of file s390-nat.c.

References ptrace(), and PTRACE_GETREGSET.

Referenced by s390_read_description().

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

Definition at line 267 of file s390-nat.c.

References _, perror_with_name(), ptrace(), and supply_fpregset().

Referenced by s390_linux_fetch_inferior_registers().

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

Definition at line 230 of file s390-nat.c.

References _, perror_with_name(), ptrace(), and supply_gregset().

Referenced by s390_linux_fetch_inferior_registers().

static void fetch_regset ( struct regcache regcache,
int  tid,
int  regset,
int  regsize,
const short *  regmap 
) [static]
void fill_fpregset ( const struct regcache regcache,
fpregset_t regp,
int  regno 
)

Definition at line 210 of file s390-nat.c.

References regmap_fpregset, and s390_native_collect().

void fill_gregset ( const struct regcache regcache,
gregset_t regp,
int  regno 
)
static int s390_auxv_parse ( struct target_ops ops,
gdb_byte **  readptr,
gdb_byte endptr,
CORE_ADDR typep,
CORE_ADDR valp 
) [static]
static int s390_can_use_hw_breakpoint ( int  type,
int  cnt,
int  othertype 
) [static]

Definition at line 560 of file s390-nat.c.

References bp_hardware_watchpoint.

Referenced by _initialize_s390_nat().

static void s390_fix_watch_points ( struct lwp_info lp) [static]
static int s390_inferior_tid ( void  ) [static]
static int s390_insert_watchpoint ( CORE_ADDR  addr,
int  len,
int  type,
struct expression cond 
) [static]
static void s390_linux_fetch_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
) [static]
static void s390_linux_store_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regnum 
) [static]
static void s390_native_collect ( const struct regcache regcache,
const short *  map,
int  regno,
gdb_byte regp 
) [static]

Definition at line 80 of file s390-nat.c.

References regcache_raw_collect().

Referenced by fill_fpregset(), fill_gregset(), and store_regset().

static void s390_native_supply ( struct regcache regcache,
const short *  map,
const gdb_byte regp 
) [static]

Definition at line 68 of file s390-nat.c.

References regcache_raw_supply().

Referenced by fetch_regset(), supply_fpregset(), and supply_gregset().

static struct target_desc* s390_read_description ( struct target_ops ops) [static, read]
static int s390_region_ok_for_hw_watchpoint ( CORE_ADDR  addr,
int  cnt 
) [static]

Definition at line 566 of file s390-nat.c.

Referenced by _initialize_s390_nat().

static int s390_remove_watchpoint ( CORE_ADDR  addr,
int  len,
int  type,
struct expression cond 
) [static]
static int s390_stopped_by_watchpoint ( void  ) [static]

Definition at line 436 of file s390-nat.c.

References _, memset(), perror_with_name(), ptrace(), and s390_inferior_tid().

Referenced by _initialize_s390_nat().

static int s390_target_wordsize ( void  ) [static]

Definition at line 572 of file s390-nat.c.

References gdb::printing::long, ptrace(), s390_inferior_tid(), and wordsize.

Referenced by s390_auxv_parse(), and s390_read_description().

static void store_fpregs ( const struct regcache regcache,
int  tid,
int  regnum 
) [static]

Definition at line 284 of file s390-nat.c.

References _, fill_fpregset(), perror_with_name(), and ptrace().

Referenced by s390_linux_store_inferior_registers().

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

Definition at line 247 of file s390-nat.c.

References _, fill_gregset(), perror_with_name(), and ptrace().

Referenced by s390_linux_store_inferior_registers().

static void store_regset ( struct regcache regcache,
int  tid,
int  regset,
int  regsize,
const short *  regmap 
) [static]
void supply_fpregset ( struct regcache regcache,
const fpregset_t regp 
)

Definition at line 201 of file s390-nat.c.

References regmap_fpregset, and s390_native_supply().

void supply_gregset ( struct regcache regcache,
const gregset_t regp 
)

Variable Documentation

Definition at line 48 of file s390-nat.c.

Referenced by s390_linux_fetch_inferior_registers(), and s390_read_description().

int have_regset_tdb = 0 [static]

Definition at line 50 of file s390-nat.c.

Referenced by s390_linux_fetch_inferior_registers(), and s390_read_description().

struct watch_area* watch_base = NULL [static]

Definition at line 433 of file s390-nat.c.

Referenced by s390_insert_watchpoint().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines