GDB (xrefs)
|
#include "defs.h"
#include "command.h"
#include "gdbcmd.h"
#include "gdb_assert.h"
#include "inferior.h"
#include "mips-tdep.h"
#include "target.h"
#include "regcache.h"
#include "linux-nat.h"
#include "mips-linux-tdep.h"
#include "target-descriptions.h"
#include "gdb_proc_service.h"
#include "gregset.h"
#include <sgidefs.h>
#include <sys/ptrace.h>
#include <asm/ptrace.h>
#include "mips-linux-watch.h"
#include "features/mips-linux.c"
#include "features/mips-dsp-linux.c"
#include "features/mips64-linux.c"
#include "features/mips64-dsp-linux.c"
Go to the source code of this file.
#define PTRACE_GET_THREAD_AREA 25 |
Definition at line 47 of file mips-linux-nat.c.
Referenced by ps_get_thread_area().
void _initialize_mips_linux_nat | ( | void | ) |
Definition at line 769 of file mips-linux-nat.c.
References _, add_setshow_boolean_cmd(), class_maintenance, initialize_tdesc_mips64_dsp_linux(), initialize_tdesc_mips64_linux(), initialize_tdesc_mips_dsp_linux(), initialize_tdesc_mips_linux(), linux_nat_add_target(), linux_nat_set_new_thread(), linux_trad_target(), maint_show_dr, maintenance_set_cmdlist, maintenance_show_cmdlist, mips64_linux_fetch_registers(), mips64_linux_store_registers(), mips_linux_can_use_hw_breakpoint(), mips_linux_close(), mips_linux_insert_watchpoint(), mips_linux_new_thread(), mips_linux_read_description(), mips_linux_region_ok_for_hw_watchpoint(), mips_linux_register_u_offset(), mips_linux_remove_watchpoint(), mips_linux_stopped_by_watchpoint(), mips_linux_stopped_data_address(), super_close, super_fetch_registers, super_store_registers, target_ops::to_can_use_hw_breakpoint, target_ops::to_close, target_ops::to_fetch_registers, 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, target_ops::to_stopped_data_address, and target_ops::to_store_registers.
void fill_fpregset | ( | const struct regcache * | regcache, |
gdb_fpregset_t * | fpregsetp, | ||
int | regno | ||
) |
Definition at line 206 of file mips-linux-nat.c.
References get_regcache_arch(), mips64_fill_fpregset(), mips_fill_fpregset(), and mips_isa_regsize().
void fill_gregset | ( | const struct regcache * | regcache, |
gdb_gregset_t * | gregsetp, | ||
int | regno | ||
) |
Definition at line 186 of file mips-linux-nat.c.
References get_regcache_arch(), mips64_fill_gregset(), mips_fill_gregset(), and mips_isa_regsize().
static void mips64_linux_fetch_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regnum | ||
) | [static] |
Definition at line 388 of file mips-linux-nat.c.
References have_ptrace_regsets, mips64_linux_regsets_fetch_registers(), and super_fetch_registers.
Referenced by _initialize_mips_linux_nat().
static CORE_ADDR mips64_linux_register_addr | ( | struct gdbarch * | gdbarch, |
int | regno, | ||
int | store | ||
) | [static] |
Definition at line 117 of file mips-linux-nat.c.
References _, mips_regnum::badvaddr, mips_regnum::cause, DSP_BASE, DSP_CONTROL, mips_regnum::dspacc, mips_regnum::dspctl, error(), mips_regnum::fp_control_status, mips_regnum::fp_implementation_revision, gdbarch_fp0_regnum(), gdbarch_num_regs(), mips_regnum::hi, mips_regnum::lo, MIPS64_BADVADDR, MIPS64_CAUSE, MIPS64_FPC_CSR, MIPS64_FPC_EIR, MIPS64_FPR_BASE, MIPS64_MMHI, MIPS64_MMLO, MIPS64_PC, mips_linux_restart_reg_p(), mips_regnum(), MIPS_RESTART_REGNUM, MIPS_ZERO_REGNUM, and mips_regnum::pc.
Referenced by mips_linux_register_u_offset().
static void mips64_linux_regsets_fetch_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 221 of file mips-linux-nat.c.
References _, mips_regnum::dspacc, mips_regnum::dspctl, get_regcache_arch(), have_ptrace_regsets, inferior_ptid, L, mips64_supply_fpregset(), mips64_supply_gregset(), mips_regnum(), perror_with_name(), ptid_get_lwp(), ptid_get_pid(), ptrace(), PTRACE_GETFPREGS, PTRACE_GETREGS, PTRACE_TYPE_ARG3, and super_fetch_registers.
Referenced by mips64_linux_fetch_registers().
static void mips64_linux_regsets_store_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regno | ||
) | [static] |
Definition at line 309 of file mips-linux-nat.c.
References _, mips_regnum::dspacc, mips_regnum::dspctl, get_regcache_arch(), inferior_ptid, L, mips64_fill_fpregset(), mips64_fill_gregset(), mips_regnum(), perror_with_name(), ptid_get_lwp(), ptid_get_pid(), ptrace(), PTRACE_GETFPREGS, PTRACE_GETREGS, PTRACE_SETFPREGS, PTRACE_SETREGS, PTRACE_TYPE_ARG3, and super_store_registers.
Referenced by mips64_linux_store_registers().
static void mips64_linux_store_registers | ( | struct target_ops * | ops, |
struct regcache * | regcache, | ||
int | regnum | ||
) | [static] |
Definition at line 405 of file mips-linux-nat.c.
References have_ptrace_regsets, mips64_linux_regsets_store_registers(), and super_store_registers.
Referenced by _initialize_mips_linux_nat().
static int mips_linux_can_use_hw_breakpoint | ( | int | type, |
int | cnt, | ||
int | ot | ||
) | [static] |
Definition at line 515 of file mips-linux-nat.c.
References bp_access_watchpoint, bp_hardware_watchpoint, bp_read_watchpoint, inferior_ptid, mips_linux_read_watch_registers(), mips_linux_watch_get_irw_mask(), mips_linux_watch_get_num_valid(), ptid_get_lwp(), R_MASK, W_MASK, watch_readback, and watch_readback_valid.
Referenced by _initialize_mips_linux_nat().
static void mips_linux_close | ( | void | ) | [static] |
Definition at line 747 of file mips-linux-nat.c.
References current_watches, mips_watchpoint::next, super_close, and xfree().
Referenced by _initialize_mips_linux_nat().
static int mips_linux_insert_watchpoint | ( | CORE_ADDR | addr, |
int | len, | ||
int | type, | ||
struct expression * | cond | ||
) | [static] |
Definition at line 647 of file mips-linux-nat.c.
References mips_watchpoint::addr, current_watches, inferior_ptid, len, mips_watchpoint::len, maint_show_dr, mips_linux_read_watch_registers(), mips_linux_watch_populate_regs(), mips_linux_watch_try_one_watch(), mips_linux_watch_type_to_irw(), mips_show_dr(), mips_watchpoint::next, ptid_get_lwp(), type, mips_watchpoint::type, watch_mirror, watch_readback, watch_readback_valid, write_watchpoint_regs(), and xmalloc().
Referenced by _initialize_mips_linux_nat().
static void mips_linux_new_thread | ( | struct lwp_info * | lp | ) | [static] |
Definition at line 629 of file mips-linux-nat.c.
References _, inferior_ptid, mips_linux_read_watch_registers(), perror_with_name(), lwp_info::ptid, ptid_get_lwp(), ptrace(), watch_mirror, watch_readback, and watch_readback_valid.
Referenced by _initialize_mips_linux_nat().
static struct target_desc* mips_linux_read_description | ( | struct target_ops * | ops | ) | [static, read] |
Definition at line 431 of file mips-linux-nat.c.
References _, DSP_CONTROL, inferior_ptid, perror_with_name(), ptid_get_lwp(), ptid_get_pid(), ptrace(), tdesc_mips64_dsp_linux, tdesc_mips64_linux, tdesc_mips_dsp_linux, and tdesc_mips_linux.
Referenced by _initialize_mips_linux_nat().
static int mips_linux_region_ok_for_hw_watchpoint | ( | CORE_ADDR | addr, |
int | len | ||
) | [static] |
Definition at line 591 of file mips-linux-nat.c.
References inferior_ptid, mips_linux_read_watch_registers(), mips_linux_watch_get_num_valid(), mips_linux_watch_set_watchlo(), mips_linux_watch_try_one_watch(), ptid_get_lwp(), watch_readback, and watch_readback_valid.
Referenced by _initialize_mips_linux_nat().
static CORE_ADDR mips_linux_register_addr | ( | struct gdbarch * | gdbarch, |
int | regno, | ||
int | store | ||
) | [static] |
Definition at line 76 of file mips-linux-nat.c.
References _, BADVADDR, mips_regnum::badvaddr, CAUSE, mips_regnum::cause, DSP_BASE, DSP_CONTROL, mips_regnum::dspacc, mips_regnum::dspctl, error(), mips_regnum::fp0, mips_regnum::fp_control_status, mips_regnum::fp_implementation_revision, FPC_CSR, FPC_EIR, FPR_BASE, gdbarch_num_regs(), mips_regnum::hi, mips_regnum::lo, mips_linux_restart_reg_p(), mips_regnum(), MIPS_RESTART_REGNUM, MIPS_ZERO_REGNUM, MMHI, MMLO, PC, and mips_regnum::pc.
Referenced by mips_linux_register_u_offset().
static CORE_ADDR mips_linux_register_u_offset | ( | struct gdbarch * | gdbarch, |
int | regno, | ||
int | store_p | ||
) | [static] |
Definition at line 422 of file mips-linux-nat.c.
References mips64_linux_register_addr(), mips_abi_regsize(), and mips_linux_register_addr().
Referenced by _initialize_mips_linux_nat().
static int mips_linux_remove_watchpoint | ( | CORE_ADDR | addr, |
int | len, | ||
int | type, | ||
struct expression * | cond | ||
) | [static] |
Definition at line 700 of file mips-linux-nat.c.
References mips_watchpoint::addr, current_watches, gdb_assert, mips_watchpoint::len, maint_show_dr, mips_linux_watch_populate_regs(), mips_show_dr(), mips_watchpoint::next, mips_watchpoint::type, watch_mirror, watch_readback, watch_readback_valid, write_watchpoint_regs(), and xfree().
Referenced by _initialize_mips_linux_nat().
static int mips_linux_stopped_by_watchpoint | ( | void | ) | [static] |
Definition at line 556 of file mips-linux-nat.c.
References inferior_ptid, MAX_DEBUG_REGISTER, mips_linux_read_watch_registers(), mips_linux_watch_get_num_valid(), mips_linux_watch_get_watchhi(), ptid_get_lwp(), R_MASK, W_MASK, watch_readback, and watch_readback_valid.
Referenced by _initialize_mips_linux_nat().
static int mips_linux_stopped_data_address | ( | struct target_ops * | t, |
CORE_ADDR * | paddr | ||
) | [static] |
Definition at line 580 of file mips-linux-nat.c.
Referenced by _initialize_mips_linux_nat().
static void mips_show_dr | ( | const char * | func, |
CORE_ADDR | addr, | ||
int | len, | ||
enum target_hw_bp_type | type | ||
) | [static] |
Definition at line 485 of file mips-linux-nat.c.
References hw_access, hw_execute, hw_read, hw_write, MAX_DEBUG_REGISTER, mips_linux_watch_get_watchhi(), mips_linux_watch_get_watchlo(), paddress(), printf_unfiltered(), puts_unfiltered(), target_gdbarch(), and watch_mirror.
Referenced by mips_linux_insert_watchpoint(), and mips_linux_remove_watchpoint().
ps_err_e ps_get_thread_area | ( | const struct ps_prochandle * | ph, |
lwpid_t | lwpid, | ||
int | idx, | ||
void ** | base | ||
) |
Definition at line 160 of file mips-linux-nat.c.
References PS_ERR, PS_OK, ptrace(), PTRACE_GET_THREAD_AREA, and PTRACE_GETREGSET.
void supply_fpregset | ( | struct regcache * | regcache, |
const gdb_fpregset_t * | fpregsetp | ||
) |
Definition at line 196 of file mips-linux-nat.c.
References get_regcache_arch(), mips64_supply_fpregset(), mips_isa_regsize(), and mips_supply_fpregset().
void supply_gregset | ( | struct regcache * | regcache, |
const gdb_gregset_t * | gregsetp | ||
) |
Definition at line 177 of file mips-linux-nat.c.
References get_regcache_arch(), mips64_supply_gregset(), mips_isa_regsize(), and mips_supply_gregset().
static int write_watchpoint_regs | ( | void | ) | [static] |
Definition at line 611 of file mips-linux-nat.c.
References _, ALL_LWPS, perror_with_name(), lwp_info::ptid, ptid_get_lwp(), ptrace(), and watch_mirror.
Referenced by mips_linux_insert_watchpoint(), and mips_linux_remove_watchpoint().
struct mips_watchpoint* current_watches [static] |
Definition at line 477 of file mips-linux-nat.c.
Referenced by mips_linux_close(), mips_linux_insert_watchpoint(), mips_linux_remove_watchpoint(), and mips_linux_watch_populate_regs().
int have_ptrace_regsets = 1 [static] |
Definition at line 52 of file mips-linux-nat.c.
Referenced by mips64_linux_fetch_registers(), mips64_linux_regsets_fetch_registers(), and mips64_linux_store_registers().
int maint_show_dr [static] |
Definition at line 56 of file mips-linux-nat.c.
Referenced by _initialize_mips_linux_nat(), mips_linux_insert_watchpoint(), and mips_linux_remove_watchpoint().
void(* super_close)(void) [static] |
Definition at line 66 of file mips-linux-nat.c.
Referenced by _initialize_mips_linux_nat(), and mips_linux_close().
void(* super_fetch_registers)(struct target_ops *, struct regcache *, int) [static] |
Definition at line 61 of file mips-linux-nat.c.
Referenced by _initialize_mips_linux_nat(), mips64_linux_fetch_registers(), and mips64_linux_regsets_fetch_registers().
void(* super_store_registers)(struct target_ops *, struct regcache *, int) [static] |
Definition at line 63 of file mips-linux-nat.c.
Referenced by _initialize_mips_linux_nat(), mips64_linux_regsets_store_registers(), and mips64_linux_store_registers().
struct pt_watch_regs watch_mirror [static] |
Definition at line 482 of file mips-linux-nat.c.
Referenced by mips_linux_insert_watchpoint(), mips_linux_new_thread(), mips_linux_remove_watchpoint(), mips_show_dr(), and write_watchpoint_regs().
struct pt_watch_regs watch_readback [static] |
Definition at line 475 of file mips-linux-nat.c.
Referenced by mips_linux_can_use_hw_breakpoint(), mips_linux_insert_watchpoint(), mips_linux_new_thread(), mips_linux_region_ok_for_hw_watchpoint(), mips_linux_remove_watchpoint(), and mips_linux_stopped_by_watchpoint().
int watch_readback_valid [static] |
Definition at line 471 of file mips-linux-nat.c.
Referenced by mips_linux_can_use_hw_breakpoint(), mips_linux_insert_watchpoint(), mips_linux_new_thread(), mips_linux_region_ok_for_hw_watchpoint(), mips_linux_remove_watchpoint(), and mips_linux_stopped_by_watchpoint().