Right now SBValue::Persist() works properly only for values that refere to variables (refer to unit-tests for an example). Constant values (e.g. values created by EvaluateExpression or CreateValueFromData) can be persisted, but using them in the expressions leads to an error:
>>> v = lldb.frame.EvaluateExpression("1+2")
>>> vp = v.Persist()
>>> vp.GetName()
'$1'
>>> v = lldb.frame.EvaluateExpression("$1")
>>> v.GetValue()
'3'
>>> v = lldb.frame.EvaluateExpression("$1+1")
>>> v.GetError().GetCString()
"error: supposed to interpret, but failed: Interpreter couldn't read from memory\n"In this patch we mark constant values as "required materialization" and fix up the dematerialization logic to apply side-effects.
Also move Windows-failing use cases to a separate test, so that other tests can be executed on Windows too.
clang-tidy: error: 'lldb/Core/ValueObject.h' file not found [clang-diagnostic-error]
not useful