forked from Imagelibrary/binutils-gdb
* 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.
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
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
|
||||
|
||||
@@ -246,7 +246,7 @@ fetch_register (struct regcache *regcache, int regno)
|
||||
{
|
||||
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]);
|
||||
@@ -286,7 +286,7 @@ fetch_regs (struct regcache *regcache)
|
||||
|
||||
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]);
|
||||
@@ -324,7 +324,7 @@ store_register (const struct regcache *regcache, int regno)
|
||||
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]);
|
||||
@@ -362,7 +362,7 @@ store_regs (const struct regcache *regcache)
|
||||
|
||||
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);
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@ arm_linux_supply_gregset (const struct regset *regset,
|
||||
{
|
||||
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);
|
||||
@@ -416,7 +416,7 @@ arm_linux_collect_gregset (const struct regset *regset,
|
||||
{
|
||||
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);
|
||||
|
||||
@@ -24,6 +24,9 @@ struct regcache;
|
||||
+ 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
|
||||
|
||||
@@ -38,7 +38,6 @@ enum gdb_regnum {
|
||||
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. */
|
||||
|
||||
Reference in New Issue
Block a user