[Lldb-commits] [lldb] Make result variables obey their dynamic values in subsequent expressions (PR #168611)

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 18 09:40:34 PST 2025


================
@@ -37,6 +37,72 @@ char PersistentExpressionState::ID;
 
 PersistentExpressionState::PersistentExpressionState() = default;
 
+void ExpressionVariable::TransferAddress(bool force) {
+  if (!m_live_sp)
+    return;
+
+  if (!m_frozen_sp)
+    return;
+
+  if (force || (m_frozen_sp->GetLiveAddress() == LLDB_INVALID_ADDRESS)) {
+    lldb::addr_t live_addr = m_live_sp->GetLiveAddress();
+    m_frozen_sp->SetLiveAddress(live_addr);
----------------
kastiglione wrote:

@jimingham should there be a check that `live_addr` is not also `LLDB_INVALID_ADDRESS`?

https://github.com/llvm/llvm-project/pull/168611


More information about the lldb-commits mailing list