+2020-10-29 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * gdbarch.sh (displaced_step_hw_singlestep): Remove closure
+ parameter.
+ * aarch64-tdep.c (aarch64_displaced_step_hw_singlestep):
+ Likewise.
+ * aarch64-tdep.h (aarch64_displaced_step_hw_singlestep):
+ Likewise.
+ * arch-utils.c (default_displaced_step_hw_singlestep):
+ Likewise.
+ * arch-utils.h (default_displaced_step_hw_singlestep):
+ Likewise.
+ * rs6000-tdep.c (ppc_displaced_step_hw_singlestep):
+ Likewise.
+ * s390-tdep.c (s390_displaced_step_hw_singlestep):
+ Likewise.
+ * gdbarch.c: Re-generate.
+ * gdbarch.h: Re-generate.
+ * infrun.c (resume_1): Adjust.
+
2020-10-29 Tom Tromey <tom@tromey.com>
* progspace.c (program_space::~program_space): Don't call
/* Implement the "displaced_step_hw_singlestep" gdbarch method. */
bool
-aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
- struct displaced_step_closure *closure)
+aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
{
return true;
}
CORE_ADDR from, CORE_ADDR to,
struct regcache *regs);
-bool aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
- displaced_step_closure *closure);
+bool aarch64_displaced_step_hw_singlestep (struct gdbarch *gdbarch);
#endif /* aarch64-tdep.h */
#include "dis-asm.h"
bool
-default_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
- struct displaced_step_closure *closure)
+default_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
{
return !gdbarch_software_single_step_p (gdbarch);
}
BREAK_INSN_LITTLE, BREAK_INSN_BIG>
/* Default implementation of gdbarch_displaced_hw_singlestep. */
-extern bool
- default_displaced_step_hw_singlestep (struct gdbarch *,
- struct displaced_step_closure *);
+extern bool default_displaced_step_hw_singlestep (struct gdbarch *);
/* Possible value for gdbarch_displaced_step_location:
Place displaced instructions at the program's entry point,
}
bool
-gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure)
+gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
gdb_assert (gdbarch->displaced_step_hw_singlestep != NULL);
if (gdbarch_debug >= 2)
fprintf_unfiltered (gdb_stdlog, "gdbarch_displaced_step_hw_singlestep called\n");
- return gdbarch->displaced_step_hw_singlestep (gdbarch, closure);
+ return gdbarch->displaced_step_hw_singlestep (gdbarch);
}
void
The default implementation returns false on all targets that
provide a gdbarch_software_single_step routine, and true otherwise. */
-typedef bool (gdbarch_displaced_step_hw_singlestep_ftype) (struct gdbarch *gdbarch, struct displaced_step_closure *closure);
-extern bool gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, struct displaced_step_closure *closure);
+typedef bool (gdbarch_displaced_step_hw_singlestep_ftype) (struct gdbarch *gdbarch);
+extern bool gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch);
extern void set_gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch, gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep);
/* Fix up the state resulting from successfully single-stepping a
#
# The default implementation returns false on all targets that
# provide a gdbarch_software_single_step routine, and true otherwise.
-m;bool;displaced_step_hw_singlestep;struct displaced_step_closure *closure;closure;;default_displaced_step_hw_singlestep;;0
+m;bool;displaced_step_hw_singlestep;void;;;default_displaced_step_hw_singlestep;;0
# Fix up the state resulting from successfully single-stepping a
# displaced instruction, to give the result we would have gotten from
}
else if (prepared > 0)
{
- struct displaced_step_inferior_state *displaced;
-
/* Update pc to reflect the new address from which we will
execute instructions due to displaced stepping. */
pc = regcache_read_pc (get_thread_regcache (tp));
- displaced = get_displaced_stepping_state (tp->inf);
- step = gdbarch_displaced_step_hw_singlestep
- (gdbarch, displaced->step_closure.get ());
+ step = gdbarch_displaced_step_hw_singlestep (gdbarch);
}
}
/* Always use hardware single-stepping to execute the
displaced instruction. */
static bool
-ppc_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
- struct displaced_step_closure *closure)
+ppc_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
{
return true;
}
/* Implement displaced_step_hw_singlestep gdbarch method. */
static bool
-s390_displaced_step_hw_singlestep (struct gdbarch *gdbarch,
- struct displaced_step_closure *closure)
+s390_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
{
return true;
}