Unix-commands-addr2line

提供:Dev Guides
移動先:案内検索

addr2line-Unix、Linuxコマンド

link:/unix_commands/index [previous] link:/unix_commands/index [next] [[1]] php [AddThis Social Bookmark Button]

NAME

概要

*-b * *bfdname -target = * *bfdname -C—​demangle * *style -e * *filename -exe = * *filename -f—​functions- s—​basename-i—​inlines-j—​section = * *name -H—​help-V—​version *

説明

*addr2line*

使用する実行可能または再配置可能なオブジェクトは、-e *オプションで指定されます。 デフォルトは_a.out_ファイルです。 使用する再配置可能オブジェクトのセクションは、-j *オプションで指定されます。

*addr2line* には2つの動作モードがあります。

最初の例では、16進アドレスがコマンドラインで指定され、 addr2line は各アドレスのファイル名と行番号を表示します。

2番目の例では、 addr2line は標準入力から16進アドレスを読み取り、各アドレスのファイル名と行番号を標準出力に出力します。 このモードでは、パイプで addr2line を使用して、動的に選択されたアドレスを変換できます。

出力の形式は FILENAME:LINENO です。 各アドレスのファイル名と行番号は、別々の行に印刷されます。 -f オプションを使用すると、各 FILENAME:LINENO 行の前に、アドレスを含む関数の名前である FUNCTIONNAME 行が続きます。

ファイル名または関数名が判別できない場合、 addr2line はその場所に2つの疑問符を出力します。 行番号を特定できない場合、 addr2line は0を出力します。

オプション

Tag Description
-b bfdname
--target=bfdname Specify that the object-code format for the object files is bfdname.
-C
--demangle[=style*]* Decode (demangle) low-level symbol names into user-level names. Besides removing any initial underscore prepended by the system, this makes C++ function names readable. Different compilers have different mangling styles. The optional demangling style argument can be used to choose an appropriate demangling style for your compiler.
-e filename
--exe=filename Specify the name of the executable for which addresses should be translated. The default file is a.out.
-f
--functions Display function names as well as file and line number information.
-s
--basenames Display only the base of each file name.
-i
--inlines If the address belongs to a function that was inlined, the source information for all enclosing scopes back to the first non-inlined function will also be printed. For example, if main inlines callee1 which inlines callee2, and address is from callee2, the source information for callee1 and main will also be printed.
-j
--section Read offsets relative to the specified section instead of absolute addresses.
@file

Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed.

_file_のオプションは空白で区切られます。 空白文字は、オプション全体を一重引用符または二重引用符で囲むことにより、オプションに含めることができます。 バックスラッシュを含む文字にプレフィックスを付けることにより、任意の文字(バックスラッシュを含む)を含めることができます。 _file_自体に追加の@_file_オプションが含まれる場合があります。そのようなオプションはすべて再帰的に処理されます。

関連項目

binutils

著作権

GNU Free Documentation License、バージョン1.1、またはFree Software Foundationによって公開されたそれ以降のバージョンの条件の下で、この文書をコピー、配布、および/または変更する許可が与えられます。不変セクション、フロントカバーテキスト、バックカバーテキストはありません。 ライセンスのコピーは、GNU Free Documentation Licenseというセクションに含まれています。 リンク:/unix_commands/index [previous]リンク:/unix_commands/index [next]リンク:/cgi-bin/printversion.cgi?tutorial = unix_commands&file = addr2line [Printer Friendly]

  
Advertisements