2009-07-06 Tristan Gingold <gingold@adacore.com>

* objdump.c (dump_dwarf_section): Handle .eh_frame like other dwarf
	sections.
	* dwarf.h (struct dwarf_section_display): Remove eh_frame field.
	* dwarf.c (debug_displays): Adjust for removed field.
This commit is contained in:
Tristan Gingold 2009-07-06 14:45:56 +00:00
parent 07d8eb5534
commit c8450da85c
4 changed files with 34 additions and 31 deletions

View File

@ -1,3 +1,10 @@
2009-07-06 Tristan Gingold <gingold@adacore.com>
* objdump.c (dump_dwarf_section): Handle .eh_frame like other dwarf
sections.
* dwarf.h (struct dwarf_section_display): Remove eh_frame field.
* dwarf.c (debug_displays): Adjust for removed field.
2009-07-03 Jakub Jelinek <jakub@redhat.com>
* dwarf.c (decode_location_expression): Handle DW_OP_stack_value

View File

@ -4878,35 +4878,35 @@ dwarf_select_sections_all (void)
struct dwarf_section_display debug_displays[] =
{
{ { ".debug_abbrev", ".zdebug_abbrev", NULL, NULL, 0, 0 },
display_debug_abbrev, &do_debug_abbrevs, 0, 0 },
display_debug_abbrev, &do_debug_abbrevs, 0 },
{ { ".debug_aranges", ".zdebug_aranges", NULL, NULL, 0, 0 },
display_debug_aranges, &do_debug_aranges, 1, 0 },
display_debug_aranges, &do_debug_aranges, 1 },
{ { ".debug_frame", ".zdebug_frame", NULL, NULL, 0, 0 },
display_debug_frames, &do_debug_frames, 1, 0 },
display_debug_frames, &do_debug_frames, 1 },
{ { ".debug_info", ".zdebug_info", NULL, NULL, 0, 0 },
display_debug_info, &do_debug_info, 1, 0 },
display_debug_info, &do_debug_info, 1 },
{ { ".debug_line", ".zdebug_line", NULL, NULL, 0, 0 },
display_debug_lines, &do_debug_lines, 1, 0 },
display_debug_lines, &do_debug_lines, 1 },
{ { ".debug_pubnames", ".zdebug_pubnames", NULL, NULL, 0, 0 },
display_debug_pubnames, &do_debug_pubnames, 0, 0 },
display_debug_pubnames, &do_debug_pubnames, 0 },
{ { ".eh_frame", "", NULL, NULL, 0, 0 },
display_debug_frames, &do_debug_frames, 1, 1 },
display_debug_frames, &do_debug_frames, 1 },
{ { ".debug_macinfo", ".zdebug_macinfo", NULL, NULL, 0, 0 },
display_debug_macinfo, &do_debug_macinfo, 0, 0 },
display_debug_macinfo, &do_debug_macinfo, 0 },
{ { ".debug_str", ".zdebug_str", NULL, NULL, 0, 0 },
display_debug_str, &do_debug_str, 0, 0 },
display_debug_str, &do_debug_str, 0 },
{ { ".debug_loc", ".zdebug_loc", NULL, NULL, 0, 0 },
display_debug_loc, &do_debug_loc, 1, 0 },
display_debug_loc, &do_debug_loc, 1 },
{ { ".debug_pubtypes", ".zdebug_pubtypes", NULL, NULL, 0, 0 },
display_debug_pubnames, &do_debug_pubnames, 0, 0 },
display_debug_pubnames, &do_debug_pubnames, 0 },
{ { ".debug_ranges", ".zdebug_ranges", NULL, NULL, 0, 0 },
display_debug_ranges, &do_debug_ranges, 1, 0 },
display_debug_ranges, &do_debug_ranges, 1 },
{ { ".debug_static_func", ".zdebug_static_func", NULL, NULL, 0, 0 },
display_debug_not_supported, NULL, 0, 0 },
display_debug_not_supported, NULL, 0 },
{ { ".debug_static_vars", ".zdebug_static_vars", NULL, NULL, 0, 0 },
display_debug_not_supported, NULL, 0, 0 },
display_debug_not_supported, NULL, 0 },
{ { ".debug_types", ".zdebug_types", NULL, NULL, 0, 0 },
display_debug_not_supported, NULL, 0, 0 },
display_debug_not_supported, NULL, 0 },
{ { ".debug_weaknames", ".zdebug_weaknames", NULL, NULL, 0, 0 },
display_debug_not_supported, NULL, 0, 0 }
display_debug_not_supported, NULL, 0 }
};

View File

@ -51,7 +51,6 @@ struct dwarf_section_display
int (*display) (struct dwarf_section *, void *);
int *enabled;
unsigned int relocate : 1;
unsigned int eh_frame : 1;
};
enum dwarf_section_display_enum {

View File

@ -2236,21 +2236,18 @@ dump_dwarf_section (bfd *abfd, asection *section,
&& debug_displays [i].enabled != NULL
&& *debug_displays [i].enabled)
{
if (!debug_displays [i].eh_frame)
struct dwarf_section *sec = &debug_displays [i].section;
if (strcmp (sec->uncompressed_name, match) == 0)
sec->name = sec->uncompressed_name;
else
sec->name = sec->compressed_name;
if (load_specific_debug_section (i, section, abfd))
{
struct dwarf_section *sec = &debug_displays [i].section;
if (strcmp (sec->uncompressed_name, match) == 0)
sec->name = sec->uncompressed_name;
else
sec->name = sec->compressed_name;
if (load_specific_debug_section (i, section, abfd))
{
debug_displays [i].display (sec, abfd);
if (i != info && i != abbrev)
free_debug_section (i);
}
debug_displays [i].display (sec, abfd);
if (i != info && i != abbrev)
free_debug_section (i);
}
break;
}