24 #include "elf/common.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,
101 #if defined(__nios2_arch__) && __nios2_arch__ == 2 102 #define NIOS2_BREAKPOINT 0xb7fd0020 103 #define CDX_BREAKPOINT 0xd7c9 105 #define NIOS2_BREAKPOINT 0x003b6ffa 114 #define nios2_breakpoint_len 4 133 #if defined(__nios2_arch__) && __nios2_arch__ == 2 135 if (insn == CDX_BREAKPOINT)
149 lwpid_t lwpid,
int idx,
void **base)
157 *base = (
void *) ((
char *) *base - idx);
void init_registers_nios2_linux(void)
void collect_register(struct regcache *regcache, int n, void *buf)
static struct regset_info nios2_regsets[]
#define nios2_breakpoint_len
static const unsigned int nios2_breakpoint
void initialize_low_arch(void)
struct target_ops * the_target
const struct target_desc * tdesc
CORE_ADDR linux_get_pc_32bit(struct regcache *regcache)
static void nios2_supply_register(struct regcache *regcache, int regno, const union nios2_register *reg)
struct linux_target_ops the_low_target
static int nios2_cannot_store_register(int regno)
#define PTRACE_GET_THREAD_AREA
static const gdb_byte * nios2_sw_breakpoint_from_kind(int kind, int *size)
struct process_info * current_process(void)
void linux_set_pc_32bit(struct regcache *regcache, CORE_ADDR pc)
static void nios2_collect_register(struct regcache *regcache, int regno, union nios2_register *reg)
static int nios2_regmap[]
ps_err_e ps_get_thread_area(struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
static void nios2_store_gregset(struct regcache *regcache, const void *buf)
int(* read_memory)(CORE_ADDR memaddr, unsigned char *myaddr, int len)
static int nios2_breakpoint_at(CORE_ADDR where)
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
void supply_register(struct regcache *regcache, int n, const void *buf)
static void nios2_fill_gregset(struct regcache *regcache, void *buf)
static struct regs_info regs_info
static const struct regs_info * nios2_regs_info(void)