[Lldb-commits] [lldb] [lldb] Don't trust unwind information for outlined functions (PR #204500)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 18 01:59:11 PDT 2026
================
@@ -868,6 +868,41 @@ RegisterContextUnwind::GetFullUnwindPlanForFrame() {
return arch_default_unwind_plan_sp;
}
+ // Function outlining is a clang feature where common blocks of instructions
+ // from separate functions can be put in a separate utility function, and
+ // the original functions call into the utility function to execute them,
+ // resulting in fewer bytes used for the code section overall.
+ //
+ // The call to the OUTLINED_FUNCTION may not be a normal ABI call (e.g.
+ // on RISCV it might be called `jal t0, OUTLINED_FUNCTION_<nn>` putting the
+ // return address in a temporary register instead of $ra). Tthe unwind
+ // instructions in eh_frame/debug_frame are not correct today for an
+ // OUTLINED_FUNCTION, even when a normal ABI call is made.
+ // Clang does not insert CFI directives in the OUTLINED_FUNCTION so it
----------------
DavidSpickett wrote:
Is there an issue anywhere for this? I didn't see one surprisingly.
Or is this "fine" because it's frameless (fine from a compiler POV at least).
https://github.com/llvm/llvm-project/pull/204500
More information about the lldb-commits
mailing list