aboutsummaryrefslogtreecommitdiff
path: root/gdb/arm-tdep.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-01-14 14:54:24 +0000
committerYao Qi <yao.qi@linaro.org>2016-01-14 14:54:24 +0000
commite7cf25a8ab54cd02b48e7443ef25764475f02315 (patch)
tree0686df46436c7328a6eaedbe471eeb03a54cc30a /gdb/arm-tdep.c
parentc0518081f09298c67d1e74e0cc592fde8e0c6571 (diff)
downloadgdb-e7cf25a8ab54cd02b48e7443ef25764475f02315.zip
gdb-e7cf25a8ab54cd02b48e7443ef25764475f02315.tar.gz
gdb-e7cf25a8ab54cd02b48e7443ef25764475f02315.tar.bz2
[ARM] Remove field syscall_next_pc in struct gdbarch_tdep
Field syscall_next_pc in struct gdbarch_tdep was to calculate the next pc of syscall instruction. On linux target, syscall_next_pc is set to arm_linux_syscall_next_pc, to do linux specific things. However, after we have struct arm_get_next_pcs_ops, we can do the same thing in struct arm_get_next_pcs_ops field syscall_next_pc, so syscall_next_pc in struct gdbarch_tdep is not needed any more. gdb: 2016-01-14 Yao Qi <yao.qi@linaro.org> * arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc): Declare. (arm_linux_get_next_pcs_ops): Install arm_linux_get_next_pcs_syscall_next_pc. (arm_linux_syscall_next_pc): Change to ... (arm_linux_get_next_pcs_syscall_next_pc): ... it. (arm_linux_init_abi): Don't set tdep->syscall_next_pc. * arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare. (arm_get_next_pcs_syscall_next_pc): Make it static. Don't call tdep->syscall_next_pc. * arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove. (arm_get_next_pcs_syscall_next_pc): Remove.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r--gdb/arm-tdep.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 8874ec8..ccc2a03 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -237,6 +237,11 @@ static void arm_neon_quad_write (struct gdbarch *gdbarch,
struct regcache *regcache,
int regnum, const gdb_byte *buf);
+static CORE_ADDR
+ arm_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self,
+ CORE_ADDR pc);
+
+
/* get_next_pcs operations. */
static struct arm_get_next_pcs_ops arm_get_next_pcs_ops = {
arm_get_next_pcs_read_memory_unsigned_integer,
@@ -6142,15 +6147,10 @@ arm_get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self,
/* Wrapper over syscall_next_pc for use in get_next_pcs. */
-CORE_ADDR
-arm_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self, CORE_ADDR pc)
+static CORE_ADDR
+arm_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self,
+ CORE_ADDR pc)
{
- struct gdbarch_tdep *tdep;
-
- tdep = gdbarch_tdep (get_regcache_arch (self->regcache));
- if (tdep->syscall_next_pc != NULL)
- return tdep->syscall_next_pc (self->regcache);
-
return 0;
}