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

index 9143bc13b7c7c5b99b49c41d0f469098cc77199b..8210d52e03d031d3efab19978d40063703deef01 100644 (file)
@@ -182,7 +182,7 @@ struct gdbarch
   gdbarch_core_xfer_siginfo_ftype *core_xfer_siginfo = nullptr;
   gdbarch_core_read_x86_xsave_layout_ftype *core_read_x86_xsave_layout = nullptr;
   const char * gcore_bfd_target = 0;
-  int vtable_function_descriptors = 0;
+  bool vtable_function_descriptors = false;
   int vbit_in_delta = 0;
   ULONGEST max_insn_length = 0;
   gdbarch_displaced_step_copy_insn_ftype *displaced_step_copy_insn = nullptr;
@@ -3917,7 +3917,7 @@ set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch,
   gdbarch->gcore_bfd_target = gcore_bfd_target;
 }
 
-int
+bool
 gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
@@ -3929,7 +3929,7 @@ gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch)
 
 void
 set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch,
-                                        int vtable_function_descriptors)
+                                        bool vtable_function_descriptors)
 {
   gdbarch->vtable_function_descriptors = vtable_function_descriptors;
 }
index 8844b6ee88dfae73bc3af62aca821762b96b3817..4146377566633191722f8e7bfc7be9e61ff862d1 100644 (file)
@@ -1053,10 +1053,10 @@ extern void set_gdbarch_gcore_bfd_target (struct gdbarch *gdbarch, const char *
 
 /* If the elements of C++ vtables are in-place function descriptors rather
    than normal function pointers (which may point to code or a descriptor),
-   set this to one. */
+   set this to true. */
 
-extern int gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch);
-extern void set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, int vtable_function_descriptors);
+extern bool gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch);
+extern void set_gdbarch_vtable_function_descriptors (struct gdbarch *gdbarch, bool vtable_function_descriptors);
 
 /* Set if the least significant bit of the delta is used instead of the least
    significant bit of the pfn for pointers to virtual member functions. */
index e26c58db4182d9ac7def0127f63c9237304b65b7..da982fb8259bb8e5fdcdc74e363274fa27157a50 100644 (file)
@@ -1779,11 +1779,11 @@ Value(
     comment="""
 If the elements of C++ vtables are in-place function descriptors rather
 than normal function pointers (which may point to code or a descriptor),
-set this to one.
+set this to true.
 """,
-    type="int",
+    type="bool",
     name="vtable_function_descriptors",
-    predefault="0",
+    predefault="false",
     invalid=False,
 )
 
index a07c3ea30ba72660cab16173718d9e03152c65e8..378823a43e3ebc6f2b6e8c9c2aa3018947a114a4 100644 (file)
@@ -4005,7 +4005,7 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   /* The virtual table contains 16-byte descriptors, not pointers to
      descriptors.  */
-  set_gdbarch_vtable_function_descriptors (gdbarch, 1);
+  set_gdbarch_vtable_function_descriptors (gdbarch, true);
 
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);