From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 17A01385802D; Sat, 24 Jul 2021 06:11:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17A01385802D From: "bernd.edlinger at hotmail dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/101598] [debug, ada] .loc generated for defs__struct1IP Date: Sat, 24 Jul 2021 06:11:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: bernd.edlinger at hotmail dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.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://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2021 06:11:40 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101598 --- Comment #6 from Bernd Edlinger --- (In reply to Tom de Vries from comment #4) > (In reply to Bernd Edlinger from comment #2) > > Yes, but it wont fix dwarf-4 and also not the case > > when this is not the first function. then we'll > > have the .loc from the previous function extend to this one. >=20 > I just tried out: > - dwarf-4 > - manually changing order of defs__f1 and defs__struct1IP in .s file >=20 > The result look fine to me. So please show a concrete example where this > produces wrong results. I did the same. The effect I meant is the following which is basically PR97937 The line number from the previous function defs__f1 extends to defs__structIP. So when I debug this I see the following: Reading symbols from ./formatted_ref... (gdb) b defs__struct1IP=20 Breakpoint 1 at 0x402faa: file defs.adb, line 21. (gdb) r Starting program: /home/ed/gnu/binutils-gdb/gdb/testsuite/gdb.ada/formatted_ref/formatted_ref= =20 Breakpoint 1, 0x0000000000402faa in defs__struct1IP () at defs.adb:21 21 end F1; This here the line number is totally misleading. So to me it appears, that PR101575 is just the evil twin brother of PR97937. And indeed the fix for PR97937 - excluding the really not debuggable funtions from the debug ranges - is not sufficient to get rid of the bogus line table entries from PR101575. So I start to think that emitting a dummy .file table entry as you suggest is the way to go, but I would like not to break the fix for PR97937 at the same time.=