CFI support for GNU assembler (GAS)

来源:互联网 发布:游戏编程 培训机构 编辑:程序博客网 时间:2024/06/05 00:31
http://www.logix.cz/michal/devel/gas-cfi/
CFI support for GNU assembler (GAS)
 
Modern ABIs don't require frame pointers to be used in functions. However missing FPs bring
 difficulties when doing a backtrace. One solution is to provide Dwarf-2 CFI data for each such
  function. This can be easily done for example by GCC in it's output, but isn't that easy to
  write by hand for pure assembler functions.

With the help of these .cfi_* directives one can add appropriate unwind info into his asm source
 without too much trouble.

Directives implemented so far:
 

.cfi_startproc
    Use at the beginning of each function.
    It initializes some internal data structures and emits initial CFI instructions.
.cfi_endproc
    Opens .eh_frame, generates appropriate binary structures (CIE, FDE) and sets up relocation records.
.cfi_def_cfa reg,imm
    Set a rule for computing CFA to: take content of register reg and add imm to it.
.cfi_def_cfa_register reg
    Change rule for CFA to use reg. Offset remains the same.
.cfi_def_cfa_offset imm
    Change rule for CFA to use offset imm. Register remains the same.
.cfi_adjust_cfa_offset imm
    Like the previous one but imm is a relative value that will be added
  to current offset instead of an absolute value as in .cfi_def_cfa_offset.
.cfi_offset reg,imm
    Generate a rule saying that register reg is saved at offset imm from CFA.
 
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(474) | 评论(0) | 转发(0) |
0

上一篇:CPU如何操作内存?

下一篇:安装使用oprofile

相关热门文章
  • socket中的短连接与长连接,心...
  • Haproxy、Keepalived双主高可...
  • Tomcat的性能与最大并发(1000)...
  • Nginx深入详解之日志
  • socket编程的同步、异步与阻塞...
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
原创粉丝点击