OSDN Git Service

PR binutils/11045
authornickc <nickc>
Thu, 3 Dec 2009 21:28:36 +0000 (21:28 +0000)
committernickc <nickc>
Thu, 3 Dec 2009 21:28:36 +0000 (21:28 +0000)
        * 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.

binutils/ChangeLog
binutils/doc/binutils.texi
binutils/dwarf.c
binutils/dwarf.h
binutils/objdump.c
binutils/readelf.c

index 13c917f..5c43079 100644 (file)
@@ -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
index 84b63d7..77a8774 100644 (file)
@@ -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.
index ac37538..7e6cccb 100644 (file)
@@ -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 },
index b39aba1..3f68d47 100644 (file)
@@ -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;
index e9fef40..42d8961 100644 (file)
@@ -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\
index a2f8505..7f64da3 100644 (file)
@@ -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"))