From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E5930386F457; Wed, 15 Jul 2020 15:47:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E5930386F457 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/26243] Handle line number 0 in line table produced by clang Date: Wed, 15 Jul 2020 15:47:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: symtab 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 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2020 15:47:30 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26243 --- Comment #5 from Tom de Vries --- (In reply to Andrew Burgess from comment #4) > Ignoring line number 0 while parsing is probably not the right answer. If > we do that then instruction associated with line 0 will instead be > associated with the preceding line number. Indeed, I found a scenario where this would make a difference: ni-stepping through line 53. With trunk I get: ... (gdb)=20 0x0000000000400d13 53 if (curr->right) { todo.push_back(curr->right); } (gdb)=20 0x0000000000400d18 53 if (curr->right) { todo.push_back(curr->right); } (gdb)=20 0x0000000000400d1d in inorder (root=3D0x6031f0 ) (gdb)=20 0x0000000000400d21 in inorder (root=3D0x6031f0 ) (gdb)=20 ... But with the patch from comment 1, we have instead: ... (gdb)=20 0x0000000000400d13 53 if (curr->right) { todo.push_back(curr->right); } (gdb)=20 0x0000000000400d18 53 if (curr->right) { todo.push_back(curr->right); } (gdb)=20 0x0000000000400d1d 53 if (curr->right) { todo.push_back(curr->right); } (gdb)=20 0x0000000000400d21 53 if (curr->right) { todo.push_back(curr->right); } (gdb) ... --=20 You are receiving this mail because: You are on the CC list for the bug.=