Add the ability for an SBValue to create a persisted version of itself.
authorEnrico Granata <egranata@apple.com>
Mon, 8 Dec 2014 23:13:56 +0000 (23:13 +0000)
committerEnrico Granata <egranata@apple.com>
Mon, 8 Dec 2014 23:13:56 +0000 (23:13 +0000)
commit0c10a85000074f1e8ac0fa88c853ede7b45818d4
treedde9dd18ac5ece1dcde76e8e67638baa44d270ed
parentf5b4d655d2de3fcc7b89eb33aef5a95e01aefdb9
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
12 files changed:
lldb/include/lldb/API/SBValue.h
lldb/include/lldb/Core/ValueObject.h
lldb/include/lldb/Core/ValueObjectConstResult.h
lldb/include/lldb/Expression/ClangExpressionVariable.h
lldb/scripts/Python/interface/SBValue.i
lldb/source/API/SBValue.cpp
lldb/source/Core/ValueObject.cpp
lldb/source/Core/ValueObjectConstResult.cpp
lldb/source/Expression/ClangExpressionVariable.cpp
lldb/test/python_api/sbvalue_persist/Makefile [new file with mode: 0644]
lldb/test/python_api/sbvalue_persist/TestSBValuePersist.py [new file with mode: 0644]
lldb/test/python_api/sbvalue_persist/main.cpp [new file with mode: 0644]