GDB (xrefs)
|
#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.
#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().
#define regmap_fpregset s390_regmap_fpregset |
Definition at line 61 of file s390-nat.c.
Referenced by fill_fpregset(), and supply_fpregset().
#define regmap_gregset s390_regmap_gregset |
Definition at line 58 of file s390-nat.c.
Referenced by fill_gregset(), and supply_gregset().
void _initialize_s390_nat | ( | void | ) |
Definition at line 669 of file s390-nat.c.
References linux_nat_add_target(), linux_nat_set_new_thread(), linux_target(), s390_auxv_parse(), s390_can_use_hw_breakpoint(), s390_fix_watch_points(), s390_insert_watchpoint(), s390_linux_fetch_inferior_registers(), s390_linux_store_inferior_registers(), s390_read_description(), s390_region_ok_for_hw_watchpoint(), s390_remove_watchpoint(), s390_stopped_by_watchpoint(), target_ops::to_auxv_parse, target_ops::to_can_use_hw_breakpoint, target_ops::to_fetch_registers, target_ops::to_have_continuable_watchpoint, target_ops::to_insert_watchpoint, target_ops::to_read_description, target_ops::to_region_ok_for_hw_watchpoint, target_ops::to_remove_watchpoint, target_ops::to_stopped_by_watchpoint, and target_ops::to_store_registers.
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] |
Definition at line 305 of file s390-nat.c.
References _, perror_with_name(), ptrace(), PTRACE_GETREGSET, and s390_native_supply().
Referenced by s390_linux_fetch_inferior_registers().
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 | ||
) |
Definition at line 142 of file s390-nat.c.
References gdbarch::byte_order, extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_ptr_bit(), get_regcache_arch(), memset(), p, regcache_raw_collect(), regmap_gregset, s390_native_collect(), S390_ORIG_R2_REGNUM, S390_PSWA_REGNUM, S390_PSWM_REGNUM, S390_R0_REGNUM, S390_R15_REGNUM, store_unsigned_integer(), and ULONGEST.
static int s390_auxv_parse | ( | struct target_ops * | ops, |
gdb_byte ** | readptr, | ||
gdb_byte * | endptr, | ||
CORE_ADDR * | typep, | ||
CORE_ADDR * | valp | ||
) | [static] |
Definition at line 591 of file s390-nat.c.
References extract_unsigned_integer(), gdbarch_byte_order(), s390_target_wordsize(), and target_gdbarch().
Referenced by _initialize_s390_nat().
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] |
Definition at line 467 of file s390-nat.c.
References _, watch_area::hi_addr, watch_area::lo_addr, max, min, watch_area::next, perror_with_name(), lwp_info::ptid, ptid_get_lwp(), ptid_get_pid(), and ptrace().
Referenced by _initialize_s390_nat(), s390_insert_watchpoint(), and s390_remove_watchpoint().
static int s390_inferior_tid | ( | void | ) | [static] |
Definition at line 217 of file s390-nat.c.
References inferior_ptid, ptid_get_lwp(), and ptid_get_pid().
Referenced by s390_linux_fetch_inferior_registers(), s390_linux_store_inferior_registers(), s390_read_description(), s390_stopped_by_watchpoint(), and s390_target_wordsize().
static int s390_insert_watchpoint | ( | CORE_ADDR | addr, |
int | len, | ||
int | type, | ||
struct expression * | cond | ||
) | [static] |
Definition at line 511 of file s390-nat.c.
References ALL_LWPS, watch_area::hi_addr, watch_area::lo_addr, watch_area::next, s390_fix_watch_points(), watch_base, and xmalloc().
Referenced by _initialize_s390_nat().
static void s390_linux_fetch_inferior_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regnum | ||
) | [static] |
Definition at line 367 of file s390-nat.c.
References fetch_fpregs(), fetch_regs(), fetch_regset(), gdbarch_ptr_bit(), get_regcache_arch(), have_regset_last_break, have_regset_system_call, have_regset_tdb, s390_inferior_tid(), S390_IS_FPREGSET_REGNUM, S390_IS_GREGSET_REGNUM, S390_IS_TDBREGSET_REGNUM, S390_LAST_BREAK_REGNUM, s390_regmap_last_break, s390_regmap_system_call, s390_regmap_tdb, s390_sizeof_tdbregset, S390_SYSTEM_CALL_REGNUM, and s390x_regmap_last_break.
Referenced by _initialize_s390_nat().
static void s390_linux_store_inferior_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regnum | ||
) | [static] |
Definition at line 398 of file s390-nat.c.
References have_regset_system_call, s390_inferior_tid(), S390_IS_FPREGSET_REGNUM, S390_IS_GREGSET_REGNUM, s390_regmap_system_call, S390_SYSTEM_CALL_REGNUM, store_fpregs(), store_regs(), and store_regset().
Referenced by _initialize_s390_nat().
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] |
Definition at line 627 of file s390-nat.c.
References check_regset(), have_regset_last_break, have_regset_system_call, have_regset_tdb, s390_inferior_tid(), s390_sizeof_tdbregset, s390_target_wordsize(), tdesc_s390_linux32, tdesc_s390_linux32v1, tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1, tdesc_s390_linux64v2, tdesc_s390_te_linux64, tdesc_s390x_linux64, tdesc_s390x_linux64v1, tdesc_s390x_linux64v2, and tdesc_s390x_te_linux64.
Referenced by _initialize_s390_nat().
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] |
Definition at line 532 of file s390-nat.c.
References ALL_LWPS, fprintf_unfiltered(), gdb_stderr, watch_area::next, s390_fix_watch_points(), and xfree().
Referenced by _initialize_s390_nat().
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] |
Definition at line 329 of file s390-nat.c.
References _, perror_with_name(), ptrace(), PTRACE_GETREGSET, PTRACE_SETREGSET, and s390_native_collect().
Referenced by s390_linux_store_inferior_registers().
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 | ||
) |
Definition at line 96 of file s390-nat.c.
References gdbarch::byte_order, extract_unsigned_integer(), gdbarch_byte_order(), gdbarch_ptr_bit(), get_regcache_arch(), p, regcache_raw_supply(), regmap_gregset, s390_native_supply(), S390_ORIG_R2_REGNUM, S390_PSWA_REGNUM, S390_PSWM_REGNUM, S390_R0_REGNUM, S390_R15_REGNUM, store_unsigned_integer(), and ULONGEST.
int have_regset_last_break = 0 [static] |
Definition at line 48 of file s390-nat.c.
Referenced by s390_linux_fetch_inferior_registers(), and s390_read_description().
int have_regset_system_call = 0 [static] |
Definition at line 49 of file s390-nat.c.
Referenced by s390_linux_fetch_inferior_registers(), s390_linux_store_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().