Omit frame pointer? Any risk?

I always include this function in my compilers, it helps a lot in debugging when reading assembly code, which is cleaner. I think that this does not have a big impact on the speed optimization side, providing the opportunity for pipelining processors, but at least it opens up a new opportunity for register allocation, as such, getting a new free EBP register (not sure if compilers can use it , though )

My question is: is this approach safe? Have you ever experienced any features?

+2
source share
3 answers

If your software creates stack traces when it crashes, dropping the frame pointer may interfere with your work.

+2
source

I have never encountered problems with -fomit-frame-pointer on GCC. But it really makes debugging worse.

0
source

The Gentoo wiki notes that it fomit-frame-pointermay interfere with debugging. Otherwise, I do not think that there is a real risk.

0
source

Source: https://habr.com/ru/post/1539668/


All Articles