diff options
author | Yao Qi <yao.qi@linaro.org> | 2016-04-20 12:31:53 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2016-04-20 12:32:15 +0100 |
commit | 6885166d994162c92dc9053bdf2d87e67a452db3 (patch) | |
tree | 49ea3ee0823e60e198206be970bc6cd40bad7a82 /gdb/gdbserver | |
parent | 7cc9c114fef05bc603111c0ceb6d2275c0275deb (diff) | |
download | gdb-6885166d994162c92dc9053bdf2d87e67a452db3.zip gdb-6885166d994162c92dc9053bdf2d87e67a452db3.tar.gz gdb-6885166d994162c92dc9053bdf2d87e67a452db3.tar.bz2 |
Move ARM_CPSR_GREGNUM to arch/arm-linux.h
This patch moves macro ARM_CPSR_GREGNUM to arch/arm-linux.h so that it
can be used in GDBserver side.
gdb:
2016-04-20 Yao Qi <yao.qi@linaro.org>
* arm-linux-tdep.h (ARM_CPSR_GREGNUM): Move it to ...
* arch/arm-linux.h: ... here.
gdb/gdbserver:
2016-04-20 Yao Qi <yao.qi@linaro.org>
* linux-aarch32-low.c: Include "arch/arm-linux.h".
(arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
number 16.
(arm_store_gregset): Likewise.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/gdbserver/linux-aarch32-low.c | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 364d755..c290130 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2016-04-20 Yao Qi <yao.qi@linaro.org> + + * linux-aarch32-low.c: Include "arch/arm-linux.h". + (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic + number 16. + (arm_store_gregset): Likewise. + 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com> * Makefile.in (clean): Add removal for i386-avx-mpx.c, diff --git a/gdb/gdbserver/linux-aarch32-low.c b/gdb/gdbserver/linux-aarch32-low.c index 2bbbb24..0c4b140 100644 --- a/gdb/gdbserver/linux-aarch32-low.c +++ b/gdb/gdbserver/linux-aarch32-low.c @@ -17,6 +17,7 @@ #include "server.h" #include "arch/arm.h" +#include "arch/arm-linux.h" #include "linux-low.h" #include "linux-aarch32-low.h" @@ -65,7 +66,7 @@ arm_fill_gregset (struct regcache *regcache, void *buf) for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++) collect_register (regcache, i, ®s[i]); - collect_register (regcache, ARM_PS_REGNUM, ®s[16]); + collect_register (regcache, ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]); } /* Supply GP registers contents, stored in BUF, to REGCACHE. */ @@ -84,7 +85,7 @@ arm_store_gregset (struct regcache *regcache, const void *buf) for (; i < ARM_PS_REGNUM; i++) supply_register (regcache, i, zerobuf); - supply_register (regcache, ARM_PS_REGNUM, ®s[16]); + supply_register (regcache, ARM_PS_REGNUM, ®s[ARM_CPSR_GREGNUM]); } /* Collect NUM number of VFP registers from REGCACHE to buffer BUF. */ |