set_gdbarch_sw_breakpoint_from_kind (gdbarch,
aarch64_breakpoint::bp_from_kind);
set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
- set_gdbarch_software_single_step (gdbarch, aarch64_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, aarch64_software_single_step);
/* Information about registers, etc. */
set_gdbarch_sp_regnum (gdbarch, AARCH64_SP_REGNUM);
/* NetBSD/alpha does not provide single step support via ptrace(2); we
must use software single-stepping. */
- set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, alpha_software_single_step);
/* NetBSD/alpha has SVR4-style shared libraries. */
set_solib_svr4_ops (gdbarch, make_svr4_lp64_solib_ops);
/* OpenBSD/alpha 3.0 and earlier does not provide single step
support via ptrace(2); use software single-stepping for now. */
- set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, alpha_software_single_step);
/* OpenBSD/alpha has SVR4-style shared libraries. */
set_solib_svr4_ops (gdbarch, make_svr4_lp64_solib_ops);
set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
/* Handles single stepping of atomic sequences. */
- set_gdbarch_software_single_step (gdbarch, alpha_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, alpha_software_single_step);
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);
arc_linux_sw_breakpoint_from_kind);
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);
- set_gdbarch_software_single_step (gdbarch, arc_linux_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, arc_linux_software_single_step);
set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
set_gdbarch_skip_solib_resolver (gdbarch, arc_linux_skip_solib_resolver);
set_gdbarch_iterate_over_regset_sections
bool
default_displaced_step_hw_singlestep (struct gdbarch *gdbarch)
{
- return !gdbarch_software_single_step_p (gdbarch);
+ return !gdbarch_get_next_pcs_p (gdbarch);
}
CORE_ADDR
}
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, arm_software_single_step);
}
INIT_GDB_FILE (arm_fbsd_tdep)
set_solib_svr4_ops (gdbarch, make_linux_ilp32_svr4_solib_ops);
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, arm_linux_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, arm_linux_software_single_step);
/* Shared library handling. */
set_gdbarch_skip_trampoline_code (gdbarch, arm_linux_skip_trampoline_code);
set_gdbarch_iterate_over_regset_sections
(gdbarch, arm_nbsd_iterate_over_regset_sections);
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, arm_software_single_step);
}
static void
tdep->struct_return = pcc_struct_return;
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, arm_software_single_step);
/* Breakpoints. */
switch (info.byte_order)
arm_pikeos_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, arm_software_single_step);
}
/* The ARM PikeOS OSABI sniffer (see gdbarch_register_osabi_sniffer).
set_gdbarch_skip_trampoline_code (gdbarch, arm_pe_skip_trampoline_code);
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, arm_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, arm_software_single_step);
/* Skip call to __gccmain that gcc places in main. */
set_gdbarch_skip_main_prologue (gdbarch, arm_wince_skip_main_prologue);
insert_single_step_breakpoints (struct gdbarch *gdbarch)
{
regcache *regcache = get_thread_regcache (inferior_thread ());
- std::vector<CORE_ADDR> next_pcs;
-
- next_pcs = gdbarch_software_single_step (gdbarch, regcache);
+ std::vector<CORE_ADDR> next_pcs = gdbarch_get_next_pcs (gdbarch, regcache);
if (!next_pcs.empty ())
{
set_gdbarch_cannot_store_register (gdbarch, cris_cannot_store_register);
set_gdbarch_cannot_fetch_register (gdbarch, cris_cannot_fetch_register);
- set_gdbarch_software_single_step (gdbarch, cris_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, cris_software_single_step);
break;
case 32:
gdbarch_set_memtags_ftype *set_memtags = default_set_memtags;
gdbarch_get_memtag_ftype *get_memtag = default_get_memtag;
CORE_ADDR memtag_granule_size = 0;
- gdbarch_software_single_step_ftype *software_single_step = nullptr;
+ gdbarch_get_next_pcs_ftype *get_next_pcs = nullptr;
gdbarch_single_step_through_delay_ftype *single_step_through_delay = nullptr;
gdbarch_print_insn_ftype *print_insn = default_print_insn;
gdbarch_skip_trampoline_code_ftype *skip_trampoline_code = generic_skip_trampoline_code;
/* Skip verify of set_memtags, invalid_p == 0. */
/* Skip verify of get_memtag, invalid_p == 0. */
/* Skip verify of memtag_granule_size, invalid_p == 0. */
- /* Skip verify of software_single_step, has predicate. */
+ /* Skip verify of get_next_pcs, has predicate. */
/* Skip verify of single_step_through_delay, has predicate. */
/* Skip verify of print_insn, invalid_p == 0. */
/* Skip verify of skip_trampoline_code, invalid_p == 0. */
"gdbarch_dump: memtag_granule_size = %s\n",
core_addr_to_string_nz (gdbarch->memtag_granule_size));
gdb_printf (file,
- "gdbarch_dump: gdbarch_software_single_step_p() = %d\n",
- gdbarch_software_single_step_p (gdbarch));
+ "gdbarch_dump: gdbarch_get_next_pcs_p() = %d\n",
+ gdbarch_get_next_pcs_p (gdbarch));
gdb_printf (file,
- "gdbarch_dump: software_single_step = <%s>\n",
- host_address_to_string (gdbarch->software_single_step));
+ "gdbarch_dump: get_next_pcs = <%s>\n",
+ host_address_to_string (gdbarch->get_next_pcs));
gdb_printf (file,
"gdbarch_dump: gdbarch_single_step_through_delay_p() = %d\n",
gdbarch_single_step_through_delay_p (gdbarch));
}
bool
-gdbarch_software_single_step_p (struct gdbarch *gdbarch)
+gdbarch_get_next_pcs_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- return gdbarch->software_single_step != NULL;
+ return gdbarch->get_next_pcs != NULL;
}
std::vector<CORE_ADDR>
-gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache)
+gdbarch_get_next_pcs (struct gdbarch *gdbarch, struct regcache *regcache)
{
gdb_assert (gdbarch != NULL);
- gdb_assert (gdbarch->software_single_step != NULL);
+ gdb_assert (gdbarch->get_next_pcs != NULL);
if (gdbarch_debug >= 2)
- gdb_printf (gdb_stdlog, "gdbarch_software_single_step called\n");
- return gdbarch->software_single_step (regcache);
+ gdb_printf (gdb_stdlog, "gdbarch_get_next_pcs called\n");
+ return gdbarch->get_next_pcs (regcache);
}
void
-set_gdbarch_software_single_step (struct gdbarch *gdbarch,
- gdbarch_software_single_step_ftype software_single_step)
+set_gdbarch_get_next_pcs (struct gdbarch *gdbarch,
+ gdbarch_get_next_pcs_ftype get_next_pcs)
{
- gdbarch->software_single_step = software_single_step;
+ gdbarch->get_next_pcs = get_next_pcs;
}
bool
the condition is true, so that we ensure forward progress when stepping
past a conditional branch to self. */
-extern bool gdbarch_software_single_step_p (struct gdbarch *gdbarch);
+extern bool gdbarch_get_next_pcs_p (struct gdbarch *gdbarch);
-typedef std::vector<CORE_ADDR> (gdbarch_software_single_step_ftype) (struct regcache *regcache);
-extern std::vector<CORE_ADDR> gdbarch_software_single_step (struct gdbarch *gdbarch, struct regcache *regcache);
-extern void set_gdbarch_software_single_step (struct gdbarch *gdbarch, gdbarch_software_single_step_ftype *software_single_step);
+typedef std::vector<CORE_ADDR> (gdbarch_get_next_pcs_ftype) (struct regcache *regcache);
+extern std::vector<CORE_ADDR> gdbarch_get_next_pcs (struct gdbarch *gdbarch, struct regcache *regcache);
+extern void set_gdbarch_get_next_pcs (struct gdbarch *gdbarch, gdbarch_get_next_pcs_ftype *get_next_pcs);
/* Return non-zero if the processor is executing a delay slot and a
further single-step is needed before the instruction finishes. */
the displaced instruction buffer).
The default implementation returns false on all targets that provide a
- gdbarch_software_single_step routine, and true otherwise. */
+ gdbarch_get_next_pcs routine, and true otherwise. */
typedef bool (gdbarch_displaced_step_hw_singlestep_ftype) (struct gdbarch *gdbarch);
extern bool gdbarch_displaced_step_hw_singlestep (struct gdbarch *gdbarch);
past a conditional branch to self.
""",
type="std::vector<CORE_ADDR>",
- name="software_single_step",
+ name="get_next_pcs",
params=[("struct regcache *", "regcache")],
predicate=True,
)
the displaced instruction buffer).
The default implementation returns false on all targets that provide a
-gdbarch_software_single_step routine, and true otherwise.
+gdbarch_get_next_pcs routine, and true otherwise.
""",
type="bool",
name="displaced_step_hw_singlestep",
bool hw_step = true;
if (execution_direction == EXEC_FORWARD
- && gdbarch_software_single_step_p (gdbarch))
+ && gdbarch_get_next_pcs_p (gdbarch))
hw_step = !insert_single_step_breakpoints (gdbarch);
return hw_step;
/* Note that we consult the parent's architecture instead of
the child's because there's no inferior for the child at
this point. */
- if (!gdbarch_software_single_step_p (target_thread_architecture
- (parent_ptid)))
+ if (!gdbarch_get_next_pcs_p (target_thread_architecture
+ (parent_ptid)))
{
int status;
set_gdbarch_frame_align (gdbarch, loongarch_frame_align);
/* Breakpoint manipulation. */
- set_gdbarch_software_single_step (gdbarch, loongarch_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, loongarch_software_single_step);
set_gdbarch_breakpoint_kind_from_pc (gdbarch, loongarch_breakpoint::kind_from_pc);
set_gdbarch_sw_breakpoint_from_kind (gdbarch, loongarch_breakpoint::bp_from_kind);
set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
- set_gdbarch_software_single_step (gdbarch, mips_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, mips_software_single_step);
switch (abi)
{
set_gdbarch_skip_solib_resolver (gdbarch, mips_linux_skip_resolver);
- set_gdbarch_software_single_step (gdbarch, mips_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, mips_software_single_step);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
set_gdbarch_cannot_fetch_register (gdbarch, mipsnbsd_cannot_fetch_register);
set_gdbarch_cannot_store_register (gdbarch, mipsnbsd_cannot_store_register);
- set_gdbarch_software_single_step (gdbarch, mips_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, mips_software_single_step);
/* NetBSD/mips has SVR4-style shared libraries. */
set_solib_svr4_ops (gdbarch, (gdbarch_ptr_bit (gdbarch) == 32
frame_unwind_append_unwinder (gdbarch, &moxie_frame_unwind);
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, moxie_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, moxie_software_single_step);
/* Support simple overlay manager. */
set_gdbarch_overlay_update (gdbarch, simple_overlay_update);
/* GNU/Linux uses the dynamic linker included in the GNU C Library. */
set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
- set_gdbarch_software_single_step (gdbarch, or1k_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, or1k_software_single_step);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
if (!step)
{
/* This is not hard single step. */
- if (!gdbarch_software_single_step_p (gdbarch))
+ if (!gdbarch_get_next_pcs_p (gdbarch))
{
/* This is a normal continue. */
step = 1;
process_stratum_target *proc_target
= current_inferior ()->process_target ();
- if (gdbarch_software_single_step_p (gdbarch))
+ if (gdbarch_get_next_pcs_p (gdbarch))
{
/* Try to insert the software single step breakpoint.
If insert success, set step to 0. */
/* Generic FreeBSD support. */
fbsd_init_abi (info, gdbarch);
- set_gdbarch_software_single_step (gdbarch, riscv_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, riscv_software_single_step);
set_solib_svr4_ops (gdbarch, (riscv_isa_xlen (gdbarch) == 4
? make_svr4_ilp32_solib_ops
linux_init_abi (info, gdbarch, 0);
- set_gdbarch_software_single_step (gdbarch, riscv_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, riscv_software_single_step);
set_solib_svr4_ops (gdbarch, (riscv_isa_xlen (gdbarch) == 4
? make_linux_ilp32_svr4_solib_ops
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
/* RS6000/AIX does not support PT_STEP. Has to be simulated. */
- set_gdbarch_software_single_step (gdbarch, rs6000_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, rs6000_software_single_step);
/* Displaced stepping is currently not supported in combination with
software single-stepping. These override the values set by
set_gdbarch_sofun_address_maybe_missing (gdbarch, 1);
/* Handles single stepping of atomic sequences. */
- set_gdbarch_software_single_step (gdbarch, ppc_deal_with_atomic_sequence);
+ set_gdbarch_get_next_pcs (gdbarch, ppc_deal_with_atomic_sequence);
/* Not sure on this. FIXMEmgo */
set_gdbarch_frame_args_skip (gdbarch, 8);
s390_displaced_step_copy_insn);
set_gdbarch_displaced_step_fixup (gdbarch, s390_displaced_step_fixup);
set_gdbarch_displaced_step_hw_singlestep (gdbarch, s390_displaced_step_hw_singlestep);
- set_gdbarch_software_single_step (gdbarch, s390_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, s390_software_single_step);
set_gdbarch_max_insn_length (gdbarch, S390_MAX_INSTR_SIZE);
/* Prologue analysis. */
tdep->plt_entry_size = 12;
/* Solaris has kernel-assisted single-stepping support. */
- set_gdbarch_software_single_step (gdbarch, NULL);
+ set_gdbarch_get_next_pcs (gdbarch, NULL);
frame_unwind_append_unwinder (gdbarch, &sparc32_sol2_sigtramp_frame_unwind);
}
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_software_single_step (gdbarch, sparc_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, sparc_software_single_step);
set_gdbarch_write_pc (gdbarch, sparc_write_pc);
set_gdbarch_dummy_id (gdbarch, sparc_dummy_id);
tdep->plt_entry_size = 16;
/* Solaris has kernel-assisted single-stepping support. */
- set_gdbarch_software_single_step (gdbarch, NULL);
+ set_gdbarch_get_next_pcs (gdbarch, NULL);
}
INIT_GDB_FILE (sparc64_sol2_tdep)
dwarf2_frame_set_init_reg (gdbarch, tic6x_dwarf2_frame_init_reg);
/* Single stepping. */
- set_gdbarch_software_single_step (gdbarch, tic6x_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, tic6x_software_single_step);
/* Call dummy code. */
set_gdbarch_frame_align (gdbarch, tic6x_frame_align);
set_gdbarch_skip_prologue (gdbarch, z80_skip_prologue);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan); // falling stack
- set_gdbarch_software_single_step (gdbarch, z80_software_single_step);
+ set_gdbarch_get_next_pcs (gdbarch, z80_software_single_step);
set_gdbarch_breakpoint_kind_from_pc (gdbarch, z80_breakpoint_kind_from_pc);
set_gdbarch_sw_breakpoint_from_kind (gdbarch, z80_sw_breakpoint_from_kind);
set_gdbarch_insn_is_call (gdbarch, z80_insn_is_call);