arm-tdep.c: Remove unused arm_displaced_step_copy_insn

This function is never used, since it is superseded by
arm_linux_displaced_step_copy_insn.

gdb/ChangeLog:

	* arm-tdep.c (arm_displaced_step_copy_insn): Remove.
	(ARM displaced stepping support): Remove reference to
	arm_displaced_step_copy_insn in comment.
	* arm-tdep.h (arm_displaced_step_copy_insn): Remove.
	* arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Remove
	reference to arm_displaced_step_copy_insn in comment.
This commit is contained in:
Simon Marchi 2016-02-11 14:08:53 -05:00
parent 615234c107
commit 2ba163c8d1
4 changed files with 16 additions and 28 deletions

View File

@ -1,3 +1,12 @@
2016-02-11 Simon Marchi <simon.marchi@ericsson.com>
* arm-tdep.c (arm_displaced_step_copy_insn): Remove.
(ARM displaced stepping support): Remove reference to
arm_displaced_step_copy_insn in comment.
* arm-tdep.h (arm_displaced_step_copy_insn): Remove.
* arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Remove
reference to arm_displaced_step_copy_insn in comment.
2016-02-11 Simon Marchi <simon.marchi@ericsson.com>
* arm-tdep.c (thumb_copy_unmodified_16bit): Change type of insn.

View File

@ -1128,8 +1128,7 @@ arm_catch_kernel_helper_return (struct gdbarch *gdbarch, CORE_ADDR from,
/* Linux-specific displaced step instruction copying function. Detects when
the program has stepped into a Linux kernel helper routine (which must be
handled as a special case), falling back to arm_displaced_step_copy_insn()
if it hasn't. */
handled as a special case). */
static struct displaced_step_closure *
arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,

View File

@ -4307,13 +4307,12 @@ arm_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
Generally ARM displaced stepping works as follows:
1. When an instruction is to be single-stepped, it is first decoded by
arm_process_displaced_insn (called from arm_displaced_step_copy_insn).
Depending on the type of instruction, it is then copied to a scratch
location, possibly in a modified form. The copy_* set of functions
performs such modification, as necessary. A breakpoint is placed after
the modified instruction in the scratch space to return control to GDB.
Note in particular that instructions which modify the PC will no longer
do so after modification.
arm_process_displaced_insn. Depending on the type of instruction, it is
then copied to a scratch location, possibly in a modified form. The
copy_* set of functions performs such modification, as necessary. A
breakpoint is placed after the modified instruction in the scratch space
to return control to GDB. Note in particular that instructions which
modify the PC will no longer do so after modification.
2. The instruction is single-stepped, by setting the PC to the scratch
location address, and resuming. Control returns to GDB when the
@ -7601,22 +7600,6 @@ arm_displaced_init_closure (struct gdbarch *gdbarch, CORE_ADDR from,
paddress (gdbarch, from), paddress (gdbarch, to));
}
/* Entry point for copying an instruction into scratch space for displaced
stepping. */
struct displaced_step_closure *
arm_displaced_step_copy_insn (struct gdbarch *gdbarch,
CORE_ADDR from, CORE_ADDR to,
struct regcache *regs)
{
struct displaced_step_closure *dsc = XNEW (struct displaced_step_closure);
arm_process_displaced_insn (gdbarch, from, to, regs, dsc);
arm_displaced_init_closure (gdbarch, from, to, dsc);
return dsc;
}
/* Entry point for cleaning things up after a displaced instruction has been
single-stepped. */

View File

@ -265,9 +265,6 @@ int arm_software_single_step (struct frame_info *);
int arm_is_thumb (struct regcache *regcache);
int arm_frame_is_thumb (struct frame_info *frame);
extern struct displaced_step_closure *
arm_displaced_step_copy_insn (struct gdbarch *, CORE_ADDR, CORE_ADDR,
struct regcache *);
extern void arm_displaced_step_fixup (struct gdbarch *,
struct displaced_step_closure *,
CORE_ADDR, CORE_ADDR, struct regcache *);