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.
This commit is contained in:
parent
7cc9c114fe
commit
6885166d99
|
@ -1,3 +1,8 @@
|
||||||
|
2016-04-20 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* arm-linux-tdep.h (ARM_CPSR_GREGNUM): Move it to ...
|
||||||
|
* arch/arm-linux.h: ... here.
|
||||||
|
|
||||||
2016-04-19 John Baldwin <jhb@FreeBSD.org>
|
2016-04-19 John Baldwin <jhb@FreeBSD.org>
|
||||||
|
|
||||||
* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Change xstateregs
|
* amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Change xstateregs
|
||||||
|
|
|
@ -20,6 +20,9 @@
|
||||||
#ifndef ARM_LINUX_H
|
#ifndef ARM_LINUX_H
|
||||||
#define ARM_LINUX_H
|
#define ARM_LINUX_H
|
||||||
|
|
||||||
|
/* The index to access CSPR in user_regs defined in GLIBC. */
|
||||||
|
#define ARM_CPSR_GREGNUM 16
|
||||||
|
|
||||||
/* There are a couple of different possible stack layouts that
|
/* There are a couple of different possible stack layouts that
|
||||||
we need to support.
|
we need to support.
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,6 @@ struct regcache;
|
||||||
+ 2 * INT_REGISTER_SIZE \
|
+ 2 * INT_REGISTER_SIZE \
|
||||||
+ 8 + 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
|
/* Support for register format used by the NWFPE FPA emulator. Each
|
||||||
register takes three words, where either the first one, two, or
|
register takes three words, where either the first one, two, or
|
||||||
three hold a single, double, or extended precision value (depending
|
three hold a single, double, or extended precision value (depending
|
||||||
|
|
|
@ -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>
|
2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
|
||||||
|
|
||||||
* Makefile.in (clean): Add removal for i386-avx-mpx.c,
|
* Makefile.in (clean): Add removal for i386-avx-mpx.c,
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "arch/arm.h"
|
#include "arch/arm.h"
|
||||||
|
#include "arch/arm-linux.h"
|
||||||
#include "linux-low.h"
|
#include "linux-low.h"
|
||||||
#include "linux-aarch32-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++)
|
for (i = ARM_A1_REGNUM; i <= ARM_PC_REGNUM; i++)
|
||||||
collect_register (regcache, i, ®s[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. */
|
/* 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++)
|
for (; i < ARM_PS_REGNUM; i++)
|
||||||
supply_register (regcache, i, zerobuf);
|
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. */
|
/* Collect NUM number of VFP registers from REGCACHE to buffer BUF. */
|
||||||
|
|
Loading…
Reference in New Issue