diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2025-08-14 16:14:17 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2025-08-19 09:47:36 -0400 |
commit | 1d5f884e50590cc798fd33e9779f5d72c9d72f9c (patch) | |
tree | 89c0df8b28f0abdba6991b885a3da38f9d34ea16 | |
parent | 1bf1357c6827961386ef13462aed9d41221d5911 (diff) | |
download | binutils-1d5f884e50590cc798fd33e9779f5d72c9d72f9c.zip binutils-1d5f884e50590cc798fd33e9779f5d72c9d72f9c.tar.gz binutils-1d5f884e50590cc798fd33e9779f5d72c9d72f9c.tar.bz2 |
gdb: rename gdbarch_software_single_step -> gdbarch_get_next_pcs
I spotted this while reviewing a patch adding a new
gdbarch_software_single_step implementation. I find the name
"software_single_step" a bit misleading or unclear. It makes it sounds
as if the function executed a single step. In reality, this function
returns the possible next PCs for current instructions.
We have a similar concept in GDBserver:
linux_process_target::low_get_next_pcs. I like that name, it's clear
and straight to the point.
Rename gdbarch_software_single_step to gdbarch_get_next_pcs. I find
this name more indicative of what happens.
There is some code for ARM shared between GDB and GDBserver to implement
both sides, also called "get next pcs", so I think it all fits well
together.
Tested by rebuilding.
Change-Id: Ide74011a5034ba11117b7e7c865a093ef0b1dece
Approved-by: Kevin Buettner <kevinb@redhat.com>
Acked-by: Luis Machado <luis.machado.foss@gmail.com>
36 files changed, 57 insertions, 59 deletions
diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c index f2e3ce2..248aa3a 100644 --- a/gdb/aarch64-tdep.c +++ b/gdb/aarch64-tdep.c @@ -4638,7 +4638,7 @@ aarch64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/alpha-netbsd-tdep.c b/gdb/alpha-netbsd-tdep.c index 0f5e305..56143ee 100644 --- a/gdb/alpha-netbsd-tdep.c +++ b/gdb/alpha-netbsd-tdep.c @@ -261,7 +261,7 @@ alphanbsd_init_abi (struct gdbarch_info info, /* 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); diff --git a/gdb/alpha-obsd-tdep.c b/gdb/alpha-obsd-tdep.c index 63f9050..a84dfa8 100644 --- a/gdb/alpha-obsd-tdep.c +++ b/gdb/alpha-obsd-tdep.c @@ -106,7 +106,7 @@ alphaobsd_init_abi(struct gdbarch_info info, struct gdbarch *gdbarch) /* 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); diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index d655c13..59e0162 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -1797,7 +1797,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/arc-linux-tdep.c b/gdb/arc-linux-tdep.c index edbb3f8..6a4f4b1 100644 --- a/gdb/arc-linux-tdep.c +++ b/gdb/arc-linux-tdep.c @@ -728,7 +728,7 @@ arc_linux_init_osabi (struct gdbarch_info info, struct gdbarch *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 diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index f320d3d..96fb2c4 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -48,7 +48,7 @@ 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 diff --git a/gdb/arm-fbsd-tdep.c b/gdb/arm-fbsd-tdep.c index a37d8b7..fc81818 100644 --- a/gdb/arm-fbsd-tdep.c +++ b/gdb/arm-fbsd-tdep.c @@ -318,7 +318,7 @@ arm_fbsd_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); } INIT_GDB_FILE (arm_fbsd_tdep) diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 08526d8..cc10679 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -1805,7 +1805,7 @@ arm_linux_init_abi (struct gdbarch_info info, 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); diff --git a/gdb/arm-netbsd-tdep.c b/gdb/arm-netbsd-tdep.c index 82ba0c6..571d6f2 100644 --- a/gdb/arm-netbsd-tdep.c +++ b/gdb/arm-netbsd-tdep.c @@ -139,7 +139,7 @@ arm_netbsd_init_abi_common (struct gdbarch_info info, 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 diff --git a/gdb/arm-obsd-tdep.c b/gdb/arm-obsd-tdep.c index 00e4bfd..8a48b95 100644 --- a/gdb/arm-obsd-tdep.c +++ b/gdb/arm-obsd-tdep.c @@ -96,7 +96,7 @@ armobsd_init_abi (struct gdbarch_info info, 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) diff --git a/gdb/arm-pikeos-tdep.c b/gdb/arm-pikeos-tdep.c index 12fd9c3..8d24342 100644 --- a/gdb/arm-pikeos-tdep.c +++ b/gdb/arm-pikeos-tdep.c @@ -26,7 +26,7 @@ static void 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). diff --git a/gdb/arm-wince-tdep.c b/gdb/arm-wince-tdep.c index b9ea59c..f14c8e8 100644 --- a/gdb/arm-wince-tdep.c +++ b/gdb/arm-wince-tdep.c @@ -135,7 +135,7 @@ arm_wince_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) 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); diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index d704ad1..4609342 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -14004,9 +14004,7 @@ int 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 ()) { diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index b49e641..9cfc1eb 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -3993,7 +3993,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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: diff --git a/gdb/gdbarch-gen.c b/gdb/gdbarch-gen.c index fc570d3..8f7d359 100644 --- a/gdb/gdbarch-gen.c +++ b/gdb/gdbarch-gen.c @@ -153,7 +153,7 @@ struct gdbarch 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; @@ -421,7 +421,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* 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. */ @@ -948,11 +948,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "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)); @@ -3388,27 +3388,27 @@ set_gdbarch_memtag_granule_size (struct gdbarch *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 diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index 281b97b..148abfa 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -792,11 +792,11 @@ extern void set_gdbarch_memtag_granule_size (struct gdbarch *gdbarch, CORE_ADDR 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. */ @@ -1148,7 +1148,7 @@ extern void set_gdbarch_displaced_step_copy_insn (struct gdbarch *gdbarch, gdbar 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); diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index 91c867e..ae9e14a 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -1395,7 +1395,7 @@ the condition is true, so that we ensure forward progress when stepping 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, ) @@ -1891,7 +1891,7 @@ receive control again (e.g. by placing a software breakpoint instruction into 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", diff --git a/gdb/infrun.c b/gdb/infrun.c index 9d3e1b7..051236e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2370,7 +2370,7 @@ maybe_software_singlestep (struct gdbarch *gdbarch) 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; diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index f317927..c3c5ddf 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -549,8 +549,8 @@ linux_nat_target::follow_fork (inferior *child_inf, ptid_t child_ptid, /* 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; diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c index cc75cd4..3bf47d2 100644 --- a/gdb/loongarch-tdep.c +++ b/gdb/loongarch-tdep.c @@ -1895,7 +1895,7 @@ loongarch_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/mips-fbsd-tdep.c b/gdb/mips-fbsd-tdep.c index c1b5f9c..879058c 100644 --- a/gdb/mips-fbsd-tdep.c +++ b/gdb/mips-fbsd-tdep.c @@ -580,7 +580,7 @@ mips_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* 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) { diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c index e4fa243..08dbd68 100644 --- a/gdb/mips-linux-tdep.c +++ b/gdb/mips-linux-tdep.c @@ -1605,7 +1605,7 @@ mips_linux_init_abi (struct gdbarch_info info, 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, diff --git a/gdb/mips-netbsd-tdep.c b/gdb/mips-netbsd-tdep.c index 42eb515..e72ed7b 100644 --- a/gdb/mips-netbsd-tdep.c +++ b/gdb/mips-netbsd-tdep.c @@ -399,7 +399,7 @@ mipsnbsd_init_abi (struct gdbarch_info info, 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 diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c index 2239406..bb48877 100644 --- a/gdb/moxie-tdep.c +++ b/gdb/moxie-tdep.c @@ -1088,7 +1088,7 @@ moxie_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/or1k-linux-tdep.c b/gdb/or1k-linux-tdep.c index afefefe..9fbf75f 100644 --- a/gdb/or1k-linux-tdep.c +++ b/gdb/or1k-linux-tdep.c @@ -153,7 +153,7 @@ or1k_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* 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, diff --git a/gdb/record-full.c b/gdb/record-full.c index 7e3da27..c55e3b9 100644 --- a/gdb/record-full.c +++ b/gdb/record-full.c @@ -1091,7 +1091,7 @@ record_full_target::resume (ptid_t ptid, int step, enum gdb_signal signal) 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; @@ -1266,7 +1266,7 @@ record_full_wait_1 (struct target_ops *ops, 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. */ diff --git a/gdb/riscv-fbsd-tdep.c b/gdb/riscv-fbsd-tdep.c index 7bdc6e7..7999bd3 100644 --- a/gdb/riscv-fbsd-tdep.c +++ b/gdb/riscv-fbsd-tdep.c @@ -189,7 +189,7 @@ riscv_fbsd_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* 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 diff --git a/gdb/riscv-linux-tdep.c b/gdb/riscv-linux-tdep.c index e5d77e7..982273a 100644 --- a/gdb/riscv-linux-tdep.c +++ b/gdb/riscv-linux-tdep.c @@ -511,7 +511,7 @@ riscv_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) 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 diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c index 853a66e..6322bbc 100644 --- a/gdb/rs6000-aix-tdep.c +++ b/gdb/rs6000-aix-tdep.c @@ -1362,7 +1362,7 @@ rs6000_aix_init_osabi (struct gdbarch_info info, struct gdbarch *gdbarch) 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 diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 1c75bb7..75079b9 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -8458,7 +8458,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index 8a2b405..c5fa24e 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -7300,7 +7300,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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. */ diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c index 337b929..8de7439 100644 --- a/gdb/sparc-sol2-tdep.c +++ b/gdb/sparc-sol2-tdep.c @@ -214,7 +214,7 @@ sparc32_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) 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); } diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index 4a12516..914a568 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -1874,7 +1874,7 @@ sparc32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/sparc64-sol2-tdep.c b/gdb/sparc64-sol2-tdep.c index 6d091f5..cb3ba6b 100644 --- a/gdb/sparc64-sol2-tdep.c +++ b/gdb/sparc64-sol2-tdep.c @@ -221,7 +221,7 @@ sparc64_sol2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) 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) diff --git a/gdb/tic6x-tdep.c b/gdb/tic6x-tdep.c index 2ab8dac..56d3098 100644 --- a/gdb/tic6x-tdep.c +++ b/gdb/tic6x-tdep.c @@ -1267,7 +1267,7 @@ tic6x_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c index abba50b..8f3924d 100644 --- a/gdb/z80-tdep.c +++ b/gdb/z80-tdep.c @@ -1173,7 +1173,7 @@ z80_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); |