您的位置:首页 > 运维架构 > Linux

Linux addr2line命令

2015-06-21 14:47 309 查看
一、简介

Addr2line(它是标准的GNUBinutils中的一部分)是一个可以将指令的地址和可执行映像转换成文件名、函数名和源代码行数的工具。这种功能对于将跟踪地址转换成更有意义的内容来说简直是太棒了。

二、选项

Usage:addr2line[option(s)][addr(s)]
Convertaddressesintolinenumber/filenamepairs.
Ifnoaddressesarespecifiedonthecommandline,theywillbereadfromstdin
Theoptionsare:
@<file>Readoptionsfrom<file>
-a--addressesShowaddresses
-b--target=<bfdname>Setthebinaryfileformat
-e--exe=<executable>Settheinputfilename(defaultisa.out)
-i--inlinesUnwindinlinedfunctions
-j--section=<name>Readsection-relativeoffsetsinsteadofaddresses
-p--pretty-printMaketheoutputeasiertoreadforhumans
-s--basenamesStripdirectorynames
-f--functionsShowfunctionnames
-C--demangle[=style]Demanglefunctionnames
-h--helpDisplaythisinformation
-v--versionDisplaytheprogram'sversion


三、实例

http://blog.csdn.net/whz_zb/article/details/7604760
http://www.linuxidc.com/Linux/2011-05/35780.htm
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: