From patchwork Wed Jun 26 15:52:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 33417 Received: (qmail 28555 invoked by alias); 26 Jun 2019 15:52:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28547 invoked by uid 89); 26 Jun 2019 15:52:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-23.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_PASS, T_FILL_THIS_FORM_SHORT autolearn=ham version=3.3.1 spammy=trampoline, msymbol, 2046, HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 26 Jun 2019 15:52:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6F925116272; Wed, 26 Jun 2019 11:52:31 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jVKyflMDk+bs; Wed, 26 Jun 2019 11:52:31 -0400 (EDT) Received: from murgatroyd.Home (75-166-12-78.hlrn.qwest.net [75.166.12.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 19FCF116256; Wed, 26 Jun 2019 11:52:31 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [FYI] Remove lookup_minimal_symbol_solib_trampoline Date: Wed, 26 Jun 2019 09:52:29 -0600 Message-Id: <20190626155229.3610-1-tromey@adacore.com> MIME-Version: 1.0 lookup_minimal_symbol_solib_trampoline is unused, so this patch removes it. The last use was apparently removed in commit 61a12cfa ("Remove HPUX"). gdb/ChangeLog 2019-06-26 Tom Tromey * minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove. * minsyms.h (lookup_minimal_symbol_solib_trampoline): Don't declare. --- gdb/ChangeLog | 6 ++++++ gdb/minsyms.c | 34 ---------------------------------- gdb/minsyms.h | 12 ------------ 3 files changed, 6 insertions(+), 46 deletions(-) diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 9d29d880aab..e64e5df1a18 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -597,40 +597,6 @@ lookup_minimal_symbol_by_pc_name (CORE_ADDR pc, const char *name, return NULL; } -/* See minsyms.h. */ - -struct bound_minimal_symbol -lookup_minimal_symbol_solib_trampoline (const char *name, - struct objfile *objf) -{ - struct minimal_symbol *msymbol; - struct bound_minimal_symbol found_symbol = { NULL, NULL }; - - unsigned int hash = msymbol_hash (name) % MINIMAL_SYMBOL_HASH_SIZE; - - for (objfile *objfile : current_program_space->objfiles ()) - { - if (objf == NULL || objf == objfile - || objf == objfile->separate_debug_objfile_backlink) - { - for (msymbol = objfile->per_bfd->msymbol_hash[hash]; - msymbol != NULL; - msymbol = msymbol->hash_next) - { - if (strcmp (MSYMBOL_LINKAGE_NAME (msymbol), name) == 0 && - MSYMBOL_TYPE (msymbol) == mst_solib_trampoline) - { - found_symbol.objfile = objfile; - found_symbol.minsym = msymbol; - return found_symbol; - } - } - } - } - - return found_symbol; -} - /* A helper function that makes *PC section-relative. This searches the sections of OBJFILE and if *PC is in a section, it subtracts the section offset and returns true. Otherwise it returns diff --git a/gdb/minsyms.h b/gdb/minsyms.h index 3e414f6ff7b..bb43165620d 100644 --- a/gdb/minsyms.h +++ b/gdb/minsyms.h @@ -204,18 +204,6 @@ struct bound_minimal_symbol lookup_bound_minimal_symbol (const char *); struct bound_minimal_symbol lookup_minimal_symbol_text (const char *, struct objfile *); -/* Look through all the current minimal symbol tables and find the - first minimal symbol that matches NAME and is a solib trampoline. - If OBJF is non-NULL, limit the search to that objfile. Returns a - pointer to the minimal symbol that matches, or NULL if no match is - found. - - This function only searches the mangled (linkage) names. */ - -struct bound_minimal_symbol lookup_minimal_symbol_solib_trampoline - (const char *, - struct objfile *); - /* Look through all the current minimal symbol tables and find the first minimal symbol that matches NAME and PC. If OBJF is non-NULL, limit the search to that objfile. Returns a pointer to the minimal