ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
* arm-linux-tdep.c (arm_linux_supply_gregset,
arm_linux_collect_gregset): Likewise.
* arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
* arm-tdep.h (ARM_CPSR_REGNUM): Remove.
+2009-04-22 Kazu Hirata <kazu@codesourcery.com>
+
+ * arm-linux-nat.c (fetch_register, store_register): Use
+ ARM_CPSR_GREGNUM instead of ARM_CPSR_REGNUM.
+ * arm-linux-tdep.c (arm_linux_supply_gregset,
+ arm_linux_collect_gregset): Likewise.
+ * arm-linux-tdep.h (ARM_CPSR_GREGNUM): New.
+ * arm-tdep.h (ARM_CPSR_REGNUM): Remove.
+
2009-04-22 Hui Zhu <teawater@gmail.com>
* stack.c (_initialize_stack): Set the default of
{
if (arm_apcs_32)
regcache_raw_supply (regcache, ARM_PS_REGNUM,
- (char *) ®s[ARM_CPSR_REGNUM]);
+ (char *) ®s[ARM_CPSR_GREGNUM]);
else
regcache_raw_supply (regcache, ARM_PS_REGNUM,
(char *) ®s[ARM_PC_REGNUM]);
if (arm_apcs_32)
regcache_raw_supply (regcache, ARM_PS_REGNUM,
- (char *) ®s[ARM_CPSR_REGNUM]);
+ (char *) ®s[ARM_CPSR_GREGNUM]);
else
regcache_raw_supply (regcache, ARM_PS_REGNUM,
(char *) ®s[ARM_PC_REGNUM]);
regcache_raw_collect (regcache, regno, (char *) ®s[regno]);
else if (arm_apcs_32 && regno == ARM_PS_REGNUM)
regcache_raw_collect (regcache, regno,
- (char *) ®s[ARM_CPSR_REGNUM]);
+ (char *) ®s[ARM_CPSR_GREGNUM]);
else if (!arm_apcs_32 && regno == ARM_PS_REGNUM)
regcache_raw_collect (regcache, ARM_PC_REGNUM,
(char *) ®s[ARM_PC_REGNUM]);
if (arm_apcs_32 && regcache_valid_p (regcache, ARM_PS_REGNUM))
regcache_raw_collect (regcache, ARM_PS_REGNUM,
- (char *) ®s[ARM_CPSR_REGNUM]);
+ (char *) ®s[ARM_CPSR_GREGNUM]);
ret = ptrace (PTRACE_SETREGS, tid, 0, ®s);
{
if (arm_apcs_32)
regcache_raw_supply (regcache, ARM_PS_REGNUM,
- gregs + INT_REGISTER_SIZE * ARM_CPSR_REGNUM);
+ gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM);
else
regcache_raw_supply (regcache, ARM_PS_REGNUM,
gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
{
if (arm_apcs_32)
regcache_raw_collect (regcache, ARM_PS_REGNUM,
- gregs + INT_REGISTER_SIZE * ARM_CPSR_REGNUM);
+ gregs + INT_REGISTER_SIZE * ARM_CPSR_GREGNUM);
else
regcache_raw_collect (regcache, ARM_PS_REGNUM,
gregs + INT_REGISTER_SIZE * ARM_PC_REGNUM);
+ 2 * INT_REGISTER_SIZE \
+ 8 + INT_REGISTER_SIZE)
+/* The index to access CSPR in user_regs defined in GLIBC. */
+#define ARM_CPSR_GREGNUM 16
+
/* Support for register format used by the NWFPE FPA emulator. Each
register takes three words, where either the first one, two, or
three hold a single, double, or extended precision value (depending
ARM_F7_REGNUM = 23, /* last floating point register */
ARM_FPS_REGNUM = 24, /* floating point status register */
ARM_PS_REGNUM = 25, /* Contains processor status */
- ARM_CPSR_REGNUM = ARM_PS_REGNUM,
ARM_WR0_REGNUM, /* WMMX data registers. */
ARM_WR15_REGNUM = ARM_WR0_REGNUM + 15,
ARM_WC0_REGNUM, /* WMMX control registers. */