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/test/python_api/sbvalue_persist/main.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/test/python_api/sbvalue_persist/main.cpp')
-rw-r--r-- | lldb/test/python_api/sbvalue_persist/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lldb/test/python_api/sbvalue_persist/main.cpp b/lldb/test/python_api/sbvalue_persist/main.cpp new file mode 100644 index 00000000000..650d87acd6e --- /dev/null +++ b/lldb/test/python_api/sbvalue_persist/main.cpp @@ -0,0 +1,14 @@ +#include <vector> +#include <string> + +void f() {} + +int main() { + int foo = 10; + int *bar = new int(4); + std::string baz = "85"; + + f(); // break here + f(); // break here + return 0; +}
\ No newline at end of file |