[Lldb-commits] [lldb] [lldb/aarch64] Fix unwinding when signal interrupts a leaf function (PR #91321)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Thu May 9 05:04:00 PDT 2024


labath wrote:

> This looks good to me, I know there are other codepaths that handle this correctly, where we can backtrace out of a frameless function that faults into a trap handler and we have the entire register state available in the trap handler.
> 
> Looking at this, I'm a little uncertain why we have `m_behaves_like_zeroth_frame` and `m_all_registers_available` which are both set to true under the same conditions, and then we sometimes use `m_behaves_like_zeroth_frame`, sometimes `m_all_registers_available `, and sometimes call `RegisterContextUnwind::BehavesLikeZerothFrame` which has a redundant check if the frame number is 0, sigh. Looks like some accumulated nonsense that you shouldn't have to deal with in this patch.

Thanks for the review. I see that the new test is failing on green dragon <https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/3596/testReport/lldb-shell/Unwind/signal_in_leaf_function_aarch64_test/>, and from the looks of it, it is failing because it is failing to unwind in the test scenario (I don't have aarch64 mac hardware to confirm). What do you want me to do about this? Disable the test on mac and file a bug?

https://github.com/llvm/llvm-project/pull/91321


More information about the lldb-commits mailing list