aboutsummaryrefslogtreecommitdiff
path: root/gdb/arch
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-06-26 10:12:13 +0100
committerAlan Hayward <alan.hayward@arm.com>2019-07-04 12:47:30 +0100
commitf0452268d6c7296106aba81f532b04dc08187352 (patch)
tree26fda2648b02d0f3a90f5c74760c10ec3a415b83 /gdb/arch
parente935475cb6bcd8146717896e88824ae93a0897c7 (diff)
downloadgdb-f0452268d6c7296106aba81f532b04dc08187352.zip
gdb-f0452268d6c7296106aba81f532b04dc08187352.tar.gz
gdb-f0452268d6c7296106aba81f532b04dc08187352.tar.bz2
Arm: Prefix register sizes with ARM_
Add ARM_ to the front of INT_REGISTER_SIZE, FP_REGISTER_SIZE and ARM_VFP_REGISTER_SIZE to make it obvious they are for the Arm target. Move the defines to arch/arm.h No functionality changes. gdb/ChangeLog: * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Use ARM_ defines. * arch/arm-linux.c (arm_linux_sigreturn_next_pc_offset): Likewise. * arch/arm.h (INT_REGISTER_SIZE) Rename from... (ARM_INT_REGISTER_SIZE): ...to this. (ARM_FP_REGISTER_SIZE) (ARM_VFP_REGISTER_SIZE): Add define. * arm-linux-tdep.c (ARM_LINUX_JB_ELEMENT_SIZE) (ARM_LINUX_SIZEOF_GREGSET, arm_linux_supply_gregset) (arm_linux_collect_gregset, supply_nwfpe_register) (collect_nwfpe_register, arm_linux_collect_nwfpe): Use ARM_ defines. * arm-linux-tdep.h (ARM_LINUX_SIZEOF_NWFPE, NWFPE_FPSR_OFFSET) (NWFPE_FPCR_OFFSET, NWFPE_TAGS_OFFSET): Likewise * arm-nbsd-tdep.c (ARM_NBSD_JB_ELEMENT_SIZE): Likewise. * arm-tdep.c (arm_push_dummy_call, arm_extract_return_value) (arm_return_in_memory, arm_store_return_value) (arm_get_longjmp_target, arm_register_g_packet_guesses) (arm_record_ld_st_multiple): Likewise. * arm-tdep.h (FP_REGISTER_SIZE, VFP_REGISTER_SIZE): Remove. * arm-wince-tdep.c (ARM_WINCE_JB_ELEMENT_SIZE): Use ARM_ defines.
Diffstat (limited to 'gdb/arch')
-rw-r--r--gdb/arch/arm-get-next-pcs.c3
-rw-r--r--gdb/arch/arm-linux.c2
-rw-r--r--gdb/arch/arm.h8
3 files changed, 9 insertions, 4 deletions
diff --git a/gdb/arch/arm-get-next-pcs.c b/gdb/arch/arm-get-next-pcs.c
index 06b3f2c..00c7064 100644
--- a/gdb/arch/arm-get-next-pcs.c
+++ b/gdb/arch/arm-get-next-pcs.c
@@ -408,7 +408,8 @@ thumb_get_next_pcs_raw (struct arm_get_next_pcs *self)
/* Fetch the saved PC from the stack. It's stored above
all of the other registers. */
- unsigned long offset = bitcount (bits (inst1, 0, 7)) * INT_REGISTER_SIZE;
+ unsigned long offset = bitcount (bits (inst1, 0, 7))
+ * ARM_INT_REGISTER_SIZE;
sp = regcache_raw_get_unsigned (regcache, ARM_SP_REGNUM);
nextpc = self->ops->read_mem_uint (sp + offset, 4, byte_order);
}
diff --git a/gdb/arch/arm-linux.c b/gdb/arch/arm-linux.c
index a399f3e..180228f 100644
--- a/gdb/arch/arm-linux.c
+++ b/gdb/arch/arm-linux.c
@@ -53,7 +53,7 @@ arm_linux_sigreturn_next_pc_offset (unsigned long sp,
r0_offset += ARM_UCONTEXT_SIGCONTEXT + ARM_SIGCONTEXT_R0;
}
- pc_offset = r0_offset + INT_REGISTER_SIZE * ARM_PC_REGNUM;
+ pc_offset = r0_offset + ARM_INT_REGISTER_SIZE * ARM_PC_REGNUM;
return pc_offset;
}
diff --git a/gdb/arch/arm.h b/gdb/arch/arm.h
index c178542..0ebbf89 100644
--- a/gdb/arch/arm.h
+++ b/gdb/arch/arm.h
@@ -93,8 +93,12 @@ enum arm_breakpoint_kinds
#define XPSR_T 0x01000000
-/* Size of integer registers. */
-#define INT_REGISTER_SIZE 4
+/* Size of registers. */
+
+#define ARM_INT_REGISTER_SIZE 4
+/* IEEE extended doubles are 80 bits. DWORD aligned they use 96 bits. */
+#define ARM_FP_REGISTER_SIZE 12
+#define ARM_VFP_REGISTER_SIZE 8
/* Addresses for calling Thumb functions have the bit 0 set.
Here are some macros to test, set, or clear bit 0 of addresses. */