From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C555B3851C07; Mon, 8 Jun 2020 08:59:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C555B3851C07 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug symtab/26092] Complain about contradictory DW_LNE_end_sequence marker Date: Mon, 08 Jun 2020 08:59:16 +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: enhancement 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: Mon, 08 Jun 2020 08:59:16 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26092 --- Comment #1 from Tom de Vries --- I wrote a tentative patch detecting this problem using a gdb_assert: ... diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 477c382b81..1219cc58be 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -20045,6 +20045,7 @@ class lnp_state_machine /* These are initialized in the constructor. */ CORE_ADDR m_address; + CORE_ADDR m_prev_line_address =3D 0; bool m_is_stmt; unsigned int m_discriminator; @@ -20235,6 +20236,19 @@ dwarf_finish_line (struct gdbarch *gdbarch, struct subfile *subfile, void lnp_state_machine::record_line (bool end_sequence) { + if (end_sequence) + { + if (m_prev_line_address !=3D 0) + { + gdb_assert (m_prev_line_address !=3D m_address); + m_prev_line_address =3D 0; + } + } + else + { + m_prev_line_address =3D m_address; + } + if (dwarf_line_debug) { fprintf_unfiltered (gdb_stdlog, ... I did a gdb.dwarf2 testsuite run, hoping to find that the problem is only detected in the dwarf assembly test-cases. However, it also triggered on this bit in libgcc: ... [0x0000064a] Special opcode 75: advance Address by 5 to 0x300a and Line = by 0 to 246 [0x0000064b] Advance PC by 0 to 0x300a [0x0000064d] Extended opcode 1: End of Sequence ... So it looks like we also got compilers/assemblers generating this. --=20 You are receiving this mail because: You are on the CC list for the bug.=