aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-linux-tdep.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-12-04 16:43:53 -0500
committerSimon Marchi <simon.marchi@efficios.com>2020-12-04 16:43:53 -0500
commit1152d984bb1b66a9ff7d11f46583b6e0188b885b (patch)
treebbbec5cbcb2adcd996f94d248ccd63f688df2d02 /gdb/i386-linux-tdep.c
parent28d5518b12119eaf087c64fe25e31d2f49e53485 (diff)
downloadgdb-1152d984bb1b66a9ff7d11f46583b6e0188b885b.zip
gdb-1152d984bb1b66a9ff7d11f46583b6e0188b885b.tar.gz
gdb-1152d984bb1b66a9ff7d11f46583b6e0188b885b.tar.bz2
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
Diffstat (limited to 'gdb/i386-linux-tdep.c')
-rw-r--r--gdb/i386-linux-tdep.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index b9ec958..ab7d236 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -789,29 +789,30 @@ i386_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
PC should get relocated back to its vDSO address. Hide the 'ret'
instruction by 'nop' so that i386_displaced_step_fixup is not confused.
- It is not fully correct as the bytes in struct displaced_step_closure will
- not match the inferior code. But we would need some new flag in
- displaced_step_closure otherwise to keep the state that syscall is finishing
- for the later i386_displaced_step_fixup execution as the syscall execution
- is already no longer detectable there. The new flag field would mean
- i386-linux-tdep.c needs to wrap all the displacement methods of i386-tdep.c
- which does not seem worth it. The same effect is achieved by patching that
- 'nop' instruction there instead. */
-
-static displaced_step_closure_up
+ It is not fully correct as the bytes in struct
+ displaced_step_copy_insn_closure will not match the inferior code. But we
+ would need some new flag in displaced_step_copy_insn_closure otherwise to
+ keep the state that syscall is finishing for the later
+ i386_displaced_step_fixup execution as the syscall execution is already no
+ longer detectable there. The new flag field would mean i386-linux-tdep.c
+ needs to wrap all the displacement methods of i386-tdep.c which does not seem
+ worth it. The same effect is achieved by patching that 'nop' instruction
+ there instead. */
+
+static displaced_step_copy_insn_closure_up
i386_linux_displaced_step_copy_insn (struct gdbarch *gdbarch,
CORE_ADDR from, CORE_ADDR to,
struct regcache *regs)
{
- displaced_step_closure_up closure_
+ displaced_step_copy_insn_closure_up closure_
= i386_displaced_step_copy_insn (gdbarch, from, to, regs);
if (i386_linux_get_syscall_number_from_regcache (regs) != -1)
{
/* The closure returned by i386_displaced_step_copy_insn is simply a
buffer with a copy of the instruction. */
- i386_displaced_step_closure *closure
- = (i386_displaced_step_closure *) closure_.get ();
+ i386_displaced_step_copy_insn_closure *closure
+ = (i386_displaced_step_copy_insn_closure *) closure_.get ();
/* Fake nop. */
closure->buf[0] = 0x90;