[Lldb-commits] [lldb] [lldb][FreeBSDKernel] Implement trapframe unwinding (PR #192184)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 9 16:53:28 PDT 2026
jasonmolenda wrote:
@mchoo7 Hi, please include me in any future PRs related to unwinding like this. The transition between userland and kernel land via a syscall is a processor fault and the fault-catcher function in the kernel saves the register context in memory. (I work with macOS/Darwin systems and know exactly how it works there, but I expect most systems are similar) The correct way to get unwinds that cross this boundary are for the fault-catcher routine in the kernel (written in assembly) to have `.cfi` directives expressing where to find the saved register context via a non-volatile (aka callee-preserved) register. Then the unwinds work cleanly across the system call. You also see this (and it's more important) in kernel faults / timer interrupts entirely within kernel land.
https://github.com/llvm/llvm-project/pull/192184
More information about the lldb-commits
mailing list