]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename gdbarch_software_single_step -> gdbarch_get_next_pcs
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 14 Aug 2025 20:14:17 +0000 (16:14 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Tue, 19 Aug 2025 13:47:36 +0000 (09:47 -0400)
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:
gdb/aarch64-tdep.c
gdb/alpha-netbsd-tdep.c
gdb/alpha-obsd-tdep.c
gdb/alpha-tdep.c
gdb/arc-linux-tdep.c
gdb/arch-utils.c
gdb/arm-fbsd-tdep.c
gdb/arm-linux-tdep.c
gdb/arm-netbsd-tdep.c
gdb/arm-obsd-tdep.c
gdb/arm-pikeos-tdep.c
gdb/arm-wince-tdep.c
gdb/breakpoint.c
gdb/cris-tdep.c
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/infrun.c
gdb/linux-nat.c
gdb/loongarch-tdep.c
gdb/mips-fbsd-tdep.c
gdb/mips-linux-tdep.c
gdb/mips-netbsd-tdep.c
gdb/moxie-tdep.c
gdb/or1k-linux-tdep.c
gdb/record-full.c
gdb/riscv-fbsd-tdep.c
gdb/riscv-linux-tdep.c
gdb/rs6000-aix-tdep.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sparc-sol2-tdep.c
gdb/sparc-tdep.c
gdb/sparc64-sol2-tdep.c
gdb/tic6x-tdep.c
gdb/z80-tdep.c

index f2e3ce2a36c0d01454c9b72c583cf3141eadb3dd..248aa3ab4daddcca399a9c2045e29f9458a300ce 100644 (file)
@@ -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);
index 0f5e3051cc20991dfd828bcc9c095232a4e4109f..56143eeedf7dc85ca8f53ccbd6c9cfbb4f422122 100644 (file)
@@ -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);
index 63f90506af18c618a443127ac9d44561aa11adf2..a84dfa82b8e350f979fc927425b4261787b82113 100644 (file)
@@ -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);
index d655c13b829393092ca171e24c448d90560b864a..59e01620ae6dfff5531c267ea7f5c91fa72b3be8 100644 (file)
@@ -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);
index edbb3f87a5e9200759c79f1b2a5253e76d0fa8da..6a4f4b13a2345d15d637afe0693cab8d9c0f2608 100644 (file)
@@ -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
index f320d3d736561c17fb4c1c39a521e8ce57f472fa..96fb2c4836e54cb4fb659d374d4420a34ab26e38 100644 (file)
@@ -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
index a37d8b76e1d82f8d7e8d3185808c0fd616866c9f..fc81818ac873688055db276b10aceeaf2c177a1a 100644 (file)
@@ -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)
index 08526d8e39ddb624e5291689279cdb26496d9209..cc10679a51c8dddfaca694f0ad14d8362866985e 100644 (file)
@@ -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);
index 82ba0c607a799a57a9b0eb0f993c838092e5a281..571d6f2f28d7b02497e1e7be6412c46a8e4f47d4 100644 (file)
@@ -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
index 00e4bfd0b5957637b6679af118629f9764b2ece7..8a48b95f201772ac4276bf23713bbe576b74109f 100644 (file)
@@ -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)
index 12fd9c34c348de1597d218b2f229c49458c40ad2..8d24342aeefec42323fccef0819ed448103ff11e 100644 (file)
@@ -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).
index b9ea59c738f2162ec7fffedc0d0de81cabe218f5..f14c8e8d1f86300839ddcc5ea31d372906f77758 100644 (file)
@@ -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);
index d704ad1e3e2001c2fedab92ec7d46756ad1db7c6..460934299a82e273dcf81acba63f05e36a84c421 100644 (file)
@@ -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 ())
     {
index b49e641fa78028c179ad2c05562a0361bac19c1a..9cfc1ebd6fb3d27b50efd11f892edaba855834e3 100644 (file)
@@ -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:
index fc570d37a8dc1913ba9990881a059db05edbd9b2..8f7d3596309b29abd11c8b21d27e892520193a0a 100644 (file)
@@ -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
index 281b97b7aa8ce00a350e18fc83d1b92e8da8c5b4..148abfab2012a47490bf6c2024a7dbc3fcdd70ee 100644 (file)
@@ -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);
index 91c867e69bfb0e1b5023771840b24965e2720355..ae9e14a024f4d2b6d6a64201ac7484f672a0138f 100644 (file)
@@ -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",
index 9d3e1b7782e4ddf84089156e910f77c6396586a4..051236e24e71aa7192b30c075a68a1a88091fa86 100644 (file)
@@ -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;
index f3179279d92f3a85845ec104130713186a33a95f..c3c5ddf4e40be5cfa7f09f2f68f553228c25e715 100644 (file)
@@ -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;
 
index cc75cd4a3d301fbbe014d33b171a8d4fdd3c941e..3bf47d2c6d28f1b92bdb60d8c4b59b7e71b880f1 100644 (file)
@@ -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);
index c1b5f9c20bc5af95ab84136d200e9b21d5bcc49b..879058c0c8d33ce136ade200e390d23b21ae5ff5 100644 (file)
@@ -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)
     {
index e4fa2438a9fc1909623751977c443553356b28c2..08dbd689090273ce2c14ac868d942b769dea2473 100644 (file)
@@ -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,
index 42eb515bc212b85bd9dd1f115c9caf17d3088e7d..e72ed7b1f17eea0f5aade948f805bd2e27f7ff13 100644 (file)
@@ -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
index 22394066b90f2aedf9c47eb943d1b2e01f74f8c7..bb4887799bd33c73881cc00eec43e8e2f7e5a159 100644 (file)
@@ -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);
index afefefe9c0e99fa6a1f44118352f36c22479d5d3..9fbf75feeaf9be4b3d958c2b17012b128d7f8c0e 100644 (file)
@@ -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,
index 7e3da277998e36126a4e3903084515f15bb22be6..c55e3b9180d873a08bdc80af4e0dccad08d96e17 100644 (file)
@@ -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.  */
index 7bdc6e75ccb237038a296ed87991d23e3d4157ba..7999bd3f3e197e1294c604652831c58eb140bd47 100644 (file)
@@ -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
index e5d77e7f208069b9e9562cbcce14f88b7954f2d2..982273a0b9da3877437321063e43d3d5980d7974 100644 (file)
@@ -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
index 853a66e65054a4ac004ca879dabc3b33ed25c31b..6322bbc62cfd4ed586fc2bf2ecd08e49dc760de7 100644 (file)
@@ -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
index 1c75bb76fa1296c15ce5519ea6e7fa0946ee80cf..75079b9e211ce007c2f9732c763b7aab93d4f850 100644 (file)
@@ -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);
index 8a2b405b8b4facc0c23c9402c2391a428014ca7e..c5fa24eb23141f1eff813f03ec93fd211e775588 100644 (file)
@@ -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.  */
index 337b9293dd952f047010235be553884a72a547a5..8de7439e493256770ab5dd77e40a72887ada366a 100644 (file)
@@ -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);
 }
index 4a1251625253276bcd149878d803c1ae306878a5..914a568c98b94be701e75c12d71254c8d450d6fe 100644 (file)
@@ -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);
index 6d091f58d32408032c93afeb29d704671ffc359f..cb3ba6ba5358b44a974aa77f26ab89a452f66c6c 100644 (file)
@@ -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)
index 2ab8dacbf61a011191bd50c08273a9ac6cb9f5b7..56d309871ea2764ea962e8a940100fd2aa31a019 100644 (file)
@@ -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);
index abba50b9ce6359a8d5d8aa5e5904faee17bfbc91..8f3924d5cad33e81243bda35a9b6ad836a464b9a 100644 (file)
@@ -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);