]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: change gdbarch_cannot_step_breakpoint to bool
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 27 Feb 2026 20:05:10 +0000 (15:05 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 9 Mar 2026 17:15:46 +0000 (13:15 -0400)
Change-Id: Ib8effd7eb66c1af9f4ef021fabc8be3cc2de660f
Approved-By: Tom Tromey <tom@tromey.com>
gdb/alpha-tdep.c
gdb/arc-tdep.c
gdb/gdbarch-gen.c
gdb/gdbarch-gen.h
gdb/gdbarch_components.py

index 759f319051214808179f0651467ea05159b369f8..82dd87a70c1fb9c3d08bd002ed9786a584756f7e 100644 (file)
@@ -1791,7 +1791,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_sw_breakpoint_from_kind (gdbarch,
                                       alpha_breakpoint::bp_from_kind);
   set_gdbarch_decr_pc_after_break (gdbarch, ALPHA_INSN_SIZE);
-  set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
+  set_gdbarch_cannot_step_breakpoint (gdbarch, true);
 
   /* Handles single stepping of atomic sequences.  */
   set_gdbarch_get_next_pcs (gdbarch, alpha_software_single_step);
index 9b397514df35a1b0b169d86d9c6b857c0baf9b5c..d1c1998bce8ca6ab0a4759338743bd84b11413e5 100644 (file)
@@ -2326,7 +2326,7 @@ arc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_print_insn (gdbarch, arc_delayed_print_insn);
 
-  set_gdbarch_cannot_step_breakpoint (gdbarch, 1);
+  set_gdbarch_cannot_step_breakpoint (gdbarch, true);
 
   /* "nonsteppable" watchpoint means that watchpoint triggers before
      instruction is committed, therefore it is required to remove watchpoint
index 1239e8e6daaf1d0b1cc8357abf39d50ad9c394b3..97a04979abebc4f05dd4fe9c9fbe4b1d279fc5c4 100644 (file)
@@ -161,7 +161,7 @@ struct gdbarch
   gdbarch_make_symbol_special_ftype *make_symbol_special = default_make_symbol_special;
   gdbarch_adjust_dwarf2_addr_ftype *adjust_dwarf2_addr = default_adjust_dwarf2_addr;
   gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line = default_adjust_dwarf2_line;
-  int cannot_step_breakpoint = 0;
+  bool cannot_step_breakpoint = false;
   int have_nonsteppable_watchpoint = 0;
   gdbarch_address_class_type_flags_ftype *address_class_type_flags = nullptr;
   gdbarch_address_class_type_flags_to_name_ftype *address_class_type_flags_to_name = nullptr;
@@ -3461,7 +3461,7 @@ set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch,
   gdbarch->adjust_dwarf2_line = adjust_dwarf2_line;
 }
 
-int
+bool
 gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
@@ -3473,7 +3473,7 @@ gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch)
 
 void
 set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch,
-                                   int cannot_step_breakpoint)
+                                   bool cannot_step_breakpoint)
 {
   gdbarch->cannot_step_breakpoint = cannot_step_breakpoint;
 }
index 89f15a7a31ac65d80eb26f4b047c3e7551cdaec8..941477f08a350013ec137953333bb485075e5a88 100644 (file)
@@ -887,8 +887,8 @@ typedef CORE_ADDR (gdbarch_adjust_dwarf2_line_ftype) (CORE_ADDR addr, int rel);
 extern CORE_ADDR gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, CORE_ADDR addr, int rel);
 extern void set_gdbarch_adjust_dwarf2_line (struct gdbarch *gdbarch, gdbarch_adjust_dwarf2_line_ftype *adjust_dwarf2_line);
 
-extern int gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
-extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, int cannot_step_breakpoint);
+extern bool gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch);
+extern void set_gdbarch_cannot_step_breakpoint (struct gdbarch *gdbarch, bool cannot_step_breakpoint);
 
 /* See comment in target.h about continuable, steppable and
    non-steppable watchpoints. */
index ef3603504f8b0e911b3712d3d69f0bbcd43948fb..d326012c3a58a01bb31193b19d00abdfab7fd313 100644 (file)
@@ -1526,9 +1526,9 @@ stop PC.
 )
 
 Value(
-    type="int",
+    type="bool",
     name="cannot_step_breakpoint",
-    predefault="0",
+    predefault="false",
     invalid=False,
 )