int arm_breakpoint_kind_from_pc (CORE_ADDR *pcptr) { if (IS_THUMB_ADDR (*pcptr)) { gdb_byte buf[2]; *pcptr = UNMAKE_THUMB_ADDR (*pcptr); /* Check whether we are replacing a thumb2 32-bit instruction. */ if ((*the_target->read_memory) (*pcptr, buf, 2) == 0) { unsigned short inst1 = 0; (*the_target->read_memory) (*pcptr, (gdb_byte *) &inst1, 2); if (thumb_insn_size (inst1) == 4) return ARM_BP_KIND_THUMB2; } return ARM_BP_KIND_THUMB; } else return ARM_BP_KIND_ARM; }
/* Wrapper of UNMAKE_THUMB_ADDR for get_next_pcs. */ static CORE_ADDR get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self, CORE_ADDR val) { return UNMAKE_THUMB_ADDR (val); }