llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Jason Molenda (jasonmolenda)

<details>
<summary>Changes</summary>

The UnwindPlan class has getter and setter methods for specifying an abstract 
register location, but it doesn't have a setter for a DWARF Expression register 
location.  This hasn't been needed for any of the UnwindPlans that we do in 
mainline lldb yet, but it is used in the Swift language SwiftLanguageRuntime 
plugin which creates UnwindPlan for async functions.  While it's currently 
unused on main branch, this is a straightforward setter in the same form as the 
others, the only caveat being that it doesn't own the dwarf expression bytes, 
it has a pointer to them.

---
Full diff: https://github.com/llvm/llvm-project/pull/109751.diff


1 Files Affected:

- (modified) lldb/include/lldb/Symbol/UnwindPlan.h (+7) 


``````````diff
diff --git a/lldb/include/lldb/Symbol/UnwindPlan.h 
b/lldb/include/lldb/Symbol/UnwindPlan.h
index a1d00f2d2c0cd1..e1567c7357d0b5 100644
--- a/lldb/include/lldb/Symbol/UnwindPlan.h
+++ b/lldb/include/lldb/Symbol/UnwindPlan.h
@@ -370,6 +370,13 @@ class UnwindPlan {
 
     bool SetRegisterLocationToSame(uint32_t reg_num, bool must_replace);
 
+    /// This method does not make a copy of the \a opcodes memory, it is
+    /// assumed to have the same lifetime as the Module this UnwindPlan will
+    /// be registered in.
+    bool SetRegisterLocationToIsDWARFExpression(uint32_t reg_num,
+                                                const uint8_t *opcodes,
+                                                uint32_t len, bool 
can_replace);
+
     bool SetRegisterLocationToIsConstant(uint32_t reg_num, uint64_t constant,
                                          bool can_replace);
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/109751
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to