jasonmolenda wrote:
(even when omit-frame-pointer codegen is being done, you can force a frame
pointer register to be used if you use a non-fixed stack frame size. On unix
alloca() will do this, or with modern C, a variable length array VLA. e.g.
`void foo(int size) { int array[size]; ... }` the size of the stack frame is
unknown at compile time, so the comiler will spill rbp, copy rsp into rbp, then
decrement rsp to make room for all the locals. And in the epilogue, it
restores the rbp value into rsp without needing to know the size of the stack
frame. I'm sure the Windows compiler does the same. VLA stack frames are so
uncommon there's no point in making a ArchDefaultUnwindPlan that assumes
they're in use, though.)
https://github.com/llvm/llvm-project/pull/210076
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits