aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.h
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-02-14 16:45:40 -0500
committerSimon Marchi <simon.marchi@efficios.com>2020-02-14 16:46:38 -0500
commitfdb61c6c395292a39e594981023b903bc21c6c36 (patch)
treea64cfd188ab715c02dc4b7ec4a027ffae5f90763 /gdb/gdbarch.h
parent1a627e7e6c61e97951932e3a9c5fb706efe3ef3e (diff)
downloadgdb-fdb61c6c395292a39e594981023b903bc21c6c36.zip
gdb-fdb61c6c395292a39e594981023b903bc21c6c36.tar.gz
gdb-fdb61c6c395292a39e594981023b903bc21c6c36.tar.bz2
gdb: introduce displaced_step_closure_up type alias
To help with readability, add the type displaced_step_closure_up, an alias for std::unique_ptr<displaced_step_closure>, and use it throughout the code base. gdb/ChangeLog: * aarch64-tdep.c (aarch64_displaced_step_copy_insn): Use displaced_step_closure_up. * aarch64-tdep.h (aarch64_displaced_step_copy_insn): Likewise. (struct displaced_step_closure_up): * amd64-tdep.c (amd64_displaced_step_copy_insn): Likewise. * amd64-tdep.h (amd64_displaced_step_copy_insn): Likewise. * arm-linux-tdep.c (arm_linux_displaced_step_copy_insn): Likewise. * gdbarch.sh (displaced_step_copy_insn): Likewise. * gdbarch.c, gdbarch.h: Re-generate. * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn): Use displaced_step_closure_up. * i386-tdep.c (i386_displaced_step_copy_insn): Likewise. * i386-tdep.h (i386_displaced_step_copy_insn): Likewise. * infrun.h (displaced_step_closure_up): New type alias. (struct displaced_step_inferior_state) <step_closure>: Change type to displaced_step_closure_up. * rs6000-tdep.c (ppc_displaced_step_copy_insn): Use displaced_step_closure_up. * s390-tdep.c (s390_displaced_step_copy_insn): Likewise.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r--gdb/gdbarch.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 8a3a071..0259fcd 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -39,6 +39,7 @@
#include "frame.h"
#include "dis-asm.h"
#include "gdb_obstack.h"
+#include "infrun.h"
struct floatformat;
struct ui_file;
@@ -55,7 +56,6 @@ struct obstack;
struct bp_target_info;
struct target_desc;
struct symbol;
-struct displaced_step_closure;
struct syscall;
struct agent_expr;
struct axs_value;
@@ -1036,8 +1036,8 @@ extern void set_gdbarch_max_insn_length (struct gdbarch *gdbarch, ULONGEST max_i
extern int gdbarch_displaced_step_copy_insn_p (struct gdbarch *gdbarch);
-typedef std::unique_ptr<displaced_step_closure> (gdbarch_displaced_step_copy_insn_ftype) (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs);
-extern std::unique_ptr<displaced_step_closure> gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs);
+typedef displaced_step_closure_up (gdbarch_displaced_step_copy_insn_ftype) (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs);
+extern displaced_step_closure_up gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs);
extern void set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn);
/* Return true if GDB should use hardware single-stepping to execute