return false;
}
-void
-default_skip_permanent_breakpoint (struct regcache *regcache)
-{
- struct gdbarch *gdbarch = regcache->arch ();
- CORE_ADDR current_pc = regcache_read_pc (regcache);
- int bp_len;
-
- gdbarch_breakpoint_from_pc (gdbarch, ¤t_pc, &bp_len);
- current_pc += bp_len;
- regcache_write_pc (regcache, current_pc);
-}
-
CORE_ADDR
default_infcall_mmap (CORE_ADDR size, unsigned prot)
{
extern int default_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range);
-/* Default way to advance the PC to the next instruction in order to
- skip a permanent breakpoint. Increments the PC by the size of a
- software breakpoint instruction, as determined with
- gdbarch_breakpoint_from_pc. This matches how the breakpoints
- module determines whether a breakpoint is permanent. */
-extern void default_skip_permanent_breakpoint (struct regcache *regcache);
-
/* Symbols for gdbarch_infcall_mmap; their Linux PROT_* system
definitions would be dependent on compilation host. */
#define GDB_MMAP_PROT_READ 0x1 /* Page can be read. */
- When continuing from a location with an ordinary breakpoint, we
actually single step once before calling insert_breakpoints.
- When continuing from a location with a permanent breakpoint, we
- need to use the `SKIP_PERMANENT_BREAKPOINT' macro, provided by
- the target, to advance the PC past the breakpoint. */
+ advance the PC past the breakpoint manually. */
enum breakpoint_here
breakpoint_here_p (const address_space *aspace, CORE_ADDR pc)
/* True if this is a permanent breakpoint. There is a breakpoint
instruction hard-wired into the target's code. Don't try to
write another breakpoint instruction on top of it, or restore its
- value. Step over it using the architecture's
- gdbarch_skip_permanent_breakpoint method. */
+ value. Step over it. */
bool permanent = false;
/* True if this is not the first breakpoint in the list
const char * gcore_bfd_target = 0;
int vtable_function_descriptors = 0;
int vbit_in_delta = 0;
- gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint = default_skip_permanent_breakpoint;
ULONGEST max_insn_length = 0;
gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn = nullptr;
gdbarch_displaced_step_hw_singlestep_ftype *displaced_step_hw_singlestep = default_displaced_step_hw_singlestep;
/* Skip verify of gcore_bfd_target, has predicate. */
/* Skip verify of vtable_function_descriptors, invalid_p == 0. */
/* Skip verify of vbit_in_delta, invalid_p == 0. */
- /* Skip verify of skip_permanent_breakpoint, invalid_p == 0. */
/* Skip verify of max_insn_length, has predicate. */
/* Skip verify of displaced_step_copy_insn, invalid_p == 0. */
/* Skip verify of displaced_step_hw_singlestep, invalid_p == 0. */
gdb_printf (file,
"gdbarch_dump: vbit_in_delta = %s\n",
plongest (gdbarch->vbit_in_delta));
- gdb_printf (file,
- "gdbarch_dump: skip_permanent_breakpoint = <%s>\n",
- host_address_to_string (gdbarch->skip_permanent_breakpoint));
gdb_printf (file,
"gdbarch_dump: gdbarch_max_insn_length_p() = %d\n",
gdbarch_max_insn_length_p (gdbarch));
gdbarch->vbit_in_delta = vbit_in_delta;
}
-void
-gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache)
-{
- gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->skip_permanent_breakpoint != NULL);
- if (gdbarch_debug >= 2)
- gdb_printf (gdb_stdlog, "gdbarch_skip_permanent_breakpoint called\n");
- gdbarch->skip_permanent_breakpoint (regcache);
-}
-
-void
-set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch,
- gdbarch_skip_permanent_breakpoint_ftype skip_permanent_breakpoint)
-{
- gdbarch->skip_permanent_breakpoint = skip_permanent_breakpoint;
-}
-
bool
gdbarch_max_insn_length_p (struct gdbarch *gdbarch)
{
extern int gdbarch_vbit_in_delta (struct gdbarch *gdbarch);
extern void set_gdbarch_vbit_in_delta (struct gdbarch *gdbarch, int vbit_in_delta);
-/* Advance PC to next instruction in order to skip a permanent breakpoint. */
-
-typedef void (gdbarch_skip_permanent_breakpoint_ftype) (struct regcache *regcache);
-extern void gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, struct regcache *regcache);
-extern void set_gdbarch_skip_permanent_breakpoint (struct gdbarch *gdbarch, gdbarch_skip_permanent_breakpoint_ftype *skip_permanent_breakpoint);
-
/* The maximum length of an instruction on this architecture in bytes. */
extern bool gdbarch_max_insn_length_p (struct gdbarch *gdbarch);
invalid=False,
)
-Function(
- comment="""
-Advance PC to next instruction in order to skip a permanent breakpoint.
-""",
- type="void",
- name="skip_permanent_breakpoint",
- params=[("struct regcache *", "regcache")],
- predefault="default_skip_permanent_breakpoint",
- invalid=False,
-)
-
Value(
comment="""
The maximum length of an instruction on this architecture in bytes.
/* There's no signal to pass, we can go ahead and skip the
permanent breakpoint manually. */
infrun_debug_printf ("skipping permanent breakpoint");
- gdbarch_skip_permanent_breakpoint (gdbarch, regcache);
- /* Update pc to reflect the new address from which we will
- execute instructions. */
pc = regcache_read_pc (regcache);
+ int bp_len;
+ gdbarch_breakpoint_from_pc (gdbarch, &pc, &bp_len);
+ pc += bp_len;
+ regcache_write_pc (regcache, pc);
if (step)
{