Catch and warn about attempts to display debug information for version 1 aranges.
This commit is contained in:
parent
d7b325206e
commit
3f215a1093
2 changed files with 20 additions and 1 deletions
|
@ -5225,7 +5225,14 @@ display_debug_pubnames (section, start, file)
|
|||
|
||||
if (pubnames.pn_version != 2)
|
||||
{
|
||||
warn (_("Only DWARF 2 pubnames are currently supported"));
|
||||
static int warned = 0;
|
||||
|
||||
if (! warned)
|
||||
{
|
||||
warn (_("Only DWARF 2 pubnames are currently supported\n"));
|
||||
warned = 1;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -6397,6 +6404,12 @@ display_debug_aranges (section, start, file)
|
|||
arange.ar_pointer_size = BYTE_GET (external->ar_pointer_size);
|
||||
arange.ar_segment_size = BYTE_GET (external->ar_segment_size);
|
||||
|
||||
if (arange.ar_version != 2)
|
||||
{
|
||||
warn (_("Only DWARF 2 aranges are currently supported.\n"));
|
||||
break;
|
||||
}
|
||||
|
||||
printf (_(" Length: %ld\n"), arange.ar_length);
|
||||
printf (_(" Version: %d\n"), arange.ar_version);
|
||||
printf (_(" Offset into .debug_info: %lx\n"), arange.ar_info_offset);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue