关于.cfl指令的简单介绍
2014-03-28 19:42
260 查看
Modern ABIs don't require frame pointers to be usedin functions. However missing FPs bring difficulties when doing a backtrace.One solution is to provide Dwarf-2 CFI data for each suchfunction. 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_* directivesone can add appropriate unwind info into his asm source without too muchtrouble.
Directives implemented so far:
.cfi_startproc
Use at thebeginning of each function. It initializes some internal data structures andemits initial CFI instructions.
.cfi_endproc
Opens .eh_frame,generates appropriate binary structures (CIE, FDE) and sets up relocationrecords.
.cfi_def_cfa reg,imm
Set a rule forcomputing CFA to: take content of register reg and add imm toit.
.cfi_def_cfa_register reg
Change rule forCFA to use reg. Offset remains the same.
.cfi_def_cfa_offset imm
Change rule forCFA to use offset imm. Register remains the same.
.cfi_adjust_cfa_offset imm
Like the previousone but imm is a relative value that will be added to currentoffset instead of an absolute value as in .cfi_def_cfa_offset.
.cfi_offset reg,imm
Generate a rulesaying that register reg is saved at offset imm fromCFA.
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_* directivesone can add appropriate unwind info into his asm source without too muchtrouble.
Directives implemented so far:
.cfi_startproc
Use at thebeginning of each function. It initializes some internal data structures andemits initial CFI instructions.
.cfi_endproc
Opens .eh_frame,generates appropriate binary structures (CIE, FDE) and sets up relocationrecords.
.cfi_def_cfa reg,imm
Set a rule forcomputing CFA to: take content of register reg and add imm toit.
.cfi_def_cfa_register reg
Change rule forCFA to use reg. Offset remains the same.
.cfi_def_cfa_offset imm
Change rule forCFA to use offset imm. Register remains the same.
.cfi_adjust_cfa_offset imm
Like the previousone but imm is a relative value that will be added to currentoffset instead of an absolute value as in .cfi_def_cfa_offset.
.cfi_offset reg,imm
Generate a rulesaying that register reg is saved at offset imm fromCFA.
相关文章推荐
- ATM关于数据安全的简单介绍
- java关于Tcp网络通讯简单介绍
- iOS开发关于微信摇一摇功能的简单的介绍
- 03--MySQL自学教程:MySQL安装后的目录结构介绍和简单语法指令
- sql server中关于批处理与脚本的简单介绍
- 从零开始前端学习[4]:关于html5文本文件的一些简单介绍
- Java关于排序的介绍1-简单排序
- 关于kotlin的简单介绍
- 关于POVIT的简单介绍
- 关于划分树的简单介绍
- 关于vim/vi简单介绍
- 关于angularJs指令的Scope(作用域)介绍
- ATM关于数据安全的简单介绍。
- C#关于控件随窗体的改变而自动调整大小并且能重新定位的一些简单介绍和控件随窗体改变自适应类
- 关于HANA简单介绍
- 关于session cookie的简单介绍及 session会话的简单运用
- 黑马程序员—OC(关于OC的一些简单介绍及使用)
- 关于SeekBar的简单介绍
- 关于eas bos 查询实体简单介绍
- 关于keystore的简单介绍