From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B89643858018; Tue, 11 Jan 2022 17:30:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B89643858018 From: "tromey at sourceware dot org" To: gdb-prs@sourceware.org Subject: [Bug breakpoints/13415] Invalid breakpoints when linking with --gc-sections Date: Tue, 11 Jan 2022 17:30:59 +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: 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: Tue, 11 Jan 2022 17:30:59 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D13415 --- Comment #9 from Tom Tromey --- Note there's also bug #12528 on this topic. And, patches did go in to fix some problems with --gc-sections. In the program that fails for me, the CU looks like: <0><199f>: Abbrev Number: 2 (DW_TAG_compile_unit) <19a0> DW_AT_producer : (indirect string, offset: 0x27da): GNU Ada 11.2.1 20210728 (Red Hat 11.2.1-1) -O -gnatez -gnatea -g -ffunction-sections -gnatez -mtune=3Dgeneric -march=3Dx86-64 <19a4> DW_AT_language : 13 (ADA 95) <19a5> DW_AT_name : (indirect line string, offset: 0x10d): pack.adb <19a9> DW_AT_comp_dir : (indirect line string, offset: 0x0): /home/tromey/AdaCore/gdb-testsuite/tests/KB21-043__bp_next_to_generic_fun <19ad> DW_AT_ranges : 0x63 <19b1> DW_AT_low_pc : 0x0 <19b9> DW_AT_stmt_list : 0x29e low_pc =3D=3D 0x0 is fishy, especially considering this is a native Linux executable and not some embedded thing where it might make sense. Also in the ranges: 00000063 0000000000000000 000000000000003d=20 0000006d which is also pretty weird. Maybe gdb ought to reject this entire CU, at least for purposes of the line table. --=20 You are receiving this mail because: You are on the CC list for the bug.=