readelf/objdump: Handle DWARF info with mixed types of range section.

PR 30791
  * dwarf.h (debug_info): Add range_versions field.
  * dwarf.c (read_and_display_attr_value): When recording a range arribute also ecord the dwarf version number.
  (is_range_list_for_this_section): New function.
  (display_debug_ranges): Only show debug ranges whose version is suitable for the secction being displayed.
This commit is contained in:
Nick Clifton
2023-08-23 11:36:25 +01:00
parent 3ce8f906be
commit 589d38af0d
3 changed files with 36 additions and 5 deletions

View File

@@ -189,6 +189,7 @@ typedef struct
/* List of .debug_ranges offsets seen in this .debug_info. */
uint64_t * range_lists;
unsigned int * range_versions;
unsigned int num_range_lists;
unsigned int max_range_lists;
uint64_t rnglists_base;