20 #include "arch/arm-linux.h" 24 #include <sys/ptrace.h> 32 #define arm_abi_breakpoint 0xef9f0001UL 38 #define arm_eabi_breakpoint 0xe7f001f0UL 40 #if (defined __ARM_EABI__ || defined __aarch64__) 46 #define arm_breakpoint_len 4 48 #define thumb_breakpoint_len 2 50 #define thumb2_breakpoint_len 4 55 #define NT_ARM_VFP 0x400 64 uint32_t *regs = (uint32_t *) buf;
65 uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
67 for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
72 regs[ARM_CPSR_GREGNUM] = ((regs[ARM_CPSR_GREGNUM] & 0xff0fffff)
73 | (cpsr & 0x00f00000));
83 const uint32_t *regs = (
const uint32_t *) buf;
84 uint32_t cpsr = regs[ARM_CPSR_GREGNUM];
87 for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
90 for (; i < ARM_PS_REGNUM; i++)
108 for (i = 0; i < num; i++)
125 for (i = 0; i < num; i++)
233 if (IS_THUMB_ADDR (*pcptr))
237 *pcptr = UNMAKE_THUMB_ADDR (*pcptr);
242 unsigned short inst1 = 0;
245 if (thumb_insn_size (inst1) == 4)
246 return ARM_BP_KIND_THUMB2;
248 return ARM_BP_KIND_THUMB;
251 return ARM_BP_KIND_ARM;
267 case ARM_BP_KIND_THUMB:
270 case ARM_BP_KIND_THUMB2:
273 case ARM_BP_KIND_ARM:
290 *pcptr = MAKE_THUMB_ADDR (*pcptr);
const struct target_desc * tdesc
int arm_breakpoint_at(CORE_ADDR where)
void arm_store_gregset(struct regcache *regcache, const void *buf)
struct thread_info * current_thread
void collect_register(struct regcache *regcache, int n, void *buf)
static struct regsets_info aarch32_regsets_info
void supply_register_by_name(struct regcache *regcache, const char *name, const void *buf)
void initialize_low_arch_aarch32(void)
void init_registers_arm_with_neon(void)
static void arm_fill_vfpregset(struct regcache *regcache, void *buf)
void * memset(T *s, int c, size_t n)=delete
static const unsigned short thumb_breakpoint
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct regs_info regs_info_aarch32
struct target_ops * the_target
const gdb_byte * arm_sw_breakpoint_from_kind(int kind, int *size)
void collect_register_by_name(struct regcache *regcache, const char *name, void *buf)
#define thumb_breakpoint_len
int arm_breakpoint_kind_from_pc(CORE_ADDR *pcptr)
static const unsigned long arm_breakpoint
int arm_breakpoint_kind_from_current_state(CORE_ADDR *pcptr)
int arm_is_thumb_mode(void)
#define thumb2_breakpoint_len
static const unsigned short thumb2_breakpoint[]
#define arm_abi_breakpoint
void arm_fill_gregset(struct regcache *regcache, void *buf)
void arm_fill_vfpregset_num(struct regcache *regcache, void *buf, int num)
int find_regno(const struct target_desc *tdesc, const char *name)
#define arm_eabi_breakpoint
#define arm_breakpoint_len
int(* read_memory)(CORE_ADDR memaddr, unsigned char *myaddr, int len)
struct regcache * get_thread_regcache(struct thread_info *thread, int fetch)
static void arm_store_vfpregset(struct regcache *regcache, const void *buf)
static struct regset_info aarch32_regsets[]
void supply_register(struct regcache *regcache, int n, const void *buf)
void arm_store_vfpregset_num(struct regcache *regcache, const void *buf, int num)