Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 2/2] Use bool in map_matching_symbols
Date: Fri, 24 Apr 2026 08:50:27 -0600	[thread overview]
Message-ID: <20260424-ada-bool-again-v1-2-cb63db324fff@adacore.com> (raw)
In-Reply-To: <20260424-ada-bool-again-v1-0-cb63db324fff@adacore.com>

This changes ada-lang.c:map_matching_symbols to take a bool parameter,
then fixes up the callers.
---
 gdb/ada-lang.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index afdd59965fd..47433ccf6b7 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -5551,7 +5551,7 @@ static void
 map_matching_symbols (struct objfile *objfile,
 		      const lookup_name_info &lookup_name,
 		      domain_search_flags domain,
-		      int global,
+		      bool global,
 		      match_data &data)
 {
   data.objfile = objfile;
@@ -5579,7 +5579,7 @@ map_matching_symbols (struct objfile *objfile,
 static void
 add_nonlocal_symbols (std::vector<struct block_symbol> &result,
 		      const lookup_name_info &lookup_name,
-		      domain_search_flags domain, int global)
+		      domain_search_flags domain, bool global)
 {
   struct match_data data (&result);
 
@@ -5684,13 +5684,13 @@ ada_add_all_symbols (std::vector<struct block_symbol> &result,
 
   /* Search symbols from all global blocks.  */
 
-  add_nonlocal_symbols (result, lookup_name, domain, 1);
+  add_nonlocal_symbols (result, lookup_name, domain, true);
 
   /* Now add symbols from all per-file blocks if we've gotten no hits
      (not strictly correct, but perhaps better than an error).  */
 
   if (result.empty ())
-    add_nonlocal_symbols (result, lookup_name, domain, 0);
+    add_nonlocal_symbols (result, lookup_name, domain, false);
 }
 
 /* Find symbols in DOMAIN matching LOOKUP_NAME, in BLOCK and, if FULL_SEARCH

-- 
2.53.0


  parent reply	other threads:[~2026-04-24 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 14:50 [PATCH 0/2] More bool in ada-lang.c Tom Tromey
2026-04-24 14:50 ` [PATCH 1/2] Use bool in ada_add_all_symbols Tom Tromey
2026-05-08 12:50   ` Andrew Burgess
2026-05-08 13:53     ` Tom Tromey
2026-04-24 14:50 ` Tom Tromey [this message]
2026-05-08 13:10   ` [PATCH 2/2] Use bool in map_matching_symbols Andrew Burgess
2026-05-08 13:43     ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260424-ada-bool-again-v1-2-cb63db324fff@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox