From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 19F40383F858; Mon, 4 Jan 2021 14:01:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 19F40383F858 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug win32/26935] [gdb/testsuite] Using gold in gdb.base/morestack.exp causes incorrect debug info Date: Mon, 04 Jan 2021 14:01:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: win32 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: component 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, 04 Jan 2021 14:01:46 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D26935 Tom de Vries changed: What |Removed |Added ---------------------------------------------------------------------------- Component|mi |win32 --- Comment #5 from Tom de Vries --- (In reply to Tom de Vries from comment #4) > (In reply to Tom de Vries from comment #3) > > (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. > >=20 > > 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 > > + =3D (subfile->line_vector->nitems =3D=3D 0 > > + ? nullptr > > + : &subfile->line_vector->item[subfile->line_vector->nitems -= 1]); > > + if (last =3D=3D nullptr || last->line =3D=3D 0) > > + return; > > } > >=20=20 > > e =3D subfile->line_vector->item + subfile->line_vector->nitems++; > > ... >=20 > Patch survives testsuite run. Submitted: https://sourceware.org/pipermail/gdb-patches/2021-January/174668.html --=20 You are receiving this mail because: You are on the CC list for the bug.=