aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2010-05-24 13:21:26 +0000
committerTristan Gingold <gingold@adacore.com>2010-05-24 13:21:26 +0000
commit6f875884e04b91b36840b991ce4509f9bf560367 (patch)
tree28fa9eca59b72985af8adb70e06d7d6b5c3bc231 /binutils/readelf.c
parentce76e55c686af047b1b06695e8c9365d9529195b (diff)
downloadgdb-6f875884e04b91b36840b991ce4509f9bf560367.zip
gdb-6f875884e04b91b36840b991ce4509f9bf560367.tar.gz
gdb-6f875884e04b91b36840b991ce4509f9bf560367.tar.bz2
2010-05-24 Tristan Gingold <gingold@adacore.com>
* readelf.c (usage): Add new trace sections for --debug-dump. (process_section_headers): Handle dump of trace sections. * objdump.c (usage): Add new trace sections for --dwarf. * dwarf.h (do_trace_info, do_trace_abbrevs): New variables. (do_trace_aranges): Ditto. (enum dwarf_section_display_enum): Add trace_info, trace_abbrev and trace_aranges literals. * dwarf.c (do_trace_info, do_trace_abbrevs): New variables. (do_trace_aranges): Ditto. (process_debug_info): Add abbrev_sec argument and replace abbrev with abbrev_sec. (load_debug_info): Adjust call of process_debug_info. (display_debug_info): Ditto. (display_trace_info): New function. (dwarf_select_sections_by_names): Add trace_info, trace_abbrevs and trace_aranges sections name. (dwarf_select_sections_all): Also select trace sections. (debug_displays): Reindent. Add entries for the trace sections. * doc/binutils.texi (readelf): Document new --dwarf parameters. (objdump): Ditto.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index bcb24c2..9c3e2dc 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3141,7 +3141,8 @@ usage (FILE * stream)
Dump the contents of section <number|name> as relocated bytes\n\
-w[lLiaprmfFsoRt] or\n\
--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,\n\
- =frames-interp,=str,=loc,=Ranges,=pubtypes]\n\
+ =frames-interp,=str,=loc,=Ranges,=pubtypes,\n\
+ =trace_info,=trace_abbrev,=trace_aranges]\n\
Display the contents of DWARF2 debug sections\n"));
#ifdef SUPPORT_DISASSEMBLY
fprintf (stream, _("\
@@ -4539,6 +4540,21 @@ process_section_headers (FILE * file)
request_dump_bynumber (i, DEBUG_DUMP);
else if (do_debug_frames && streq (name, ".eh_frame"))
request_dump_bynumber (i, DEBUG_DUMP);
+ /* Trace sections for Itanium VMS. */
+ else if ((do_debugging || do_trace_info || do_trace_abbrevs
+ || do_trace_aranges)
+ && const_strneq (name, ".trace_"))
+ {
+ name += sizeof (".trace_") - 1;
+
+ if (do_debugging
+ || (do_trace_info && streq (name, "info"))
+ || (do_trace_abbrevs && streq (name, "abbrev"))
+ || (do_trace_aranges && streq (name, "aranges"))
+ )
+ request_dump_bynumber (i, DEBUG_DUMP);
+ }
+
}
if (! do_sections)