From 81e871ed761101fb065a097b5b9351e179964d1a Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Sat, 4 Feb 2012 02:27:34 +0000 Subject: Convert all python objects in our API to use overload the __str__ method instead of the __repr__. __repr__ is a function that should return an expression that can be used to recreate an python object and we were using it to just return a human readable string. Fixed a crasher when using the new implementation of SBValue::Cast(SBType). Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general improvements to the API. Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't correctly handle not having a target. llvm-svn: 149743 --- lldb/source/Core/ValueObject.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lldb/source/Core/ValueObject.cpp') diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 60eaa3afbd1..8767b82c87d 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -1551,6 +1551,13 @@ ValueObject::SetValueFromCString (const char *value_str) return true; } +bool +ValueObject::GetDeclaration (Declaration &decl) +{ + decl.Clear(); + return false; +} + LanguageType ValueObject::GetObjectRuntimeLanguage () { @@ -3432,8 +3439,7 @@ ValueObject::AddressOf (Error &error) ValueObjectSP ValueObject::Cast (const ClangASTType &clang_ast_type) { - ValueObjectSP valobj_sp(new ValueObjectCast (*this, GetName(), clang_ast_type)); - return valobj_sp; + return ValueObjectCast::Create (*this, GetName(), clang_ast_type); } ValueObjectSP -- cgit v1.2.3