[Bug gdb/28004] DW_AT_ranges with form DW_FORM_sec_offset problem
vries at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Fri Jun 25 14:30:03 GMT 2021
https://sourceware.org/bugzilla/show_bug.cgi?id=28004
--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
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<CORE_ADDR> base;
const gdb_byte *buffer;
- CORE_ADDR baseaddr;
bool overflow = false;
ULONGEST addr_index;
struct dwarf2_section_info *rnglists_section;
@@ -13621,8 +13620,6 @@ dwarf2_rnglists_process (unsigned offset, struct
dwarf2_cu *cu
,
}
buffer = rnglists_section->buffer + offset;
- baseaddr = 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
,
/* A not-uncommon case of bad debug info.
Don't pollute the addrmap with bad data. */
- if (range_beginning + baseaddr == 0
+ if (range_beginning == 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.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list