diff options
author | Enrico Granata <egranata@apple.com> | 2014-12-08 23:13:56 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2014-12-08 23:13:56 +0000 |
commit | 0c10a85000074f1e8ac0fa88c853ede7b45818d4 (patch) | |
tree | dde9dd18ac5ece1dcde76e8e67638baa44d270ed /lldb/source/Expression/ClangExpressionVariable.cpp | |
parent | f5b4d655d2de3fcc7b89eb33aef5a95e01aefdb9 (diff) | |
download | bcm5719-llvm-0c10a85000074f1e8ac0fa88c853ede7b45818d4.tar.gz bcm5719-llvm-0c10a85000074f1e8ac0fa88c853ede7b45818d4.zip |
Add the ability for an SBValue to create a persisted version of itself.
Such a persisted version is equivalent to evaluating the value via the expression evaluator, and holding on to the $n result of the expression, except this API can be used on SBValues that do not obviously come from an expression (e.g. are the result of a memory lookup)
Expose this via SBValue::Persist() in our public API layer, and ValueObject::Persist() in the lldb_private layer
Includes testcase
Fixes rdar://19136664
llvm-svn: 223711
Diffstat (limited to 'lldb/source/Expression/ClangExpressionVariable.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionVariable.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Expression/ClangExpressionVariable.cpp b/lldb/source/Expression/ClangExpressionVariable.cpp index c3eae41473e..e86016e53a7 100644 --- a/lldb/source/Expression/ClangExpressionVariable.cpp +++ b/lldb/source/Expression/ClangExpressionVariable.cpp @@ -28,6 +28,17 @@ ClangExpressionVariable::ClangExpressionVariable(ExecutionContextScope *exe_scop { } +ClangExpressionVariable::ClangExpressionVariable (ExecutionContextScope *exe_scope, + Value &value, + const ConstString &name, + uint16_t flags) : + m_parser_vars(), + m_jit_vars (), + m_flags (flags), + m_frozen_sp (ValueObjectConstResult::Create (exe_scope, value, name)) +{ +} + ClangExpressionVariable::ClangExpressionVariable (const lldb::ValueObjectSP &valobj_sp) : m_parser_vars(), m_jit_vars (), |