+2008-01-14 Nick Clifton <nickc@redhat.com>
+
+ * dwarf.c (process_debug_info): Include the CU offset and corrupt
+ version value when reporting unrecognised DWARF version numbers.
+ (load_debug_info): Remember a failed attempt to load and parse the
+ .debug_info section and do not repeat such attempts.
+ (display_debug_lines): Check the return value from load_debug_info
+ and return whilst displaying a warning message if the load failed.
+ (display_debug_loc): Likewise.
+ (display_debug_ranges): Likewise.
+
2008-01-10 Andreas Schwab <schwab@suse.de>
* readelf.c (is_64bit_abs_reloc): Handle R_S390_64.
if (compunit.cu_version != 2 && compunit.cu_version != 3)
{
- warn (_("Only version 2 and 3 DWARF debug information is currently supported.\n"));
+ warn (_("CU at offset %lx contains corrupt or unsupported version number: %d.\n"),
+ cu_offset, compunit.cu_version);
continue;
}
last_pointer_size = 0;
warned_about_missing_comp_units = FALSE;
+ /* If we have already tried and failed to load the .debug_info
+ section then do not bother to repear the task. */
+ if (num_debug_info_entries == (unsigned) -1)
+ return 0;
+
/* If we already have the information there is nothing else to do. */
if (num_debug_info_entries > 0)
return num_debug_info_entries;
if (load_debug_section (info, file)
&& process_debug_info (&debug_displays [info].section, file, 1))
return num_debug_info_entries;
- else
- return 0;
+
+ num_debug_info_entries = (unsigned) -1;
+ return 0;
}
static int
printf (_("\nDump of debug contents of section %s:\n\n"),
section->name);
- load_debug_info (file);
+ if (load_debug_info (file) == 0)
+ {
+ warn (_("Unable to load/parse the .debug_info section, so cannot interpret the %s section.\n"),
+ section->name);
+ return 0;
+ }
while (data < end)
{
return 0;
}
- load_debug_info (file);
+ if (load_debug_info (file) == 0)
+ {
+ warn (_("Unable to load/parse the .debug_info section, so cannot interpret the %s section.\n"),
+ section->name);
+ return 0;
+ }
/* Check the order of location list in .debug_info section. If
offsets of location lists are in the ascending order, we can
return 0;
}
- load_debug_info (file);
+ if (load_debug_info (file) == 0)
+ {
+ warn (_("Unable to load/parse the .debug_info section, so cannot interpret the %s section.\n"),
+ section->name);
+ return 0;
+ }
/* Check the order of range list in .debug_info section. If
offsets of range lists are in the ascending order, we can