From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kIosCbXKmGKI6wkAWB0awg (envelope-from ) for ; Thu, 02 Jun 2022 10:35:33 -0400 Received: by simark.ca (Postfix, from userid 112) id 222251E221; Thu, 2 Jun 2022 10:35:33 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ClmYXYOt; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id AED3C1E01D for ; Thu, 2 Jun 2022 10:35:32 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5FB87396E43E for ; Thu, 2 Jun 2022 14:35:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5FB87396E43E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654180532; bh=S4DwFdlXwWap6UD5z1JaCKNi7xYxZ4cXWMS95ZoJEVM=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ClmYXYOtXEsXduFlirmL1ZyA5OAInq9GxDXJ35dSeU8uZC/l1dNKa/C9YccImNzJi zG3RFVlHAaGCMRlxRXrr7igS3C6usWW0Ix5AH2gQ2Uv9Van59VbwVMifr8m7ZG+i+x qVIxcF6OWLYpKwMFFvYqHa1au0DWSQ9v7eyd1pXs= 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 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-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: , From: Markus Metzger via Gdb-patches Reply-To: Markus Metzger Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" 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