From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1805) id 8FA003858415; Tue, 18 Oct 2022 13:25:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FA003858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666099538; bh=+IndKxZaJCuos1kB6BmCSMZdvvLupEBFF1nrF+ZnPoE=; h=From:To:Subject:Date:From; b=eMpeulWT4JNuP9VTZpiqRR9lig90AI7C1XxBR+iP6ISYrH5iz41inN5hUJjKnV+gh ADyFF6rhkrZ3PFOZkIoO5fHvd7Fj/RAyIqRjWJT2Ajls1C0F3QVpV5hTYyCXJ4ACbC SAOIAUP4SHNiYHDcmNCl0T8xuClhtCbjy2SlYJx0= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Markus Metzger To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb, hppa: remove unused hppa_lookup_stub_minimal_symbol X-Act-Checkin: binutils-gdb X-Git-Author: Markus Metzger X-Git-Refname: refs/heads/master X-Git-Oldrev: 2aab2438702dfb22d6fa0c5d8bef267f3d24638b X-Git-Newrev: 6f96c196beccb6f30b78ef878b3eaa420dfaa687 Message-Id: <20221018132538.8FA003858415@sourceware.org> Date: Tue, 18 Oct 2022 13:25:38 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D6f96c196becc= b6f30b78ef878b3eaa420dfaa687 commit 6f96c196beccb6f30b78ef878b3eaa420dfaa687 Author: Markus Metzger Date: Thu Apr 28 11:14:57 2022 +0200 gdb, hppa: remove unused hppa_lookup_stub_minimal_symbol =20 I stumbled over this while reviewing all objfiles traversals with regar= ds to impact of linker namespaces. =20 Recursive grep only finds two occurrences of hppa_lookup_stub_minimal_s= ymbol: - the declaration in hppa-tdep.h. - the definition in hppa-tdep.c. =20 There appear to be no calls to this function. Remove it. Diff: --- 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 9088225f206..e35e08b22c1 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -2509,37 +2509,6 @@ hppa_unwind_pc (struct gdbarch *gdbarch, frame_info_= ptr next_frame) return pc & ~0x3; } =20 -/* 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) =3D=3D 0) - { - struct unwind_table_entry *u; - - u =3D find_unwind_entry (msym->value_longest ()); - if (u !=3D NULL && u->stub_unwind.stub_type =3D=3D stub_type) - { - result.objfile =3D objfile; - result.minsym =3D 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 d0e0d4d6a3a..6ebcdc5e90a 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, frame_info_ptr next_frame); =20 -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 (frame_info_ptr , CORE_ADDR pc);