[Lldb-commits] [lldb] [lldb] Add constant value mode for RegisterLocation in UnwindPlans (PR #100624)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 25 15:23:33 PDT 2024
https://github.com/jasonmolenda approved this pull request.
This looks good to me. One small nit on the Dump method.
As a bit of background, this would be very unusual for a normal UnwindPlan that is reused for a function in many different contexts (different places on the stack during the program runtime). Felipe is dealing with the special case when the Swift LanguageRuntime creates an UnwindPlan that is used *once* in a given stack, and not saved in the UnwindTable for this Module. Felipe could have constructed a DWARF expression, where the register value was stored in memory, or a DWARF expression with a constant value, but then we'd need to add a `DataBufferSP` to the `RegisterLocation` to have ownership of this heap-allocated dwarf expression, in addition to hand-creating the DWARF expression bytecodes. It was a lot more straightforward to add this type of "this register is value x" for this one-shot UnwindPlan's that a LanguageRuntime can provide.
https://github.com/llvm/llvm-project/pull/100624
More information about the lldb-commits
mailing list