From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5DE43858D20; Thu, 28 Sep 2023 10:49:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5DE43858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1695898182; bh=GnNTxgPyvBsnt0R+93ph0pKRk419MxCCS6JbRBJkawA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=w2swD+no1SNkGjwkfiA5L+Eh0N36Mra7qxhgeFVnBPtaitD3kdlITW/OQX7Nf0tCt zBZhOZ++rYaFDqYq5rMkusKr8c5uHWaSQw5252yRqHJ23yKfnr91qNiDA4g4lqsIGJ ha3xbLzmxSFM5Z3ios08RJggqmgs1HC4RWZ9sLV8= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug exp/30911] [gdb/exp] Cannot call ifunc strstr with debuginfo installed Date: Thu, 28 Sep 2023 10:49:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: exp X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30911 --- Comment #1 from Tom de Vries --- Tentative fix: swap the order here: ... diff --git a/gdb/infcall.c b/gdb/infcall.c index 0f9ad34bbb4..20d0f9acca5 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -316,17 +316,20 @@ find_function_addr (struct value *function, FUNCTION_TYPE have been asked for. */ if (retval_type !=3D NULL || function_type !=3D NULL) { - type *target_ftype =3D find_function_type (funaddr); - /* If we don't have debug info for the target function, - see if we can instead extract the target function's - type from the type that the resolver returns. */ - if (target_ftype =3D=3D NULL) - target_ftype =3D find_gnu_ifunc_target_type (resolver_addr); + /* Try to get the target function's type from the type that + the resolver returns. We do this first to work around + PR gas/29517. */ + type *target_ftype =3D find_gnu_ifunc_target_type (resolver_a= ddr); if (target_ftype !=3D NULL) { value_type =3D check_typedef (target_ftype)->target_type = (); ftype =3D target_ftype; } + + /* Try to get the target function's type from the target + function. */ + if (target_ftype =3D=3D NULL) + target_ftype =3D find_function_type (funaddr); } } else ... --=20 You are receiving this mail because: You are on the CC list for the bug.=