]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove skip_permanent_breakpoint gdbarch hook
authorTom Tromey <tom@tromey.com>
Sun, 3 Nov 2024 22:08:33 +0000 (15:08 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 7 Feb 2026 14:56:28 +0000 (07:56 -0700)
The skip_permanent_breakpoint gdbarch hook has been obsolete since:

    commit 61a12cfa7b25746914493cc0d94e5053a8492aa5
    Author: Jan Kratochvil <jan.kratochvil@redhat.com>
    Date:   Fri Mar 13 20:24:22 2015 +0100

Remove HPUX

This patch removes it.

gdb/arch-utils.c
gdb/arch-utils.h
gdb/breakpoint.c
gdb/breakpoint.h
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py
gdb/infrun.c

index d9d1e494724101dcc3ee1685823e9ac4de0e83e1..c3ed8f07dc1195d6b431dd3d85c867e712d854ad 100644 (file)
@@ -950,18 +950,6 @@ default_program_breakpoint_here_p (struct gdbarch *gdbarch,
   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, &current_pc, &bp_len);
-  current_pc += bp_len;
-  regcache_write_pc (regcache, current_pc);
-}
-
 CORE_ADDR
 default_infcall_mmap (CORE_ADDR size, unsigned prot)
 {
index 61e83f0fd11dd68dc540334f7ee3569ac1bedd45..8930183e136d35e2b859e2e368d896ea124c5a1e 100644 (file)
@@ -335,13 +335,6 @@ extern bool default_program_breakpoint_here_p (struct gdbarch *gdbarch,
 
 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.  */
index da99ec27e19f02f90d13e5503c702876b29c6fe0..f8fa7bcb142069593969288f4fd335491d4bcbd5 100644 (file)
@@ -4443,8 +4443,7 @@ breakpoint_init_inferior (inferior *inf, inf_context context)
    - 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)
index 6b5dbcfe8a3c036e77b3a84d0c58045f911518b9..3e84f1c99abf1391364ca56e08f461beed739ce9 100644 (file)
@@ -406,8 +406,7 @@ public:
   /* 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
index 969ace4de6acec301b3c6d0ec793bf7f49f20f90..16292f54017cbf4a165c607f3dfc971bca4e8d43 100644 (file)
@@ -186,7 +186,6 @@ struct gdbarch
   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;
@@ -450,7 +449,6 @@ verify_gdbarch (struct gdbarch *gdbarch)
   /* 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.  */
@@ -1086,9 +1084,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
   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));
@@ -4026,23 +4021,6 @@ set_gdbarch_vbit_in_delta (struct gdbarch *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)
 {
index 04d5d187eddd881cd4385b7d9a9c7ff0e52f7d62..2cfb992499f67f78b1ab7b39eb4657df1f43ff87 100644 (file)
@@ -1068,12 +1068,6 @@ extern void set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, in
 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);
index a57ec01e2446fc30365a808374ee5ac6ae691e67..d3dc0d5870710ed1165a0f5418ba334b4438af58 100644 (file)
@@ -1803,17 +1803,6 @@ significant bit of the pfn for pointers to virtual member functions.
     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.
index 6bcd8ec5cc0f58f5fc9c03004d9d26f0c622c7ae..2abf35deeaf87f9bd308fd47000cd2cd9def4cc2 100644 (file)
@@ -2768,10 +2768,11 @@ resume_1 (enum gdb_signal sig)
          /* 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)
            {