24 #include "elf/common.h"
25 #include <sys/ptrace.h>
28 #include <asm/ptrace.h>
30 #ifndef PTRACE_GET_THREAD_AREA
31 #define PTRACE_GET_THREAD_AREA 25
39 #define nios2_num_regs 49
58 -1, 1, 2, 3, 4, 5, 6, 7,
59 8, 9, 10, 11, 12, 13, 14, 15,
60 16, 17, 18, 19, 20, 21, 22, 23,
61 24, 25, 26, 27, 28, 29, 30, 31,
62 32, 33, 34, 35, 36, 37, 38, 39,
63 40, 41, 42, 43, 44, 45, 46, 47,
81 if (nios2_regmap[regno] == -1)
92 if (nios2_regmap[regno] == -1)
123 #define nios2_breakpoint_len 4
145 if (insn == nios2_breakpoint)
154 lwpid_t lwpid,
int idx,
void **base)
162 *base = (
void *) ((
char *) *base - idx);
213 { 0, 0, 0, -1, -1, NULL, NULL }
229 static struct regs_info regs_info =
236 static const struct regs_info *
251 (
const unsigned char *) &nios2_breakpoint,
263 initialize_regsets_info (&nios2_regsets_info);
void init_registers_nios2_linux(void)
struct thread_info * current_thread
void collect_register(struct regcache *regcache, int n, void *buf)
static struct regset_info nios2_regsets[]
#define nios2_breakpoint_len
void supply_register_by_name(struct regcache *regcache, const char *name, const void *buf)
static const unsigned int nios2_breakpoint
void initialize_low_arch(void)
struct target_ops * the_target
const struct target_desc * tdesc
static CORE_ADDR nios2_get_pc(struct regcache *regcache)
void collect_register_by_name(struct regcache *regcache, const char *name, void *buf)
static void nios2_supply_register(struct regcache *regcache, int regno, const union nios2_register *reg)
static int nios2_cannot_store_register(int regno)
#define PTRACE_GET_THREAD_AREA
struct process_info * current_process(void)
static void nios2_collect_register(struct regcache *regcache, int regno, union nios2_register *reg)
static int nios2_regmap[]
static void nios2_store_gregset(struct regcache *regcache, const void *buf)
static CORE_ADDR nios2_reinsert_addr(void)
int(* read_memory)(CORE_ADDR memaddr, unsigned char *myaddr, int len)
static int nios2_breakpoint_at(CORE_ADDR where)
struct regcache * get_thread_regcache(struct thread_info *thread, int fetch)
static struct usrregs_info nios2_usrregs_info
const struct target_desc * tdesc_nios2_linux
static int nios2_cannot_fetch_register(int regno)
static void nios2_arch_setup(void)
static struct regsets_info nios2_regsets_info
ps_err_e ps_get_thread_area(const struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
void supply_register(struct regcache *regcache, int n, const void *buf)
static void nios2_fill_gregset(struct regcache *regcache, void *buf)
static void nios2_set_pc(struct regcache *regcache, CORE_ADDR pc)
static struct regs_info regs_info
static const struct regs_info * nios2_regs_info(void)