diff options
author | Jim Ingham <jingham@apple.com> | 2011-04-22 23:53:53 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-04-22 23:53:53 +0000 |
commit | 58b59f9522a0aafd4c2efe0781a9c88f005b7e00 (patch) | |
tree | 5e036735ce45e937a4d7f19579f0034ea2b6be00 /lldb/source/Core/ValueObjectConstResult.cpp | |
parent | 0ff2b2eda3509727fdb93e2b7f45ace85c4b3767 (diff) | |
download | bcm5719-llvm-58b59f9522a0aafd4c2efe0781a9c88f005b7e00.tar.gz bcm5719-llvm-58b59f9522a0aafd4c2efe0781a9c88f005b7e00.zip |
Fix up how the ValueObjects manage their life cycle so that you can hand out a shared
pointer to a ValueObject or any of its dependent ValueObjects, and the whole cluster will
stay around as long as that shared pointer stays around.
llvm-svn: 130035
Diffstat (limited to 'lldb/source/Core/ValueObjectConstResult.cpp')
-rw-r--r-- | lldb/source/Core/ValueObjectConstResult.cpp | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/lldb/source/Core/ValueObjectConstResult.cpp b/lldb/source/Core/ValueObjectConstResult.cpp index ff5d265a4f8..fbb35eb42aa 100644 --- a/lldb/source/Core/ValueObjectConstResult.cpp +++ b/lldb/source/Core/ValueObjectConstResult.cpp @@ -26,6 +26,19 @@ using namespace lldb; using namespace lldb_private; +ValueObjectSP +ValueObjectConstResult::Create +( + ExecutionContextScope *exe_scope, + ByteOrder byte_order, + uint32_t addr_byte_size +) +{ + return (new ValueObjectConstResult (exe_scope, + byte_order, + addr_byte_size))->GetSP(); +} + ValueObjectConstResult::ValueObjectConstResult ( ExecutionContextScope *exe_scope, @@ -44,6 +57,23 @@ ValueObjectConstResult::ValueObjectConstResult m_pointers_point_to_load_addrs = true; } +ValueObjectSP +ValueObjectConstResult::Create +( + ExecutionContextScope *exe_scope, + clang::ASTContext *clang_ast, + void *clang_type, + const ConstString &name, + const DataExtractor &data +) +{ + return (new ValueObjectConstResult (exe_scope, + clang_ast, + clang_type, + name, + data))->GetSP(); +} + ValueObjectConstResult::ValueObjectConstResult ( ExecutionContextScope *exe_scope, @@ -67,6 +97,27 @@ ValueObjectConstResult::ValueObjectConstResult m_pointers_point_to_load_addrs = true; } +ValueObjectSP +ValueObjectConstResult::Create +( + ExecutionContextScope *exe_scope, + clang::ASTContext *clang_ast, + void *clang_type, + const ConstString &name, + const lldb::DataBufferSP &data_sp, + lldb::ByteOrder data_byte_order, + uint8_t data_addr_size +) +{ + return (new ValueObjectConstResult (exe_scope, + clang_ast, + clang_type, + name, + data_sp, + data_byte_order, + data_addr_size))->GetSP(); +} + ValueObjectConstResult::ValueObjectConstResult ( ExecutionContextScope *exe_scope, @@ -94,6 +145,27 @@ ValueObjectConstResult::ValueObjectConstResult m_pointers_point_to_load_addrs = true; } +ValueObjectSP +ValueObjectConstResult::Create +( + ExecutionContextScope *exe_scope, + clang::ASTContext *clang_ast, + void *clang_type, + const ConstString &name, + lldb::addr_t address, + AddressType address_type, + uint8_t addr_byte_size +) +{ + return (new ValueObjectConstResult (exe_scope, + clang_ast, + clang_type, + name, + address, + address_type, + addr_byte_size))->GetSP(); +} + ValueObjectConstResult::ValueObjectConstResult ( ExecutionContextScope *exe_scope, @@ -128,6 +200,17 @@ ValueObjectConstResult::ValueObjectConstResult m_pointers_point_to_load_addrs = true; } +ValueObjectSP +ValueObjectConstResult::Create +( + ExecutionContextScope *exe_scope, + const Error& error +) +{ + return (new ValueObjectConstResult (exe_scope, + error))->GetSP(); +} + ValueObjectConstResult::ValueObjectConstResult ( ExecutionContextScope *exe_scope, const Error& error) : |