本文介绍了帧指针省略?任何风险?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是打开这个功能在我的编译器,它有助于在调试时阅读通过汇编代码,更干净。我认为它没有对速度优化方面有很大的影响,给CPU的能力管道,但至少它开启了一个新的机会,寄存器分配,因此,获得一个新的免费注册EBP(不知道如果编译器可能使用它)

I do always turn on this feature in my compilers, it helps a lot in debugging while reading through the assembly code which is more clean. I think it doesnt have a big impact on speed optimization side, giving CPUs ability to pipelining, but at least it does open a new opportunity for register allocation, as such, gaining a new free register EBP (not sure if compilers might use it though)

我的问题是:这种方法是否安全?你曾经遇到过任何特殊性吗?

My question is: Is this approach safe anymore ? have you ever encoutered any peculiarities ?

推荐答案

如果你的软件崩溃时产生堆栈跟踪,省略框架指针可以防止它工作。

If your software produces stack traces when it crashes, omitting the frame pointer can prevent that from working.

这篇关于帧指针省略?任何风险?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 17:42