diff options
author | Nick Clifton <nickc@redhat.com> | 2009-12-03 12:28:37 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2009-12-03 12:28:37 +0000 |
commit | f9f0e73285704b47d65e73890b8fb63dc7139460 (patch) | |
tree | fcfde6acb84866169655abd79c8576c0ca7dc6a1 | |
parent | 8b7dbdc92350e95a77548f36c2b537018ca7d52b (diff) | |
download | binutils-gdb-f9f0e73285704b47d65e73890b8fb63dc7139460.tar.gz |
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.
-rw-r--r-- | binutils/ChangeLog | 15 | ||||
-rw-r--r-- | binutils/doc/binutils.texi | 16 | ||||
-rw-r--r-- | binutils/dwarf.c | 13 | ||||
-rw-r--r-- | binutils/dwarf.h | 1 | ||||
-rw-r--r-- | binutils/objdump.c | 4 | ||||
-rw-r--r-- | binutils/readelf.c | 7 |
6 files changed, 41 insertions, 15 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 13c917f4baf..5c430796536 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,18 @@ +2009-12-03 Nick Clifton <nickc@redhat.com> + + 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. + 2009-12-02 Jerker Bäck <jerker.back@gmail.com> PR binutils/11017 diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 84b63d75a27..77a8774e422 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -1700,8 +1700,8 @@ objdump [@option{-a}|@option{--archive-headers}] [@option{-r}|@option{--reloc}] [@option{-R}|@option{--dynamic-reloc}] [@option{-s}|@option{--full-contents}] - [@option{-W[lLiaprmfFsoR]}| - @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]] + [@option{-W[lLiaprmfFsoRt]}| + @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes]] [@option{-G}|@option{--stabs}] [@option{-t}|@option{--syms}] [@option{-T}|@option{--dynamic-syms}] @@ -2073,8 +2073,8 @@ This is the default when @option{--prefix-addresses} is used. Display @var{width} bytes on a single line when disassembling instructions. -@item -W[lLiaprmfFsoR] -@itemx --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges] +@item -W[lLiaprmfFsoRt] +@itemx --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes] @cindex DWARF @cindex debug symbols Displays the contents of the debug sections in the file, if any are @@ -3884,8 +3884,8 @@ readelf [@option{-a}|@option{--all}] [@option{-p} <number or name>|@option{--string-dump=}<number or name>] [@option{-R} <number or name>|@option{--relocated-dump=}<number or name>] [@option{-c}|@option{--archive-index}] - [@option{-w[lLiaprmfFsoR]}| - @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]] + [@option{-w[lLiaprmfFsoRt]}| + @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes]] [@option{-I}|@option{-histogram}] [@option{-v}|@option{--version}] [@option{-W}|@option{--wide}] @@ -4030,8 +4030,8 @@ Displays the file symbol index infomation contained in the header part of binary archives. Performs the same function as the @option{t} command to @command{ar}, but without using the BFD library. @xref{ar}. -@item -w[lLiaprmfFsoR] -@itemx --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges] +@item -w[lLiaprmfFsoRt] +@itemx --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes] Displays the contents of the debug sections in the file, if any are present. If one of the optional letters or words follows the switch then only data found in those specific sections will be dumped. diff --git a/binutils/dwarf.c b/binutils/dwarf.c index ac3753809d6..7e6cccb3654 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 }, diff --git a/binutils/dwarf.h b/binutils/dwarf.h index b39aba1ee53..3f68d4739aa 100644 --- a/binutils/dwarf.h +++ b/binutils/dwarf.h @@ -105,6 +105,7 @@ extern int do_debug_info; extern int do_debug_abbrevs; extern int do_debug_lines; extern int do_debug_pubnames; +extern int do_debug_pubtypes; extern int do_debug_aranges; extern int do_debug_ranges; extern int do_debug_frames; diff --git a/binutils/objdump.c b/binutils/objdump.c index e9fef40d0c7..42d8961b93d 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -200,9 +200,9 @@ usage (FILE *stream, int status) -g, --debugging Display debug information in object file\n\ -e, --debugging-tags Display debug information using ctags style\n\ -G, --stabs Display (in raw form) any STABS info in the file\n\ - -W[lLiaprmfFsoR] or\n\ + -W[lLiaprmfFsoRt] or\n\ --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,\n\ - =frames-interp,=str,=loc,=Ranges]\n\ + =frames-interp,=str,=loc,=Ranges,=pubtypes]\n\ Display DWARF info in the file\n\ -t, --syms Display the contents of the symbol table(s)\n\ -T, --dynamic-syms Display the contents of the dynamic symbol table\n\ diff --git a/binutils/readelf.c b/binutils/readelf.c index a2f85053af4..7f64da302f6 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -2990,9 +2990,9 @@ usage (FILE * stream) Dump the contents of section <number|name> as strings\n\ -R --relocated-dump=<number|name>\n\ Dump the contents of section <number|name> as relocated bytes\n\ - -w[lLiaprmfFsoR] or\n\ + -w[lLiaprmfFsoRt] or\n\ --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,\n\ - =frames-interp,=str,=loc,=Ranges]\n\ + =frames-interp,=str,=loc,=Ranges,=pubtypes]\n\ Display the contents of DWARF2 debug sections\n")); #ifdef SUPPORT_DISASSEMBLY fprintf (stream, _("\ @@ -4341,7 +4341,7 @@ process_section_headers (FILE * file) else if (section->sh_type == SHT_RELA) CHECK_ENTSIZE (section, i, Rela); else if ((do_debugging || do_debug_info || do_debug_abbrevs - || do_debug_lines || do_debug_pubnames + || do_debug_lines || do_debug_pubnames || do_debug_pubtypes || do_debug_aranges || do_debug_frames || do_debug_macinfo || do_debug_str || do_debug_loc || do_debug_ranges) && (const_strneq (name, ".debug_") @@ -4358,6 +4358,7 @@ process_section_headers (FILE * file) || (do_debug_abbrevs && streq (name, "abbrev")) || (do_debug_lines && streq (name, "line")) || (do_debug_pubnames && streq (name, "pubnames")) + || (do_debug_pubtypes && streq (name, "pubtypes")) || (do_debug_aranges && streq (name, "aranges")) || (do_debug_ranges && streq (name, "ranges")) || (do_debug_frames && streq (name, "frame")) |