[1/2] arm-tdep.c: Remove unused arm_displaced_step_copy_insn
Commit Message
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-tdep.h (arm_displaced_step_copy_insn): Remove.
---
gdb/arm-tdep.c | 16 ----------------
gdb/arm-tdep.h | 3 ---
2 files changed, 19 deletions(-)
Comments
Simon Marchi <simon.marchi@ericsson.com> writes:
> 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-tdep.h (arm_displaced_step_copy_insn): Remove.
arm_displaced_step_copy_insn is still referenced in the comments in
arm-linux-tdep.c,
/* 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. */
Can you remove it from the comments as well? These comments can be
simplified further like
/* Implement the "displaced_step_copy_insn" gdbarch method. */
OK with the change like this.
On 16-02-11 05:54 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> writes:
>
>> 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-tdep.h (arm_displaced_step_copy_insn): Remove.
>
> arm_displaced_step_copy_insn is still referenced in the comments in
> arm-linux-tdep.c,
>
> /* 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. */
>
> Can you remove it from the comments as well? These comments can be
> simplified further like
>
> /* Implement the "displaced_step_copy_insn" gdbarch method. */
>
> OK with the change like this.
>
Thanks, both patches pushed, with the change in this one.
@@ -7601,22 +7601,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. */
@@ -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 *);