免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1431 | 回复: 0
打印 上一主题 下一主题

[学习分享] Linux addr2line命令 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-06-23 14:19 |只看该作者 |倒序浏览
一、简介

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



二、选项
  1. Usage: addr2line [option(s)] [addr(s)]
  2. Convert addresses into line number/file name pairs.
  3. If no addresses are specified on the command line, they will be read from stdin
  4. The options are:
  5.   @<file>                Read options from <file>
  6.   -a --addresses         Show addresses
  7.   -b --target=<bfdname>  Set the binary file format
  8.   -e --exe=<executable>  Set the input file name (default is a.out)
  9.   -i --inlines           Unwind inlined functions
  10.   -j --section=<name>    Read section-relative offsets instead of addresses
  11.   -p --pretty-print      Make the output easier to read for humans
  12.   -s --basenames         Strip directory names
  13.   -f --functions         Show function names
  14.   -C --demangle[=style]  Demangle function names
  15.   -h --help              Display this information
  16.   -v --version           Display the program's version
复制代码
三、实例
http://blog.csdn.net/whz_zb/article/details/7604760

http://www.linuxidc.com/Linux/2011-05/35780.htm
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP