From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2563C383E403; Tue, 13 Dec 2022 19:33:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2563C383E403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670960033; bh=N/v+ZVlLCNan/6+tdIixk0B/kaf+zti1AI1oB2JFJAk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Fs5zdqzDzWMrQo0j1kOECWTXHTWjdOvYVcAfONDGDObxHb6V/wW/DhEcORRbJQ8Kt doQy8hUDM9xy+Plh5tkWPLez2wtEHUIC4KbaAIPjuSx3Uk8R2h2Ne579uEcABligql FgDUVB1u/FERRSls1vOwBpBBOGLciG6WwXcLXYEQ= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug c++/29896] GDB git doesn't recognize template function name Date: Tue, 13 Dec 2022 19:33:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: c++ X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot 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: 13.1 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D29896 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot o= rg --- Comment #3 from Tom Tromey --- What happens is that the first scan (the cooked index) takes the name from the DWARF and gets "t0<>". The cooked index just uses strncasecmp to find entries, so it doesn't find this name. Full symbol name matching, I think, is done with strncmp_iw_with_mode, which handles a lot of weird cases and ignores the "<>": /* Skip template parameters in STRING1 if STRING2 does not contain any. E.g.: [...] So, that sucks. I'm not completely sure how to solve it. Perhaps stripping the template parmaeters before recording the entry in the index would work. One idea is to have two entries, both with and without the parameters, but I wonder about combinatorial explosion if there are nested templates like a<>::b<>::c<>::d<> -- since the entries record parent information. Another idea is to change the hashing and the lookup to use strncmp_iw_with_mode somehow, at least for C++ names. --=20 You are receiving this mail because: You are on the CC list for the bug.=