From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by sourceware.org (Postfix) with ESMTPS id 9ABCC3836E48 for ; Thu, 2 Jun 2022 14:29:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9ABCC3836E48 X-IronPort-AV: E=McAfee;i="6400,9594,10365"; a="275973058" X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="275973058" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2022 07:29:19 -0700 X-IronPort-AV: E=Sophos;i="5.91,271,1647327600"; d="scan'208";a="552863089" Received: from labpc2407.iul.intel.com (HELO localhost) ([172.28.50.61]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jun 2022 07:29:18 -0700 From: Markus Metzger To: gdb-patches@sourceware.org Subject: [PATCH v5 12/15] gdb, hppa: remove unused hppa_lookup_stub_minimal_symbol Date: Thu, 2 Jun 2022 15:25:11 +0200 Message-Id: <20220602132514.957983-13-markus.t.metzger@intel.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220602132514.957983-1-markus.t.metzger@intel.com> References: <20220602132514.957983-1-markus.t.metzger@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, T_FILL_THIS_FORM_SHORT, 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.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jun 2022 14:29:21 -0000 I stumbled over this while reviewing all objfiles traversals with regards to impact of linker namespaces. Recursive grep only finds two occurrences of hppa_lookup_stub_minimal_symbol: - the declaration in hppa-tdep.h. - the definition in hppa-tdep.c. There appear to be no calls to this function. Remove it. --- gdb/hppa-tdep.c | 31 ------------------------------- gdb/hppa-tdep.h | 4 ---- 2 files changed, 35 deletions(-) diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index f9ececbb04f..9352b62caf4 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2511,37 +2511,6 @@ hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) return pc & ~0x3; } -/* Return the minimal symbol whose name is NAME and stub type is STUB_TYPE. - Return NULL if no such symbol was found. */ - -struct bound_minimal_symbol -hppa_lookup_stub_minimal_symbol (const char *name, - enum unwind_stub_types stub_type) -{ - struct bound_minimal_symbol result; - - for (objfile *objfile : current_program_space->objfiles ()) - { - for (minimal_symbol *msym : objfile->msymbols ()) - { - if (strcmp (msym->linkage_name (), name) == 0) - { - struct unwind_table_entry *u; - - u = find_unwind_entry (msym->value_longest ()); - if (u != NULL && u->stub_unwind.stub_type == stub_type) - { - result.objfile = objfile; - result.minsym = msym; - return result; - } - } - } - } - - return result; -} - static void unwind_command (const char *exp, int from_tty) { diff --git a/gdb/hppa-tdep.h b/gdb/hppa-tdep.h index f1e24a272c4..821d1bb58c6 100644 --- a/gdb/hppa-tdep.h +++ b/gdb/hppa-tdep.h @@ -210,10 +210,6 @@ extern void hppa_write_pc (struct regcache *regcache, CORE_ADDR pc); extern CORE_ADDR hppa_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame); -extern struct bound_minimal_symbol - hppa_lookup_stub_minimal_symbol (const char *name, - enum unwind_stub_types stub_type); - extern int hppa_in_solib_call_trampoline (struct gdbarch *gdbarch, CORE_ADDR pc); extern CORE_ADDR hppa_skip_trampoline_code (struct frame_info *, CORE_ADDR pc); -- 2.35.3 Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928