[binutils-gdb] Return bool from ada-lang.c:is_known_support_routine

Tom Tromey via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=86602f6319d3d3612b8731d4645193388998afad

commit 86602f6319d3d3612b8731d4645193388998afad
Author: Tom Tromey <[email protected]>
Date:   Tue Mar 10 08:11:12 2026 -0600

    Return bool from ada-lang.c:is_known_support_routine
    
    This changes ada-lang.c:is_known_support_routine to return bool.
    
    Approved-By: Simon Marchi <[email protected]>

Diff:
---
 gdb/ada-lang.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 7565b036176..4f7b54388a6 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -11906,7 +11906,7 @@ ada_exception_support_info_sniffer (void)
    intended to be used as advice as to what frames are uninteresting
    to most users.  */
 
-static int
+static bool
 is_known_support_routine (const frame_info_ptr &frame)
 {
   enum language func_lang;
@@ -11918,7 +11918,7 @@ is_known_support_routine (const frame_info_ptr &frame)
 
   symtab_and_line sal = find_frame_sal (frame);
   if (sal.symtab == NULL)
-    return 1;
+    return true;
 
   /* If there is a symtab, but the associated source file cannot be
      located, then assume this is not user code:  Selecting a frame
@@ -11928,7 +11928,7 @@ is_known_support_routine (const frame_info_ptr &frame)
 
   fullname = symtab_to_fullname (sal.symtab);
   if (access (fullname, R_OK) != 0)
-    return 1;
+    return true;
 
   /* Check the unit filename against the Ada runtime file naming.
      We also check the name of the objfile against the name of some
@@ -11939,10 +11939,10 @@ is_known_support_routine (const frame_info_ptr &frame)
     {
       re_comp (known_runtime_file_name_patterns[i]);
       if (re_exec (lbasename (sal.symtab->filename ())))
-	return 1;
+	return true;
       if (sal.symtab->compunit ()->objfile () != NULL
 	  && re_exec (objfile_name (sal.symtab->compunit ()->objfile ())))
-	return 1;
+	return true;
     }
 
   /* Check whether the function is a GNAT-generated entity.  */
@@ -11950,16 +11950,16 @@ is_known_support_routine (const frame_info_ptr &frame)
   gdb::unique_xmalloc_ptr<char> func_name
     = find_frame_funname (frame, &func_lang, NULL);
   if (func_name == NULL)
-    return 1;
+    return true;
 
   for (i = 0; known_auxiliary_function_name_patterns[i] != NULL; i += 1)
     {
       re_comp (known_auxiliary_function_name_patterns[i]);
       if (re_exec (func_name.get ()))
-	return 1;
+	return true;
     }
 
-  return 0;
+  return false;
 }
 
 /* Find the first frame that contains debugging information and that is not
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.