From patchwork Mon Jan 29 16:46:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 84872 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6496B3857C50 for ; Mon, 29 Jan 2024 16:47:08 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by sourceware.org (Postfix) with ESMTPS id D786F38582B9 for ; Mon, 29 Jan 2024 16:46:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D786F38582B9 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D786F38582B9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706546798; cv=none; b=VD14mPyhx90HEK5ZIrFAYk7F90FZRljTke2um5L+w4m6XZLBtxnKUJn6hE0rnyvIAGivg1dkU8aF+wmZQWNvI1GNGv2s7lvr/GPTh6ZE2xcN36TgqE3WF8TvMjc2k8oAxU5uIwqyTlCNSoWIxBe27Deprk4h52oTGonP8JS+u9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706546798; c=relaxed/simple; bh=444faDlekDy9wp0kHWKxdHVI5pYlRBNmFT57iQ8Fk6s=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=r8QPzwfkjYAUgxWHwXHymceQ3I+jlHVIMVyeRfosbeVlJ/9WkDz/tu/3dsfA9WJ9hWeDtly5e14wFrRwIXEhXR1CMfJ6SVlTl5cY3WoFpIJUWCMQvw1l9ZL+mksrlkx8JNjxFKRUs5SwyPuR4SZiDiNrCSBcSfq6CNPims1xkD4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7bc32b04dc9so88940639f.2 for ; Mon, 29 Jan 2024 08:46:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1706546790; x=1707151590; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CM1mL0+temc+EuF4npTShaVnjO8H87Y6TKXJsk2ZEpc=; b=HAZxie64Kk3/D84ZS6fKhX/KZtii8BZb8pqmNym64UWcNdhLY2R8OpKkEkdxfYlfCw KSsg/5G0VTHEdJd7zLBU++x29xDKN+XRYbegipJcpQtzzKFzFLNwwGKH3t5UPxlbWiTx ATi3VmAIObGHLD1d+FWwhszm2ytVoUdD46W6xxfvSCQu+MtX4bkj/XHp4XWS8/Xj6JsH iFlwHtJYksWs70VA853SYCKChNou9oka55HhPN7IHriVIPwEJnLazTESowN7AbMEnUMg UkPEbeK4vlZ+4eR7ETuCGZ0fjDP86WP88JnIjN/hVI3YSt07+jV2c477sEBmQbl62WiO y9Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706546790; x=1707151590; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CM1mL0+temc+EuF4npTShaVnjO8H87Y6TKXJsk2ZEpc=; b=UgmN5iusuq+cBNcB6VVZj7wt5w04f8JmIIeC/WqQgrQIV4b90U6TalMtx0UwJj5HQN p5KxAcYdEbSnTLuU0RoA/AmC3WjjZXcMun7obP6lrY8EkNa+zYrvhZiQfx3a1a+4zO/H rEWwJHuL0LqJXSF2e0+AWz5Z9d1HM00HRqL+1Nvh+oVq72zqag1MmWWMDtbzO8X9BTC0 /qlGyxKDLtdVfo0T+HfsGpquBWyHRNAhSzNQsd6QGXTUdj9HpFKI1cllxMAzsfAUMOo9 qohJ8pfiUqbCwdrsZR6pMT0dSkIIomm8yCLnqQk8LCj+qL/rQ3q6RsYk8Kq4OaieQYxD 23Bw== X-Gm-Message-State: AOJu0YyLIq3fMUDTQNUFTmK/SrL4LaCF+6gId8dsMcUnypXxy4u3JJDH KKf/+arQysg2S2gAIADaW3K0TkjPX8rNLYVggiGRaI6Uh2/bWGGUWpRUI4UQ6GSrDiZ4IIBKq1w = X-Google-Smtp-Source: AGHT+IGpk2YVdbCFg+GXuXs/gFVtjuiG/ZBg5J6wLkkYJwKjPzMLhof6R1skYqrin0JVrjJYuTrFag== X-Received: by 2002:a5e:de0d:0:b0:7bf:f4bc:45fd with SMTP id e13-20020a5ede0d000000b007bff4bc45fdmr2638531iok.16.1706546789984; Mon, 29 Jan 2024 08:46:29 -0800 (PST) Received: from localhost.localdomain (97-122-68-157.hlrn.qwest.net. [97.122.68.157]) by smtp.gmail.com with ESMTPSA id e38-20020a028629000000b0046ea72f2152sm1904779jai.47.2024.01.29.08.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 08:46:29 -0800 (PST) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Rename SEARCH_ALL Date: Mon, 29 Jan 2024 09:46:22 -0700 Message-ID: <20240129164622.628652-1-tromey@adacore.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org 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); } 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