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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to