From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A71D3857C6F; Thu, 16 Jul 2020 22:22:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A71D3857C6F From: "palves at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug symtab/26243] Handle line number 0 in line table produced by clang Date: Thu, 16 Jul 2020 22:22:39 +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: palves at redhat dot com 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: Thu, 16 Jul 2020 22:22:39 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26243 --- Comment #12 from Pedro Alves --- > I.e., seems like either there's a bug elsewhere, where bar2's length is=20 > determined, or the testcase has a bug. The other two calls to foo should= be=20 > part of the function too. It's the latter - a simple typo: diff --git c/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp w/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp index e322f777082..acf16848e82 100644 --- c/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp +++ w/gdb/testsuite/gdb.dwarf2/dw2-line-number-zero.exp @@ -74,7 +74,7 @@ Dwarf::assemble $asm_file { {external 1 flag} {name bar2} {low_pc $bar2_start addr} - {high_pc "$bar2_start + $main_length" addr} + {high_pc "$bar2_start + $bar2_length" addr} } } } With that, I now get: Running /home/pedro/gdb/binutils-gdb/src/gdb/testsuite/gdb.dwarf2/dw2-line-number-z= ero.exp ... KPASS: gdb.dwarf2/dw2-line-number-zero.exp: continue to breakpoint: bar1_label_3 (PRMS gdb/nnnnn) KPASS: gdb.dwarf2/dw2-line-number-zero.exp: continue to breakpoint: bar2_label_3 (PRMS gdb/nnnnn) =3D=3D=3D gdb Summary =3D=3D=3D # of expected passes 6 # of unknown successes 2 --=20 You are receiving this mail because: You are on the CC list for the bug.=