https://sourceware.org/bugzilla/show_bug.cgi?id=22249

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
I think it's as easy as:

diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 7ded1bf..f9c93ae 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -2666,6 +2666,13 @@ process_debug_info (struct dwarf_section *section,
          SAFE_BYTE_GET_AND_INC (type_offset, hdrptr, offset_size, end);
        }

+      if (dwarf_start_die > (cu_offset + compunit.cu_length
+                            + initial_length_size))
+       {
+         start = section_begin + cu_offset + compunit.cu_length +
initial_length_size;
+         continue;
+       }
+
       if ((do_loc || do_debug_loc || do_debug_ranges)
          && num_debug_info_entries == 0
          && ! do_types)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to