From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7A8783858D37 for ; Tue, 21 Nov 2023 21:09:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7A8783858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none 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 7A8783858D37 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=1700600972; cv=none; b=EKJSbQRIjvhALpLYDDC06frMAn24mImboNBOpu8LfSfxLcx1ZBCdF6Wpy/jEq9XLLFyd6chi508SiQW6WiRNjBpw7+y9iSG4BWA1Bt8SYME5ec2SoKANxkgWOYT+9lnqdI24UanOASnWa40fDrTdaAY/giIhnssNwjRyln7mYTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700600972; c=relaxed/simple; bh=iTCD4k7zDaagdowj4MFvUeE0CyE3SabJY44nAfdkeRQ=; h=DKIM-Signature:From:Date:Subject:MIME-Version:Message-Id:To; b=N/0VjHH1Ihm/IHJJBmBx8ISpjdJ5x/otvaYA+oM9VUKcBgh208M2RyWansVPVeE+VtQowTYULBfkvBJQOmOxEYvAZdag57KiKapsA7COXkKroWYBz6UJexYqKt6SL00tV00X6nQQTH2+l7RLmnbTcZziJD7P/b64L+yBf/dh7Bc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7b34ee2a243so25520139f.0 for ; Tue, 21 Nov 2023 13:09:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1700600968; x=1701205768; darn=sourceware.org; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SF092/ctRQcUj04zK5i0oCWlnTI/KuIBCZmhycRFKMQ=; b=EVL7ajUY5NmO3RulwZFHdzwUYL0kOdIKFqzN4fypW00kyHpIdZsAl95+/CUZlZKYLh eGd4g72F8xdhOUqWjVW92hEjpu2YteRLFueOa5p9s2xyq/rw0PrV3EFyu05tdYvt/tOt QKdkW7qdb24lsxdt4o7qcQM5oM6guWP/E8/ofrSGzAYndr1g5H11rWQ34psFVOAAjBuh J0pT46/DT5+rT1jKYincQDQYT38QC9iCZhWrCfapAUJSd2g+/F5il/Le+vrUYFlXcnG2 CW8KX/Pbqnd3eYGysJWJRtpx0hkCzIQrylGPiSCkRBnjeCTg01TTpLfFkWdUJ5cOD6RG LFmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700600968; x=1701205768; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SF092/ctRQcUj04zK5i0oCWlnTI/KuIBCZmhycRFKMQ=; b=BrE8QemQn9JgStXoXw6anVa7IMpS3EUOPuTYsba2VvJyrbB1hj64HLLt0jYwQIFgvx 4CyXCcm/m+s888N/TzpuhAEogXDhlzapcPw+bKXmBwC1ENH/KeiPgphsxTM7/Ygv204x lAZsHu2rmYwxE80cFATdxEhB42cidz5XNs5e+XxTBIr2p5qqVyfx020dZ1HMgBTuwi3h BlA9Dw7Z0vvGzp+/gqVf/itzpTXupB7OxC4+VAL3Wxr7WNdLzt5kYcFgFoAN8N2aY9UL pDvhv7jPz5HziheJZDYzkUp9w5NXFy+90P3bQKdfLu+wFk5uLi3LeWStlmIuVHUv8Z6W yExw== X-Gm-Message-State: AOJu0Yxh/RiwmOBEZaCYyjFjJPbs2uBcNQrZS1RB15CbYF6vwb2av5zw j06HGoulISi/pxh0dBk0mJ9jTS8bbywQf5tZQtHHSA== X-Google-Smtp-Source: AGHT+IFcsy2Wdbg2BsQo7tJVZJG1lZ75T4FgGAv7fuc8W99lqGNzSact2AOHpzjXbX2H7/F5ZCYQ5Q== X-Received: by 2002:a05:6602:3999:b0:7a6:7e4c:1bf0 with SMTP id bw25-20020a056602399900b007a67e4c1bf0mr122195iob.16.1700600968557; Tue, 21 Nov 2023 13:09:28 -0800 (PST) Received: from localhost.localdomain (97-122-77-73.hlrn.qwest.net. [97.122.77.73]) by smtp.gmail.com with ESMTPSA id l14-20020a6b750e000000b0079f7734a77esm3050242ioh.35.2023.11.21.13.09.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 13:09:28 -0800 (PST) From: Tom Tromey Date: Tue, 21 Nov 2023 14:09:28 -0700 Subject: [PATCH 4/4] Remove quick_symbol_functions::expand_matching_symbols MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231121-ada-lookup-perf-v1-4-1efd2d1dbf65@adacore.com> References: <20231121-ada-lookup-perf-v1-0-1efd2d1dbf65@adacore.com> In-Reply-To: <20231121-ada-lookup-perf-v1-0-1efd2d1dbf65@adacore.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_STOCKGEN,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 List-Id: The only caller of quick_symbol_functions::expand_matching_symbols was removed, so now this method and all implementations of it can be removed. --- gdb/dwarf2/read-debug-names.c | 46 ---------- gdb/dwarf2/read-gdb-index.c | 190 ------------------------------------------ gdb/dwarf2/read.c | 54 ------------ gdb/objfiles.h | 6 -- gdb/psymtab.c | 104 ----------------------- gdb/psymtab.h | 7 -- gdb/quick-symbol.h | 27 ------ gdb/symfile-debug.c | 18 ---- 8 files changed, 452 deletions(-) diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c index 78e0df27314..3793e3a58b3 100644 --- a/gdb/dwarf2/read-debug-names.c +++ b/gdb/dwarf2/read-debug-names.c @@ -84,13 +84,6 @@ struct dwarf2_debug_names_index : public dwarf2_base_index_functions { void dump (struct objfile *objfile) override; - void expand_matching_symbols - (struct objfile *, - const lookup_name_info &lookup_name, - domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) override; - bool expand_symtabs_matching (struct objfile *objfile, gdb::function_view file_matcher, @@ -957,45 +950,6 @@ dwarf2_debug_names_index::dump (struct objfile *objfile) gdb_printf (".debug_names: exists\n"); } -void -dwarf2_debug_names_index::expand_matching_symbols - (struct objfile *objfile, - const lookup_name_info &name, domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) -{ - dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); - - mapped_debug_names &map - = *(gdb::checked_static_cast - (per_objfile->per_bfd->index_table.get ())); - const block_search_flags block_flags - = global ? SEARCH_GLOBAL_BLOCK : SEARCH_STATIC_BLOCK; - - const char *match_name = name.ada ().lookup_name ().c_str (); - auto matcher = [&] (const char *symname) - { - if (ordered_compare == nullptr) - return true; - return ordered_compare (symname, match_name) == 0; - }; - - dw2_expand_symtabs_matching_symbol (map, name, matcher, - [&] (offset_type namei) - { - /* The name was matched, now expand corresponding CUs that were - marked. */ - dw2_debug_names_iterator iter (map, block_flags, domain, namei, - per_objfile); - - struct dwarf2_per_cu_data *per_cu; - while ((per_cu = iter.next ()) != NULL) - dw2_expand_symtabs_matching_one (per_cu, per_objfile, nullptr, - nullptr); - return true; - }, per_objfile); -} - bool dwarf2_debug_names_index::expand_symtabs_matching (struct objfile *objfile, diff --git a/gdb/dwarf2/read-gdb-index.c b/gdb/dwarf2/read-gdb-index.c index 7788626b67a..b1f7d4621e9 100644 --- a/gdb/dwarf2/read-gdb-index.c +++ b/gdb/dwarf2/read-gdb-index.c @@ -139,13 +139,6 @@ struct dwarf2_gdb_index : public dwarf2_base_index_functions gdb.dwarf2/gdb-index.exp testcase. */ void dump (struct objfile *objfile) override; - void expand_matching_symbols - (struct objfile *, - const lookup_name_info &lookup_name, - domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) override; - bool expand_symtabs_matching (struct objfile *objfile, gdb::function_view file_matcher, @@ -173,189 +166,6 @@ dwarf2_gdb_index::dump (struct objfile *objfile) gdb_printf ("\n"); } -/* Struct used to manage iterating over all CUs looking for a symbol. */ - -struct dw2_symtab_iterator -{ - /* The dwarf2_per_objfile owning the CUs we are iterating on. */ - dwarf2_per_objfile *per_objfile; - /* If set, only look for symbols that match that block. Valid values are - GLOBAL_BLOCK and STATIC_BLOCK. */ - std::optional block_index; - /* The kind of symbol we're looking for. */ - domain_enum domain; - /* The list of CUs from the index entry of the symbol, - or NULL if not found. */ - offset_view vec; - /* The next element in VEC to look at. */ - int next; - /* The number of elements in VEC, or zero if there is no match. */ - int length; - /* Have we seen a global version of the symbol? - If so we can ignore all further global instances. - This is to work around gold/15646, inefficient gold-generated - indices. */ - int global_seen; -}; - -/* Initialize the index symtab iterator ITER, offset_type NAMEI variant. */ - -static void -dw2_symtab_iter_init (struct dw2_symtab_iterator *iter, - dwarf2_per_objfile *per_objfile, - std::optional block_index, - domain_enum domain, offset_type namei, - mapped_gdb_index &index) -{ - iter->per_objfile = per_objfile; - iter->block_index = block_index; - iter->domain = domain; - iter->next = 0; - iter->global_seen = 0; - iter->vec = {}; - iter->length = 0; - - gdb_assert (!index.symbol_name_slot_invalid (namei)); - offset_type vec_idx = index.symbol_vec_index (namei); - - iter->vec = offset_view (index.constant_pool.slice (vec_idx)); - iter->length = iter->vec[0]; -} - -/* Return the next matching CU or NULL if there are no more. */ - -static struct dwarf2_per_cu_data * -dw2_symtab_iter_next (struct dw2_symtab_iterator *iter, - mapped_gdb_index &index) -{ - dwarf2_per_objfile *per_objfile = iter->per_objfile; - - for ( ; iter->next < iter->length; ++iter->next) - { - offset_type cu_index_and_attrs = iter->vec[iter->next + 1]; - offset_type cu_index = GDB_INDEX_CU_VALUE (cu_index_and_attrs); - gdb_index_symbol_kind symbol_kind = - GDB_INDEX_SYMBOL_KIND_VALUE (cu_index_and_attrs); - /* Only check the symbol attributes if they're present. - Indices prior to version 7 don't record them, - and indices >= 7 may elide them for certain symbols - (gold does this). */ - int attrs_valid = (index.version >= 7 - && symbol_kind != GDB_INDEX_SYMBOL_KIND_NONE); - - /* Don't crash on bad data. */ - if (cu_index >= per_objfile->per_bfd->all_units.size ()) - { - complaint (_(".gdb_index entry has bad CU index" - " [in module %s]"), objfile_name (per_objfile->objfile)); - continue; - } - - dwarf2_per_cu_data *per_cu = per_objfile->per_bfd->get_cu (cu_index); - - /* Skip if already read in. */ - if (per_objfile->symtab_set_p (per_cu)) - continue; - - /* Check static vs global. */ - if (attrs_valid) - { - bool is_static = GDB_INDEX_SYMBOL_STATIC_VALUE (cu_index_and_attrs); - - if (iter->block_index.has_value ()) - { - bool want_static = *iter->block_index == STATIC_BLOCK; - - if (is_static != want_static) - continue; - } - - /* Work around gold/15646. */ - if (!is_static - && symbol_kind == GDB_INDEX_SYMBOL_KIND_TYPE) - { - if (iter->global_seen) - continue; - - iter->global_seen = 1; - } - } - - /* Only check the symbol's kind if it has one. */ - if (attrs_valid) - { - switch (iter->domain) - { - case VAR_DOMAIN: - if (symbol_kind != GDB_INDEX_SYMBOL_KIND_VARIABLE - && symbol_kind != GDB_INDEX_SYMBOL_KIND_FUNCTION - /* Some types are also in VAR_DOMAIN. */ - && symbol_kind != GDB_INDEX_SYMBOL_KIND_TYPE) - continue; - break; - case STRUCT_DOMAIN: - if (symbol_kind != GDB_INDEX_SYMBOL_KIND_TYPE) - continue; - break; - case LABEL_DOMAIN: - if (symbol_kind != GDB_INDEX_SYMBOL_KIND_OTHER) - continue; - break; - case MODULE_DOMAIN: - if (symbol_kind != GDB_INDEX_SYMBOL_KIND_OTHER) - continue; - break; - default: - break; - } - } - - ++iter->next; - return per_cu; - } - - return NULL; -} - -void -dwarf2_gdb_index::expand_matching_symbols - (struct objfile *objfile, - const lookup_name_info &name, domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) -{ - /* Used for Ada. */ - dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); - - const block_enum block_kind = global ? GLOBAL_BLOCK : STATIC_BLOCK; - - mapped_gdb_index &index - = *(gdb::checked_static_cast - (per_objfile->per_bfd->index_table.get ())); - - const char *match_name = name.ada ().lookup_name ().c_str (); - auto matcher = [&] (const char *symname) - { - if (ordered_compare == nullptr) - return true; - return ordered_compare (symname, match_name) == 0; - }; - - dw2_expand_symtabs_matching_symbol (index, name, matcher, - [&] (offset_type namei) - { - struct dw2_symtab_iterator iter; - struct dwarf2_per_cu_data *per_cu; - - dw2_symtab_iter_init (&iter, per_objfile, block_kind, domain, namei, - index); - while ((per_cu = dw2_symtab_iter_next (&iter, index)) != NULL) - dw2_expand_symtabs_matching_one (per_cu, per_objfile, nullptr, - nullptr); - return true; - }, per_objfile); -} - /* Helper for dw2_expand_matching symtabs. Called on each symbol matched, to expand corresponding CUs that were marked. IDX is the index of the symbol name that matched. */ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index ccf9f18b31b..c8632d1c24c 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -1635,15 +1635,6 @@ struct readnow_functions : public dwarf2_base_index_functions { } - void expand_matching_symbols - (struct objfile *, - const lookup_name_info &lookup_name, - domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) override - { - } - bool expand_symtabs_matching (struct objfile *objfile, gdb::function_view file_matcher, @@ -16568,13 +16559,6 @@ struct cooked_index_functions : public dwarf2_base_index_functions index->dump (objfile->arch ()); } - void expand_matching_symbols - (struct objfile *, - const lookup_name_info &lookup_name, - domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) override; - bool expand_symtabs_matching (struct objfile *objfile, gdb::function_view file_matcher, @@ -16671,44 +16655,6 @@ cooked_index_functions::find_compunit_symtab_by_address return dw2_instantiate_symtab (per_cu, per_objfile, false); } -void -cooked_index_functions::expand_matching_symbols - (struct objfile *objfile, - const lookup_name_info &lookup_name, - domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) -{ - dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile); - cooked_index *table - = (gdb::checked_static_cast - (per_objfile->per_bfd->index_table.get ())); - if (table == nullptr) - return; - - const block_search_flags search_flags = (global - ? SEARCH_GLOBAL_BLOCK - : SEARCH_STATIC_BLOCK); - const language_defn *lang = language_def (language_ada); - symbol_name_matcher_ftype *name_match - = lang->get_symbol_name_matcher (lookup_name); - - for (const cooked_index_entry *entry : table->all_entries ()) - { - QUIT; - - if (entry->parent_entry != nullptr) - continue; - - if (!entry->matches (search_flags) - || !entry->matches (domain)) - continue; - - if (name_match (entry->canonical, lookup_name, nullptr)) - dw2_instantiate_symtab (entry->per_cu, per_objfile, false); - } -} - bool cooked_index_functions::expand_symtabs_matching (struct objfile *objfile, diff --git a/gdb/objfiles.h b/gdb/objfiles.h index ec9d354e4a7..0cad5961659 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -584,12 +584,6 @@ struct objfile code, e.g., DW_TAG_type_unit for dwarf debug info. */ void expand_symtabs_with_fullname (const char *fullname); - /* See quick_symbol_functions. */ - void expand_matching_symbols - (const lookup_name_info &name, domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare); - /* See quick_symbol_functions. */ bool expand_symtabs_matching (gdb::function_view file_matcher, diff --git a/gdb/psymtab.c b/gdb/psymtab.c index d4cd5810c20..ca1bcf18c4d 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -318,90 +318,6 @@ psymbol_name_matches (partial_symbol *psym, return name_match (psym->ginfo.search_name (), lookup_name, NULL); } -/* Look in PST for a symbol in DOMAIN whose name matches NAME. Search - the global block of PST if GLOBAL, and otherwise the static block. - MATCH is the comparison operation that returns true iff MATCH (s, - NAME), where s is a SYMBOL_SEARCH_NAME. If ORDERED_COMPARE is - non-null, the symbols in the block are assumed to be ordered - according to it (allowing binary search). It must be compatible - with MATCH. Returns the symbol, if found, and otherwise NULL. */ - -static struct partial_symbol * -match_partial_symbol (struct objfile *objfile, - struct partial_symtab *pst, int global, - const lookup_name_info &name, domain_enum domain, - symbol_compare_ftype *ordered_compare) -{ - struct partial_symbol **start, **psym; - struct partial_symbol **top, **real_top, **bottom, **center; - int length = (global - ? pst->global_psymbols.size () - : pst->static_psymbols.size ()); - int do_linear_search = 1; - - if (length == 0) - return NULL; - - start = (global ? - &pst->global_psymbols[0] : - &pst->static_psymbols[0]); - - if (global && ordered_compare) /* Can use a binary search. */ - { - do_linear_search = 0; - - /* Binary search. This search is guaranteed to end with center - pointing at the earliest partial symbol whose name might be - correct. At that point *all* partial symbols with an - appropriate name will be checked against the correct - domain. */ - - bottom = start; - top = start + length - 1; - real_top = top; - while (top > bottom) - { - center = bottom + (top - bottom) / 2; - gdb_assert (center < top); - - enum language lang = (*center)->ginfo.language (); - const char *lang_ln = name.language_lookup_name (lang); - - if (ordered_compare ((*center)->ginfo.search_name (), - lang_ln) >= 0) - top = center; - else - bottom = center + 1; - } - gdb_assert (top == bottom); - - while (top <= real_top - && psymbol_name_matches (*top, name)) - { - if (symbol_matches_domain ((*top)->ginfo.language (), - (*top)->domain, domain)) - return *top; - top++; - } - } - - /* Can't use a binary search or else we found during the binary search that - we should also do a linear search. */ - - if (do_linear_search) - { - for (psym = start; psym < start + length; psym++) - { - if (symbol_matches_domain ((*psym)->ginfo.language (), - (*psym)->domain, domain) - && psymbol_name_matches (*psym, name)) - return *psym; - } - } - - return NULL; -} - /* Look, in partial_symtab PST, for symbol whose natural name is LOOKUP_NAME. Check the global symbols if GLOBAL, the static symbols if not. */ @@ -877,26 +793,6 @@ psymtab_to_fullname (struct partial_symtab *ps) return ps->fullname; } -/* Psymtab version of expand_matching_symbols. See its definition in - the definition of quick_symbol_functions in symfile.h. */ - -void -psymbol_functions::expand_matching_symbols - (struct objfile *objfile, - const lookup_name_info &name, domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) -{ - for (partial_symtab *ps : partial_symbols (objfile)) - { - QUIT; - if (!ps->readin_p (objfile) - && match_partial_symbol (objfile, ps, global, name, domain, - ordered_compare)) - psymtab_to_symtab (objfile, ps); - } -} - /* A helper for psym_expand_symtabs_matching that handles searching included psymtabs. This returns true if a symbol is found, and false otherwise. It also updates the 'searched_flag' on the diff --git a/gdb/psymtab.h b/gdb/psymtab.h index 005a63cbba8..54ad78bcd73 100644 --- a/gdb/psymtab.h +++ b/gdb/psymtab.h @@ -626,13 +626,6 @@ struct psymbol_functions : public quick_symbol_functions void expand_all_symtabs (struct objfile *objfile) override; - void expand_matching_symbols - (struct objfile *, - const lookup_name_info &lookup_name, - domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) override; - bool expand_symtabs_matching (struct objfile *objfile, gdb::function_view file_matcher, diff --git a/gdb/quick-symbol.h b/gdb/quick-symbol.h index a7fea2ccb49..e48eeeda972 100644 --- a/gdb/quick-symbol.h +++ b/gdb/quick-symbol.h @@ -30,11 +30,6 @@ enum block_search_flag_values DEF_ENUM_FLAGS_TYPE (enum block_search_flag_values, block_search_flags); -/* Comparison function for symbol look ups. */ - -typedef int (symbol_compare_ftype) (const char *string1, - const char *string2); - /* Callback for quick_symbol_functions->map_symbol_filenames. */ typedef void (symbol_filename_ftype) (const char *filename, @@ -125,28 +120,6 @@ struct quick_symbol_functions /* Read all symbol tables associated with OBJFILE. */ virtual void expand_all_symtabs (struct objfile *objfile) = 0; - /* Find global or static symbols in all tables that are in DOMAIN - and for which MATCH (symbol name, NAME) == 0, reading in partial - symbol tables as needed. Look through global symbols if GLOBAL - and otherwise static symbols. - - MATCH must be weaker than strcmp_iw_ordered in the sense that - strcmp_iw_ordered(x,y) == 0 --> MATCH(x,y) == 0. ORDERED_COMPARE, - if non-null, must be an ordering relation compatible with - strcmp_iw_ordered in the sense that - strcmp_iw_ordered(x,y) == 0 --> ORDERED_COMPARE(x,y) == 0 - and - strcmp_iw_ordered(x,y) <= 0 --> ORDERED_COMPARE(x,y) <= 0 - (allowing strcmp_iw_ordered(x,y) < 0 while ORDERED_COMPARE(x, y) == 0). - */ - - virtual void expand_matching_symbols - (struct objfile *, - const lookup_name_info &lookup_name, - domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) = 0; - /* Expand all symbol tables in OBJFILE matching some criteria. FILE_MATCHER is called for each file in OBJFILE. The file name diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c index 85c43719dee..d31ff3353ee 100644 --- a/gdb/symfile-debug.c +++ b/gdb/symfile-debug.c @@ -388,24 +388,6 @@ objfile::expand_symtabs_with_fullname (const char *fullname) ALL_DOMAIN); } -void -objfile::expand_matching_symbols - (const lookup_name_info &name, domain_enum domain, - int global, - symbol_compare_ftype *ordered_compare) -{ - if (debug_symfile) - gdb_printf (gdb_stdlog, - "qf->expand_matching_symbols (%s, %s, %d, %s)\n", - objfile_debug_name (this), - domain_name (domain), global, - host_address_to_string (ordered_compare)); - - for (const auto &iter : qf_require_partial_symbols ()) - iter->expand_matching_symbols (this, name, domain, global, - ordered_compare); -} - bool objfile::expand_symtabs_matching (gdb::function_view file_matcher, -- 2.41.0