From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9F0CE393AC02; Fri, 25 Jun 2021 21:40:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F0CE393AC02 From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug gdb/28004] DW_AT_ranges with form DW_FORM_sec_offset problem Date: Fri, 25 Jun 2021 21:40:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb 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: 11.1 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: Fri, 25 Jun 2021 21:40:56 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28004 --- Comment #5 from Tom de Vries --- (In reply to Tom de Vries from comment #4) > This fixes the warning: > ... > diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c > index 07bc08fba14..96bfb1280e1 100644 > --- a/gdb/dwarf2/read.c > +++ b/gdb/dwarf2/read.c > @@ -13604,7 +13604,6 @@ dwarf2_rnglists_process (unsigned offset, struct > dwarf2_cu *cu > , > /* Base address selection entry. */ > gdb::optional base; > const gdb_byte *buffer; > - CORE_ADDR baseaddr; > bool overflow =3D false; > ULONGEST addr_index; > struct dwarf2_section_info *rnglists_section; > @@ -13621,8 +13620,6 @@ dwarf2_rnglists_process (unsigned offset, struct > dwarf2_cu *cu > , > } > buffer =3D rnglists_section->buffer + offset; >=20=20 > - baseaddr =3D objfile->text_section_offset (); > - > while (1) > {-- > /* Initialize it due to a false compiler warning. */ > @@ -13764,7 +13761,7 @@ dwarf2_rnglists_process (unsigned offset, struct > dwarf2_cu *cu > , >=20=20 > /* A not-uncommon case of bad debug info. > Don't pollute the addrmap with bad data. */ > - if (range_beginning + baseaddr =3D=3D 0 > + if (range_beginning =3D=3D 0 > && !per_objfile->per_bfd->has_section_at_zero) > { > complaint (_(".debug_rnglists entry has start address of zero" > ... > which means we no longer trigger the assert when rerunning. Doesn't fix = the > assert as such though. There's similar code for .debug_ranges. I've tested a patch with both fixes on openSUSE Leap 15.2 x86_64 (gcc 7.5.0, using .debug_ranges), and on openSUSE Tumbleweed x86_64 (gcc 11.1.1, using .debug_rnglists). /me -> vacation for 1 week. --=20 You are receiving this mail because: You are on the CC list for the bug.=