Comment by codeflo
10 months ago
All of this information is static, there's no need to sacrifice a whole CPU register only to store data that's already known. A simple lookup data structure that maps an instruction address range to the stack offset of the return address should be enough to recover the stack layout. On Windows, you'd precompute that from PDB files, I'm sure you can do the same thing with whatever the equivalent debug data structure is on Linux.
It isn't entirely static because of alloca().
Banning alloca() would make more sense than re-enabling frame pointers.
At least re-enabling FPs is possible.
[deleted]