aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-12-03 12:28:37 +0000
committerNick Clifton <nickc@redhat.com>2009-12-03 12:28:37 +0000
commitf9f0e73285704b47d65e73890b8fb63dc7139460 (patch)
treefcfde6acb84866169655abd79c8576c0ca7dc6a1 /binutils/dwarf.c
parent8b7dbdc92350e95a77548f36c2b537018ca7d52b (diff)
downloadgdb-f9f0e73285704b47d65e73890b8fb63dc7139460.zip
gdb-f9f0e73285704b47d65e73890b8fb63dc7139460.tar.gz
gdb-f9f0e73285704b47d65e73890b8fb63dc7139460.tar.bz2
PR binutils/11045
* dwarf.c (do_debug_pubtypes): New variable. (dwarf_select_sections_by_names): Handle .debug_pubtypes. (dwarf_select_sections_by_letters): Add 't' for .debug_pubtype. (dwarf_select_sections_all): Set do_debug_pubtypes. (debug_displays): Add support for .debug_pubtypes. * dwarf.h (do_debug_pubtypes): Export. * objdump.c (usage): Add -wt or --dwarf=pubtypes. * readelf.c (usage): Likewise. (process_section_headers): Enable debug display if do_debug_pubtypes is set. * doc/binutils.texi: Document -wt/--dwarf=pubtypes option.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index ac37538..7e6cccb 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -45,6 +45,7 @@ int do_debug_info;
int do_debug_abbrevs;
int do_debug_lines;
int do_debug_pubnames;
+int do_debug_pubtypes;
int do_debug_aranges;
int do_debug_ranges;
int do_debug_frames;
@@ -4848,7 +4849,7 @@ dwarf_select_sections_by_names (const char *names)
{
const char * option;
int * variable;
- int val;
+ int val;
}
debug_dump_long_opts;
@@ -4867,6 +4868,7 @@ dwarf_select_sections_by_names (const char *names)
{ "loc", & do_debug_loc, 1 },
{ "macro", & do_debug_macinfo, 1 },
{ "pubnames", & do_debug_pubnames, 1 },
+ { "pubtypes", & do_debug_pubnames, 1 },
/* This entry is for compatability
with earlier versions of readelf. */
{ "ranges", & do_debug_aranges, 1 },
@@ -4941,6 +4943,10 @@ dwarf_select_sections_by_letters (const char *letters)
do_debug_pubnames = 1;
break;
+ case 't':
+ do_debug_pubtypes = 1;
+ break;
+
case 'r':
do_debug_aranges = 1;
break;
@@ -4980,6 +4986,7 @@ dwarf_select_sections_all (void)
do_debug_abbrevs = 1;
do_debug_lines = FLAG_DEBUG_LINES_RAW;
do_debug_pubnames = 1;
+ do_debug_pubtypes = 1;
do_debug_aranges = 1;
do_debug_ranges = 1;
do_debug_frames = 1;
@@ -5002,6 +5009,8 @@ struct dwarf_section_display debug_displays[] =
display_debug_lines, &do_debug_lines, 1 },
{ { ".debug_pubnames", ".zdebug_pubnames", NULL, NULL, 0, 0 },
display_debug_pubnames, &do_debug_pubnames, 0 },
+ { { ".debug_pubtypes", ".zdebug_pubtypes", NULL, NULL, 0, 0 },
+ display_debug_pubnames, &do_debug_pubtypes, 0 },
{ { ".eh_frame", "", NULL, NULL, 0, 0 },
display_debug_frames, &do_debug_frames, 1 },
{ { ".debug_macinfo", ".zdebug_macinfo", NULL, NULL, 0, 0 },
@@ -5011,7 +5020,7 @@ struct dwarf_section_display debug_displays[] =
{ { ".debug_loc", ".zdebug_loc", NULL, NULL, 0, 0 },
display_debug_loc, &do_debug_loc, 1 },
{ { ".debug_pubtypes", ".zdebug_pubtypes", NULL, NULL, 0, 0 },
- display_debug_pubnames, &do_debug_pubnames, 0 },
+ display_debug_pubnames, &do_debug_pubtypes, 0 },
{ { ".debug_ranges", ".zdebug_ranges", NULL, NULL, 0, 0 },
display_debug_ranges, &do_debug_ranges, 1 },
{ { ".debug_static_func", ".zdebug_static_func", NULL, NULL, 0, 0 },