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 mi/26935] [gdb/testsuite] Using gold in gdb.base/morestack.exp causes incorrect debug info Date: Tue, 24 Nov 2020 12:32:48 +0000 [thread overview] Message-ID: <bug-26935-4717-Elz2zeFFnw@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-26935-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=26935 --- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> --- (In reply to Tom de Vries from comment #2) > But with ld, we have: > ... > linetable: ((struct linetable *) 0x2f18420): > INDEX LINE ADDRESS IS-STMT > 0 END 0x56555004 Y > 1 109 0x56555b8b Y > ... > If we're dropping lines 636 and 637 because the addresses are out of range, > I'd say it makes sense to drop the corresponding END as well. This seems to work: ... diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 9525962d966..f2560dd7fe7 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -714,6 +714,14 @@ buildsym_compunit::record_line (struct subfile *subfile, int line , break; subfile->line_vector->nitems--; } + + /* Ignore an end-of-sequence marker marking an empty sequence. */ + struct linetable_entry *last + = (subfile->line_vector->nitems == 0 + ? nullptr + : &subfile->line_vector->item[subfile->line_vector->nitems - 1]); + if (last == nullptr || last->line == 0) + return; } e = subfile->line_vector->item + subfile->line_vector->nitems++; ... -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2020-11-24 12:32 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-11-24 1:07 [Bug mi/26935] New: " vries at gcc dot gnu.org 2020-11-24 9:57 ` [Bug mi/26935] " vries at gcc dot gnu.org 2020-11-24 10:36 ` vries at gcc dot gnu.org 2020-11-24 12:32 ` vries at gcc dot gnu.org [this message] 2020-11-24 13:36 ` vries at gcc dot gnu.org 2021-01-04 14:01 ` [Bug win32/26935] " vries at gcc dot gnu.org 2021-01-04 14:02 ` vries at gcc dot gnu.org 2021-01-07 8:42 ` [Bug external/26935] " 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-26935-4717-Elz2zeFFnw@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).