From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 163AA3848E3C; Tue, 13 Dec 2022 02:05:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 163AA3848E3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1670897108; bh=e+/uxaHooaf7C588zYoJcAb1H/Hg/c4LPHu3Ybdsmiw=; h=From:To:Subject:Date:From; b=WSEykEnXFgDdFoq4Q8+lyZqDZMPPZZ58shhj1mF4nfD6NZoVr+VLHTsC86DgCX4X0 ul4CZiTMdmR9rYDVIrKTKu5KQSIbOCOIJBvZTiJPnpH3ofudiecd9uhMORIv5z7mP2 3Robty7xTGKIxo0LGJvQQkS65p/7DjrxbaiPJRFY= From: "vimacs.hacks at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug c++/29896] New: GDB git doesn't recognize template function name Date: Tue, 13 Dec 2022 02:05:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: vimacs.hacks at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 Bug ID: 29896 Summary: GDB git doesn't recognize template function name Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ Assignee: unassigned at sourceware dot org Reporter: vimacs.hacks at gmail dot com Target Milestone: --- First posted on https://sourceware.org/pipermail/gdb/2022-November/050431.h= tml GDB 12.1 works as expected in this case. For the following C++ program built with "g++ -g -o test test.cc" (no matter what optimization level used): template int t0(int n) { int sum =3D 0; for (int i =3D 0; i < n; ++i) { sum +=3D i * i; } return sum; } int t1(int n) { int sum =3D 0; for (int i =3D 0; i < n; ++i) { sum +=3D i * i; } return sum; } int main() { int a =3D t0(5); int b =3D t1(5); return a + b; } We cannot use "b t0" command, however, after I use tab completion once, GDB recognize this: (gdb) b t0 Function "t0" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) #b t0(int)=20 (gdb) b t0 Breakpoint 1 at 0x117d: file test.cc, line 4. --=20 You are receiving this mail because: You are on the CC list for the bug.=