[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.
This commit is contained in:
Yao Qi
2016-01-14 14:54:24 +00:00
parent c0518081f0
commit e7cf25a8ab
4 changed files with 36 additions and 29 deletions

View File

@@ -138,10 +138,6 @@ struct gdbarch_tdep
struct type *neon_double_type;
struct type *neon_quad_type;
/* Return the expected next PC if the program is stopped at a syscall
instruction. */
CORE_ADDR (*syscall_next_pc) (struct regcache *regcache);
/* syscall record. */
int (*arm_syscall_record) (struct regcache *regcache, unsigned long svc_number);
};
@@ -261,9 +257,6 @@ ULONGEST arm_get_next_pcs_read_memory_unsigned_integer (CORE_ADDR memaddr,
CORE_ADDR arm_get_next_pcs_addr_bits_remove (struct arm_get_next_pcs *self,
CORE_ADDR val);
CORE_ADDR arm_get_next_pcs_syscall_next_pc (struct arm_get_next_pcs *self,
CORE_ADDR pc);
int arm_get_next_pcs_is_thumb (struct arm_get_next_pcs *self);
void arm_insert_single_step_breakpoint (struct gdbarch *,