When we can the instructions of an AArch64 to create an unwind plan, and we see an instruction to add a value to $fp and assign it to $sp, lldb recognizes this as meaning that CFA is now set in terms of $sp. e.g.
28: 0xd10043bf sub sp, x29, #0x10
32: 0xa9417bfd ldp x29, x30, [sp, #0x10]
This is a common method used in clang codegen. But clang will sometimes overwrite $fp by restoring it from the stack, to the caller's $fp value. At this point, lldb is still expressing the CFA in terms of $fp but $fp is now the caller's $fp and our CFA value changes, which can confuse the stepper algorithms.
This change recognizes the restoring of $fp to mean the CFA should switch back to $sp. e.g.
12: 0xa9417bfd ldp x29, x30, [sp, #0x10]
16: 0x910083ff add sp, sp, #0x20
Backtraces are not impacted; we get all of the register values correct, but because the CFA changes, stepping algorithms can get confused and stop in the middle of the epilogue.