* [PATCH] Rename SEARCH_ALL
@ 2024-01-29 16:46 Tom Tromey
2024-02-01 12:44 ` Alexandra Petlanova Hajkova
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2024-01-29 16:46 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
The constant SEARCH_ALL conflicts with a define in a Windows header.
This patch renames the constant to SEARCH_ALL_DOMAINS to avoid the
conflict.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31307
---
gdb/ada-lang.c | 2 +-
gdb/compile/compile-cplus-symbols.c | 2 +-
gdb/python/py-symbol.c | 2 +-
gdb/symfile-debug.c | 4 ++--
gdb/symmisc.c | 2 +-
gdb/symtab.c | 2 +-
gdb/symtab.h | 4 ++--
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index f1d01ec7aa3..52bae581af6 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -13533,7 +13533,7 @@ class ada_language : public language_defn
NULL,
NULL,
SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
- SEARCH_ALL);
+ SEARCH_ALL_DOMAINS);
/* At this point scan through the misc symbol vectors and add each
symbol you find to the list. Eventually we want to ignore
diff --git a/gdb/compile/compile-cplus-symbols.c b/gdb/compile/compile-cplus-symbols.c
index 9d8e801ba3a..c4355b83c7f 100644
--- a/gdb/compile/compile-cplus-symbols.c
+++ b/gdb/compile/compile-cplus-symbols.c
@@ -368,7 +368,7 @@ gcc_cplus_convert_symbol (void *datum,
symbol_searcher searcher;
searcher.find_all_symbols (identifier, current_language,
- SEARCH_ALL, nullptr, nullptr);
+ SEARCH_ALL_DOMAINS, nullptr, nullptr);
/* Convert any found symbols. */
for (const auto &it : searcher.matching_symbols ())
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index db8df891b29..fd911d9c00e 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -600,7 +600,7 @@ gdbpy_lookup_static_symbols (PyObject *self, PyObject *args, PyObject *kw)
lookup_name_info lookup_name (name, symbol_name_match_type::FULL);
expand_symtabs_matching (NULL, lookup_name, NULL, NULL,
SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
- SEARCH_ALL);
+ SEARCH_ALL_DOMAINS);
for (objfile *objfile : current_program_space->objfiles ())
{
diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c
index 96cdfeeb7ed..36719fccabe 100644
--- a/gdb/symfile-debug.c
+++ b/gdb/symfile-debug.c
@@ -222,7 +222,7 @@ objfile::map_symtabs_matching_filename
on_expansion,
(SEARCH_GLOBAL_BLOCK
| SEARCH_STATIC_BLOCK),
- SEARCH_ALL))
+ SEARCH_ALL_DOMAINS))
{
retval = false;
break;
@@ -378,7 +378,7 @@ objfile::expand_symtabs_with_fullname (const char *fullname)
nullptr,
(SEARCH_GLOBAL_BLOCK
| SEARCH_STATIC_BLOCK),
- SEARCH_ALL);
+ SEARCH_ALL_DOMAINS);
}
bool
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 3659ac687b0..49b9674f77a 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -919,7 +919,7 @@ maintenance_expand_symtabs (const char *args, int from_tty)
NULL,
NULL,
SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
- SEARCH_ALL);
+ SEARCH_ALL_DOMAINS);
}
\f
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 517e843244b..78230a39086 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -5993,7 +5993,7 @@ default_collect_symbol_completion_matches_break_on
return true;
},
SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
- SEARCH_ALL);
+ SEARCH_ALL_DOMAINS);
/* Search upwards from currently selected frame (so that we can
complete on local vars). Also catch fields of types defined in
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 3029f60cb4b..492b0a2dc06 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -917,7 +917,7 @@ enum domain_search_flag
DEF_ENUM_FLAGS_TYPE (enum domain_search_flag, domain_search_flags);
/* A convenience constant to search for any symbol. */
-constexpr domain_search_flags SEARCH_ALL
+constexpr domain_search_flags SEARCH_ALL_DOMAINS
= ((domain_search_flags) 0
#define DOMAIN(X) | SEARCH_ ## X ## _DOMAIN
#include "sym-domains.def"
@@ -958,7 +958,7 @@ search_flags_matches (domain_search_flags flags, domain_enum domain)
/* The flag bit. */
constexpr int SCRIPTING_SEARCH_FLAG = 0x8000;
-static_assert (SCRIPTING_SEARCH_FLAG > SEARCH_ALL);
+static_assert (SCRIPTING_SEARCH_FLAG > SEARCH_ALL_DOMAINS);
/* Convert a domain constant to a "scripting domain". */
static constexpr inline int
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Rename SEARCH_ALL
2024-01-29 16:46 [PATCH] Rename SEARCH_ALL Tom Tromey
@ 2024-02-01 12:44 ` Alexandra Petlanova Hajkova
2024-02-01 14:10 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Alexandra Petlanova Hajkova @ 2024-02-01 12:44 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
On Mon, Jan 29, 2024 at 5:47 PM Tom Tromey <tromey@adacore.com> wrote:
> The constant SEARCH_ALL conflicts with a define in a Windows header.
> This patch renames the constant to SEARCH_ALL_DOMAINS to avoid the
> conflict.
>
> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31307
> ---
> gdb/ada-lang.c | 2 +-
> gdb/compile/compile-cplus-symbols.c | 2 +-
> gdb/python/py-symbol.c | 2 +-
> gdb/symfile-debug.c | 4 ++--
> gdb/symmisc.c | 2 +-
> gdb/symtab.c | 2 +-
> gdb/symtab.h | 4 ++--
> 7 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
> index f1d01ec7aa3..52bae581af6 100644
> --- a/gdb/ada-lang.c
> +++ b/gdb/ada-lang.c
> @@ -13533,7 +13533,7 @@ class ada_language : public language_defn
> NULL,
> NULL,
> SEARCH_GLOBAL_BLOCK | SEARCH_STATIC_BLOCK,
> - SEARCH_ALL);
> + SEARCH_ALL_DOMAINS);
>
>
I can confirm this change does not introduce any regressions for aarch64
Fedora Rawhide.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Rename SEARCH_ALL
2024-02-01 12:44 ` Alexandra Petlanova Hajkova
@ 2024-02-01 14:10 ` Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2024-02-01 14:10 UTC (permalink / raw)
To: Alexandra Petlanova Hajkova; +Cc: Tom Tromey, gdb-patches
>>>>> "Alexandra" == Alexandra Petlanova Hajkova <ahajkova@redhat.com> writes:
Alexandra> I can confirm this change does not introduce any regressions
Alexandra> for aarch64 Fedora Rawhide.
Thanks. I'm going to check it in.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-02-01 14:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-29 16:46 [PATCH] Rename SEARCH_ALL Tom Tromey
2024-02-01 12:44 ` Alexandra Petlanova Hajkova
2024-02-01 14:10 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).