From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 249473858C39; Fri, 7 Jan 2022 21:54:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 249473858C39 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/13415] Invalid breakpoints when linking with --gc-sections Date: Fri, 07 Jan 2022 21:54:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: breakpoints X-Bugzilla-Version: 7.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at sourceware dot 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: cc 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: Fri, 07 Jan 2022 21:54:43 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D13415 Tom Tromey changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at sourceware dot o= rg --- Comment #8 from Tom Tromey --- I ran across this today. Using --gc-sections can end up with a line table entry with a pc=3D0x0. gdb will try to set a breakpoint here (or at some offset, I was seeing 0x8) -- but of course that doesn't work. One idea would be to silently drop such entries. That's what gdb normally does with pc=3D0 in the DWARF reader (except when there is a section including that address). Another idea would be to warn and then drop these when setting a breakpoint. That might be friendlier since it would alert the user that something weird is going on. --=20 You are receiving this mail because: You are on the CC list for the bug.=