mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
Improve the speed of the --dwarf-start option by skipping processing of any comp unit that ends before the specified start address.
PR 22249 * dwarf.c (process_debug_info): Skip any comp unit that ends before dwarf_start_die.
This commit is contained in:
@@ -2667,6 +2667,14 @@ 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)
|
||||
|
||||
Reference in New Issue
Block a user