From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D5E063858D32; Mon, 19 Dec 2022 16:30:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D5E063858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671467435; bh=g2cV3/q0RtLfAB6dcsQ3i7l11KzWdHoMbu0Bwunj3Uw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yBYE6P7Y1Ot5cDJWxPdOuh1ejmgI1CyJUhskyyH+oyJPMhz/sh8iOAxuAMLyrCD+p UPnAR4KQS/XvEAcDWoSRGUuVDITGQHRpE6WxTc9MRtZJxOtMt2Mnk3xSWRCaDgOChQ 65nqxO6LSAGiuFub/zniaQ4DzyhDVbZaJEtgffY8= From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug c++/29918] GDB cannot step or break into template functions compiled with g++ -Og Date: Mon, 19 Dec 2022 16:30:18 +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: 12.1 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cc cf_reconfirmed_on bug_status 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=3D29918 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |tromey at sourceware dot o= rg Last reconfirmed| |2022-12-19 Status|UNCONFIRMED |NEW --- Comment #3 from Tom Tromey --- I was able to reproduce with the Fedora 36 system gcc. However, the line table that is emitted is weird. First, consider the line table for lines 12-18. This corresponds to the function t1: File name Line number Starting address Vie= w=20=20=20 Stmt prog.cc 12 0x400576=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 13 0x400576 = 1=20=20=20 x prog.cc 14 0x400576 = 2=20=20=20 x prog.cc 14 0x400576 3 prog.cc 13 0x40057b=20=20= =20=20=20=20=20=20 prog.cc 14 0x400580=20=20= =20=20=20=20=20=20 prog.cc 15 0x400582=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 15 0x400582 1 prog.cc 15 0x400587=20=20= =20=20=20=20=20=20 prog.cc 14 0x400589=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 14 0x40058c=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 17 0x400590=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 18 0x400590 1 prog.cc 18 0x400592=20=20= =20=20=20=20=20=20 Not that many lines are represented and multiple lines in this range have t= he statement marker. Now consider the line table for lines 2-9, aka t0<>: File name Line number Starting address Vie= w=20=20=20 Stmt prog.cc 2 0x4005ae=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 5 0x4005ae 1 prog.cc 4 0x4005b3=20=20= =20=20=20=20=20=20 prog.cc 5 0x4005b8=20=20= =20=20=20=20=20=20 prog.cc 6 0x4005ba=20=20= =20=20=20=20=20=20 prog.cc 6 0x4005bf=20=20= =20=20=20=20=20=20 prog.cc 5 0x4005c1=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 5 0x4005c4=20=20= =20=20=20=20=20=20=20=20=20 x prog.cc 9 0x4005c8=20=20= =20=20=20=20=20=20 prog.cc 9 0x4005ca=20=20= =20=20=20=20=20=20 This seems weird. Perhaps gdb can work around it, after all lldb does. I tend to suspect one of the line table patches that went in in the 12 era, though I haven't tried bisecting or anything. Anyway, while I agree gdb can be better, I think there's also a compiler bu= g. --=20 You are receiving this mail because: You are on the CC list for the bug.=