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

index bb20bd3d5782f855ace5768066581f3d82a07bce..2831226f44fe20149ee3ad0f75d20462414ea46e 100644 (file)
@@ -893,7 +893,7 @@ default_gen_return_address (struct gdbarch *gdbarch,
   error (_("This architecture has no method to collect a return address."));
 }
 
-int
+bool
 default_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
                                        struct type *type)
 {
index 91c4c220fd1d4a1dfe70c89ee44d27d1eb2ba97e..e3bbd540f37bb064ea0e18073beaa55e555dfa83 100644 (file)
@@ -319,8 +319,8 @@ extern void default_gen_return_address (struct gdbarch *gdbarch,
 
 extern const char *default_auto_wide_charset (void);
 
-extern int default_return_in_first_hidden_param_p (struct gdbarch *,
-                                                  struct type *);
+extern bool default_return_in_first_hidden_param_p (struct gdbarch *,
+                                                   struct type *);
 
 extern int default_insn_is_call (struct gdbarch *, CORE_ADDR);
 extern int default_insn_is_ret (struct gdbarch *, CORE_ADDR);
index 4d4e54783d2b4c55c364af88517806854bc707c4..26385e9a07b8bf3ecba56d6b65795faceb676349 100644 (file)
@@ -2575,7 +2575,7 @@ set_gdbarch_update_call_site_pc (struct gdbarch *gdbarch,
   gdbarch->update_call_site_pc = update_call_site_pc;
 }
 
-int
+bool
 gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type)
 {
   gdb_assert (gdbarch != NULL);
index 9f0c965a2f1746c0d15d3271097852156511c984..18ced1f0323329798e464887f28804c65b055087 100644 (file)
@@ -499,8 +499,8 @@ extern void set_gdbarch_update_call_site_pc (struct gdbarch *gdbarch, gdbarch_up
    implement it to a target-dependent feature.  So that we need such hook here
    to be aware of this in GDB. */
 
-typedef int (gdbarch_return_in_first_hidden_param_p_ftype) (struct gdbarch *gdbarch, struct type *type);
-extern int gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type);
+typedef bool (gdbarch_return_in_first_hidden_param_p_ftype) (struct gdbarch *gdbarch, struct type *type);
+extern bool gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, struct type *type);
 extern void set_gdbarch_return_in_first_hidden_param_p (struct gdbarch *gdbarch, gdbarch_return_in_first_hidden_param_p_ftype *return_in_first_hidden_param_p);
 
 typedef CORE_ADDR (gdbarch_skip_prologue_ftype) (struct gdbarch *gdbarch, CORE_ADDR ip);
index 9d84b2ca8c90cba504d8358605a3098684a4679e..3eb2930fd5d89a14fb3af98f49e1d4811033b2e8 100644 (file)
@@ -953,7 +953,7 @@ by language and its ABI, such as C++.  Unfortunately, compiler may
 implement it to a target-dependent feature.  So that we need such hook here
 to be aware of this in GDB.
 """,
-    type="int",
+    type="bool",
     name="return_in_first_hidden_param_p",
     params=[("struct type *", "type")],
     predefault="default_return_in_first_hidden_param_p",
index cd4e56edca0c5ba8042391f8e73aab1835f3a1e2..544b9cb39ed1399f212fd134a2dc761a6f1093a3 100644 (file)
@@ -1089,11 +1089,11 @@ m68k_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 /* This is the implementation of gdbarch method
    return_in_first_hidden_param_p.  */
 
-static int
+static bool
 m68k_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
                                     struct type *type)
 {
-  return 0;
+  return false;
 }
 
 /* System V Release 4 (SVR4).  */
index f67edc089826b0bf0d54b574c83ac306c055fe48..251d58ff76eb81bfa616735417516aa03fda4108 100644 (file)
@@ -2207,11 +2207,11 @@ sh_iterate_over_regset_sections (struct gdbarch *gdbarch,
 /* This is the implementation of gdbarch method
    return_in_first_hidden_param_p.  */
 
-static int
+static bool
 sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
                                     struct type *type)
 {
-  return 0;
+  return false;
 }
 
 \f
index 79ed5fa29926639df2ec14ceb967c1816018ab99..0fa66f4955371bb951bf50820a07bfb30f82d3bf 100644 (file)
@@ -1123,11 +1123,11 @@ tic6x_get_longjmp_target (const frame_info_ptr &frame, CORE_ADDR *pc)
 /* This is the implementation of gdbarch method
    return_in_first_hidden_param_p.  */
 
-static int
+static bool
 tic6x_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
                                      struct type *type)
 {
-  return 0;
+  return false;
 }
 
 static struct gdbarch *