gdb: rename displaced_step_closure to displaced_step_copy_insn_closure

Since we're going to introduce other "displaced step" functions and
another kind of displaced step closure, make it clear that this is the
return type of the gdbarch_displaced_step_copy_insn function.

gdb/ChangeLog:

	* infrun.h (get_displaced_step_closure_by_addr): Rename to...
	(get_displaced_step_copy_insn_closure_by_addr): ... this.
	Update all users.
	(displaced_step_closure): Rename to...
	(displaced_step_copy_insn_closure): ... this.  Update all users.
	(displaced_step_closure_up): Rename to...
	(displaced_step_copy_insn_closure_up). ... this.  Update all
	users.
	(buf_displaced_step_closure): Rename to...
	(buf_displaced_step_copy_insn_closure): ... this.  Update all
	users.
	* infrun.c (get_displaced_step_closure_by_addr): Rename to...
	(get_displaced_step_copy_insn_closure_by_addr): ... this.
	Update all users.
	* aarch64-tdep.c (aarch64_displaced_step_closure): Rename to...
	(aarch64_displaced_step_copy_insn_closure): ... this.  Update
	all users.
	* amd64-tdep.c (amd64_displaced_step_closure): Rename to...
	(amd64_displaced_step_copy_insn_closure): ... this.  Update all
	users.
	* arm-tdep.h (arm_displaced_step_closure): Rename to...
	(arm_displaced_step_copy_insn_closure): ... this.  Update all
	users.
	* i386-tdep.h (i386_displaced_step_closure): Rename to...
	(i386_displaced_step_copy_insn_closure): ... this.  Update all
	users.
	* rs6000-tdep.c (ppc_displaced_step_closure): Rename to...
	(ppc_displaced_step_copy_insn_closure): ... this.  Update all
	users.
	* s390-tdep.c (s390_displaced_step_closure): Rename to...
	(s390_displaced_step_copy_insn_closure): ... this.  Update all
	users.
	* gdbarch.h: Re-generate.
	* gdbarch.c: Re-generate.

Change-Id: I11f56dbcd4c3532fb195a08ba93bccf1d12a03c8
This commit is contained in:
Simon Marchi
2020-12-04 16:43:53 -05:00
parent 28d5518b12
commit 1152d984bb
18 changed files with 243 additions and 192 deletions

View File

@@ -946,7 +946,7 @@ arm_linux_software_single_step (struct regcache *regcache)
static void
arm_linux_cleanup_svc (struct gdbarch *gdbarch,
struct regcache *regs,
arm_displaced_step_closure *dsc)
arm_displaced_step_copy_insn_closure *dsc)
{
ULONGEST apparent_pc;
int within_scratch;
@@ -970,7 +970,7 @@ arm_linux_cleanup_svc (struct gdbarch *gdbarch,
static int
arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs,
arm_displaced_step_closure *dsc)
arm_displaced_step_copy_insn_closure *dsc)
{
CORE_ADDR return_to = 0;
@@ -1056,7 +1056,7 @@ arm_linux_copy_svc (struct gdbarch *gdbarch, struct regcache *regs,
static void
cleanup_kernel_helper_return (struct gdbarch *gdbarch,
struct regcache *regs,
arm_displaced_step_closure *dsc)
arm_displaced_step_copy_insn_closure *dsc)
{
displaced_write_reg (regs, dsc, ARM_LR_REGNUM, dsc->tmp[0], CANNOT_WRITE_PC);
displaced_write_reg (regs, dsc, ARM_PC_REGNUM, dsc->tmp[0], BRANCH_WRITE_PC);
@@ -1065,7 +1065,7 @@ cleanup_kernel_helper_return (struct gdbarch *gdbarch,
static void
arm_catch_kernel_helper_return (struct gdbarch *gdbarch, CORE_ADDR from,
CORE_ADDR to, struct regcache *regs,
arm_displaced_step_closure *dsc)
arm_displaced_step_copy_insn_closure *dsc)
{
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
@@ -1094,13 +1094,13 @@ arm_catch_kernel_helper_return (struct gdbarch *gdbarch, CORE_ADDR from,
the program has stepped into a Linux kernel helper routine (which must be
handled as a special case). */
static displaced_step_closure_up
static displaced_step_copy_insn_closure_up
arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
CORE_ADDR from, CORE_ADDR to,
struct regcache *regs)
{
std::unique_ptr<arm_displaced_step_closure> dsc
(new arm_displaced_step_closure);
std::unique_ptr<arm_displaced_step_copy_insn_closure> dsc
(new arm_displaced_step_copy_insn_closure);
/* Detect when we enter an (inaccessible by GDB) Linux kernel helper, and
stop at the return location. */
@@ -1122,7 +1122,7 @@ arm_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
arm_displaced_init_closure (gdbarch, from, to, dsc.get ());
/* This is a work around for a problem with g++ 4.8. */
return displaced_step_closure_up (dsc.release ());
return displaced_step_copy_insn_closure_up (dsc.release ());
}
/* Implementation of `gdbarch_stap_is_single_operand', as defined in