24 #include "arch/tic6x.h" 32 #ifndef PTRACE_GET_THREAD_AREA 33 #define PTRACE_GET_THREAD_AREA 25 37 #define TIC6X_NUM_REGS 69 39 #include <asm/ptrace.h> 62 #if __BYTE_ORDER == __BIG_ENDIAN 65 53, 52, 55, 54, 57, 56, 59, 58,
66 61, 60, 63, 62, 65, 64, 67, 66,
68 23, 22, 25, 24, 27, 26, 29, 28,
69 31, 30, 33, 32, 35, 34, 69, 68,
73 37, 36, 39, 38, 41, 40, 43, 42,
74 45, 44, 47, 46, 49, 48, 51, 50,
76 7, 6, 9, 8, 11, 10, 13, 12,
77 15, 14, 17, 16, 19, 18, 21, 20,
84 51, 50, 53, 52, 55, 54, 57, 56,
85 59, 58, 61, 60, 63, 62, 65, 64,
87 21, 20, 23, 22, 25, 24, 27, 26,
88 29, 28, 31, 30, 33, 32, 67, 66,
92 35, 34, 37, 36, 39, 38, 41, 40,
93 43, 42, 45, 44, 47, 46, 49, 48,
95 5, 4, 7, 6, 9, 8, 11, 10,
96 13, 12, 15, 14, 17, 16, 19, 18,
102 19, 18, 21, 20, 23, 22, 25, 24,
103 27, 26, 29, 28, 31, 30, 33, 32,
105 5, 4, 7, 6, 9, 8, 11, 10,
106 13, 12, 15, 14, 17, 16, 35, 34,
109 -1, -1, -1, -1, -1, -1, -1, -1,
110 -1, -1, -1, -1, -1, -1, -1, -1,
111 -1, -1, -1, -1, -1, -1, -1, -1,
112 -1, -1, -1, -1, -1, -1, -1, -1,
119 52, 53, 54, 55, 56, 57, 58, 59,
120 60, 61, 62, 63, 64, 65, 66, 67,
122 22, 23, 24, 25, 26, 27, 28, 29,
123 30, 31, 32, 33, 34, 35, 68, 69,
127 36, 37, 38, 39, 40, 41, 42, 43,
128 44, 45, 46, 47, 48, 49, 50, 51,
130 6, 7, 8, 9, 10, 11, 12, 13,
131 14, 15, 16, 17, 18, 19, 20, 31,
138 50, 51, 52, 53, 54, 55, 56, 57,
139 58, 59, 60, 61, 62, 63, 64, 65,
141 20, 21, 22, 23, 24, 25, 26, 27,
142 28, 29, 30, 31, 32, 33, 66, 67,
146 34, 35, 36, 37, 38, 39, 40, 41,
147 42, 43, 44, 45, 46, 47, 48, 49,
149 4, 5, 6, 7, 8, 9, 10, 11,
150 12, 13, 14, 15, 16, 17, 18, 19,
156 18, 19, 20, 21, 22, 23, 24, 25,
157 26, 27, 28, 29, 30, 31, 32, 33,
159 4, 5, 6, 7, 8, 9, 10, 11,
160 12, 13, 14, 15, 16, 17, 34, 35,
163 -1, -1, -1, -1, -1, -1, -1, -1,
164 -1, -1, -1, -1, -1, -1, -1, -1,
165 -1, -1, -1, -1, -1, -1, -1, -1,
166 -1, -1, -1, -1, -1, -1, -1, -1,
176 #define tic6x_breakpoint_len 4 201 *tdesc = tic6x_create_target_description (feature);
259 lwpid_t lwpid,
int idx,
void **base)
267 *base = (
void *) ((
char *) *base - idx);
314 { PTRACE_GETREGS, PTRACE_SETREGS, 0,
TIC6X_NUM_REGS * 4, GENERAL_REGS,
322 register unsigned int csr
asm (
"B2");
324 enum c6x_feature feature = C6X_CORE;
327 __asm__ (
"MVC .S2 CSR,%0" :
"=r" (csr) :);
355 error (
"Unknown CPU ID 0x%02x", cpuid);
static void tic6x_fill_gregset(struct regcache *regcache, void *buf)
const struct target_desc * tdesc_tic6x_c64xp_linux
void collect_register(struct regcache *regcache, int n, void *buf)
static struct usrregs_info tic6x_usrregs_info
void supply_register_by_name(struct regcache *regcache, const char *name, const void *buf)
#define PTRACE_GET_THREAD_AREA
static int tic6x_cannot_fetch_register(int regno)
const char ** expedite_regs
static const struct regs_info * tic6x_regs_info(void)
static void tic6x_collect_register(struct regcache *regcache, int regno, union tic6x_register *reg)
static struct regset_info tic6x_regsets[]
static const struct target_desc * tic6x_read_description(enum c6x_feature feature)
void initialize_low_arch(void)
struct target_ops * the_target
static struct regs_info regs_info
const struct target_desc * tdesc_tic6x_c64x_linux
const struct target_desc * tdesc
static void tic6x_supply_register(struct regcache *regcache, int regno, const union tic6x_register *reg)
static const gdb_byte * tic6x_sw_breakpoint_from_kind(int kind, int *size)
void collect_register_by_name(struct regcache *regcache, const char *name, void *buf)
static int tic6x_regmap_c62x[]
static int * tic6x_regmap
static void tic6x_store_gregset(struct regcache *regcache, const void *buf)
static CORE_ADDR tic6x_get_pc(struct regcache *regcache)
void init_registers_tic6x_c64xp_linux(void)
static int tic6x_supports_hardware_single_step(void)
struct process_info * current_process(void)
#define tic6x_breakpoint_len
static int tic6x_regmap_c64x[]
void init_target_desc(struct target_desc *tdesc)
static unsigned int tic6x_breakpoint
int(* read_memory)(CORE_ADDR memaddr, unsigned char *myaddr, int len)
void init_registers_tic6x_c62x_linux(void)
static int tic6x_cannot_store_register(int regno)
ps_err_e ps_get_thread_area(struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
const struct target_desc * tdesc_tic6x_c62x_linux
static int tic6x_regmap_c64xp[]
static void tic6x_set_pc(struct regcache *regcache, CORE_ADDR pc)
static int tic6x_breakpoint_at(CORE_ADDR where)
static void tic6x_arch_setup(void)
struct linux_target_ops the_low_target
void supply_register(struct regcache *regcache, int n, const void *buf)
static struct regsets_info tic6x_regsets_info
void register_test(const std::string &name, selftest *test)
void error(const char *fmt,...)
void init_registers_tic6x_c64x_linux(void)
#define SELF_CHECK(VALUE)