diff options
author | Greg Clayton <gclayton@apple.com> | 2011-07-06 16:49:27 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-07-06 16:49:27 +0000 |
commit | 262f80df5e60c76261ff5a65f02dc7e38a58a0ee (patch) | |
tree | 32f48c66ca9b5ef707367bf4bf4d5f8bbcf16811 /lldb/source/API/SBValue.cpp | |
parent | 37d30835f0592c32aa403e8ade88b8fc2ad2d612 (diff) | |
download | bcm5719-llvm-262f80df5e60c76261ff5a65f02dc7e38a58a0ee.tar.gz bcm5719-llvm-262f80df5e60c76261ff5a65f02dc7e38a58a0ee.zip |
Made the string representation for a SBValue return what "frame variable"
would return instead of a less than helpful "name: '%s'" description.
Make sure that when we ask for the error from a ValueObject object we
first update the value if needed.
Cleaned up some SB functions to use internal functions and not re-call
through the public API when possible.
llvm-svn: 134497
Diffstat (limited to 'lldb/source/API/SBValue.cpp')
-rw-r--r-- | lldb/source/API/SBValue.cpp | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index 801d15d060f..c6a26d95c1d 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -599,21 +599,26 @@ SBValue::GetDescription (SBStream &description) { if (m_opaque_sp) { - // Don't call all these APIs and cause more logging! -// const char *name = GetName(); -// const char *type_name = GetTypeName (); -// size_t byte_size = GetByteSize (); -// uint32_t num_children = GetNumChildren (); -// bool is_stale = ValueIsStale (); -// description.Printf ("name: '%s', type: %s, size: %d", (name != NULL ? name : "<unknown name>"), -// (type_name != NULL ? type_name : "<unknown type name>"), (int) byte_size); -// if (num_children > 0) -// description.Printf (", num_children: %d", num_children); -// -// if (is_stale) -// description.Printf (" [value is stale]"); - - description.Printf ("name: '%s'", m_opaque_sp->GetName().GetCString()); + uint32_t ptr_depth = 0; + uint32_t curr_depth = 0; + uint32_t max_depth = UINT32_MAX; + bool show_types = false; + bool show_location = false; + bool use_objc = false; + lldb::DynamicValueType use_dynamic = eNoDynamicValues; + bool scope_already_checked = false; + bool flat_output = false; + ValueObject::DumpValueObject (description.ref(), + m_opaque_sp.get(), + m_opaque_sp->GetName().GetCString(), + ptr_depth, + curr_depth, + max_depth, + show_types, show_location, + use_objc, + use_dynamic, + scope_already_checked, + flat_output); } else description.Printf ("No value"); |