From fd2f003344354839663892f45f831a2dbfb71f17 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 28 Apr 2011 17:23:17 +0000 Subject: * NEWS: Add note about --dwarf-depth, --dwarf-start, and dwarf-mode.el. * objdump.c (suppress_bfd_header): New global. (usage): Update. (OPTION_DWARF_DEPTH, OPTION_DWARF_START): New constants. (options): Add dwarf-depth and dwarf-start entries. (dump_bfd): Use suppress_bfd_header. (main): Handle OPTION_DWARF_START, OPTION_DWARF_DEPTH. * doc/binutils.texi (objcopy): Document --dwarf-depth and --dwarf-start. (readelf): Likewise. * dwarf-mode.el: New file. * dwarf.c (dwarf_cutoff_level, dwarf_start_die): New globals. (read_and_display_attr_value): Also check debug_info_p. (process_debug_info): Handle dwarf_start_die and dwarf_cutoff_level. * dwarf.h (dwarf_cutoff_level, dwarf_start_die): Declare. * readelf.c (usage): Update. (OPTION_DWARF_DEPTH): New macro. (OPTION_DWARF_START): Likewise. (options): Add dwarf-depth and dwarf-start entries. (parse_args): Handle OPTION_DWARF_START and OPTION_DWARF_DEPTH. testsuite * binutils-all/objdump.W: Correct output. --- binutils/doc/binutils.texi | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'binutils/doc') diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 45a7ff7..08e1c4e 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -1076,6 +1076,8 @@ objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}] [@option{--subsystem=}@var{which}:@var{major}.@var{minor}] [@option{--compress-debug-sections}] [@option{--decompress-debug-sections}] + [@option{--dwarf-depth=@var{n}}] + [@option{--dwarf-start=@var{n}}] [@option{-v}|@option{--verbose}] [@option{-V}|@option{--version}] [@option{--help}] [@option{--info}] @@ -2129,6 +2131,28 @@ then only data found in those specific sections will be dumped. Note that there is no single letter option to display the content of trace sections or .gdb_index. +Note: the output from the @option{=info} option can also be affected +by the options @option{--dwarf-depth} and @option{--dwarf-start}. + +@item --dwarf-depth=@var{n} +Limit the dump of the @code{.debug_info} section to @var{n} children. +This is only useful with @option{--dwarf=info}. The default is +to print all DIEs; the special value 0 for @var{n} will also have this +effect. + +With a non-zero value for @var{n}, DIEs at or deeper than @var{n} +levels will not be printed. The range for @var{n} is zero-based. + +@item --dwarf-start=@var{n} +Print only DIEs beginning with the DIE numbered @var{n}. This is only +useful with @option{--dwarf=info}. + +If specified, this option will suppress printing of any header +information and all DIEs before the DIE numbered @var{n}. Only +siblings and children of the specified DIE will be printed. + +This can be used in conjunction with @option{--dwarf-depth}. + @item -G @itemx --stabs @cindex stab @@ -3957,6 +3981,8 @@ readelf [@option{-a}|@option{--all}] [@option{-c}|@option{--archive-index}] [@option{-w[lLiaprmfFsoRt]}| @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]] + [@option{--dwarf-depth=@var{n}}] + [@option{--dwarf-start=@var{n}}] [@option{-I}|@option{--histogram}] [@option{-v}|@option{--version}] [@option{-W}|@option{--wide}] @@ -4124,6 +4150,28 @@ Note: the @option{=frames-interp} option will display the interpreted contents of a .debug_frame section whereas the @option{=frames} option dumps the contents in a raw format. +Note: the output from the @option{=info} option can also be affected +by the options @option{--dwarf-depth} and @option{--dwarf-start}. + +@item --dwarf-depth=@var{n} +Limit the dump of the @code{.debug_info} section to @var{n} children. +This is only useful with @option{--debug-dump=info}. The default is +to print all DIEs; the special value 0 for @var{n} will also have this +effect. + +With a non-zero value for @var{n}, DIEs at or deeper than @var{n} +levels will not be printed. The range for @var{n} is zero-based. + +@item --dwarf-start=@var{n} +Print only DIEs beginning with the DIE numbered @var{n}. This is only +useful with @option{--debug-dump=info}. + +If specified, this option will suppress printing of any header +information and all DIEs before the DIE numbered @var{n}. Only +siblings and children of the specified DIE will be printed. + +This can be used in conjunction with @option{--dwarf-depth}. + @item -I @itemx --histogram Display a histogram of bucket list lengths when displaying the contents -- cgit v1.1