public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.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 [thread overview] Message-ID: <bug-26092-4717-7Tj3x2HniW@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26092-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26092 --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- 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 = 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 != 0) + { + gdb_assert (m_prev_line_address != m_address); + m_prev_line_address = 0; + } + } + else + { + m_prev_line_address = 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. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-06-08 8:59 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-08 8:34 [Bug symtab/26092] New: " vries at gcc dot gnu.org 2020-06-08 8:59 ` vries at gcc dot gnu.org [this message] 2020-06-08 9:38 ` [Bug symtab/26092] " vries at gcc dot gnu.org 2020-06-08 10:04 ` vries at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-26092-4717-7Tj3x2HniW@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).