diff options
Diffstat (limited to 'lldb/source/API/SBValue.cpp')
-rw-r--r-- | lldb/source/API/SBValue.cpp | 75 |
1 files changed, 0 insertions, 75 deletions
diff --git a/lldb/source/API/SBValue.cpp b/lldb/source/API/SBValue.cpp index a90c1bff6b7..e9d970baf34 100644 --- a/lldb/source/API/SBValue.cpp +++ b/lldb/source/API/SBValue.cpp @@ -52,81 +52,6 @@ SBValue::IsValid () const return (m_opaque_sp.get() != NULL); } -void -SBValue::Print (FILE *out_file, SBFrame *frame, bool print_type, bool print_value) -{ - if (out_file == NULL) - return; - - if (IsValid()) - { - - SBThread sb_thread = frame->GetThread(); - SBProcess sb_process = sb_thread.GetProcess(); - - lldb_private::StackFrame *lldb_frame = frame->GetLLDBObjectPtr(); - lldb_private::Thread *lldb_thread = sb_thread.GetLLDBObjectPtr(); - lldb_private::Process *lldb_process = sb_process.get(); - - lldb_private::ExecutionContext context (lldb_process, lldb_thread, lldb_frame); - - lldb_private::StreamFile out_stream (out_file); - - out_stream.Printf ("%s ", m_opaque_sp->GetName().AsCString (NULL)); - if (! m_opaque_sp->IsInScope (lldb_frame)) - out_stream.Printf ("[out-of-scope] "); - if (print_type) - { - out_stream.Printf ("(%s) ", m_opaque_sp->GetTypeName().AsCString ("<unknown-type>")); - } - - if (print_value) - { - ExecutionContextScope *exe_scope = frame->get(); - const char *val_cstr = m_opaque_sp->GetValueAsCString(exe_scope); - const char *err_cstr = m_opaque_sp->GetError().AsCString(); - - if (!err_cstr) - { - const char *sum_cstr = m_opaque_sp->GetSummaryAsCString(exe_scope); - const bool is_aggregate = - ClangASTContext::IsAggregateType (m_opaque_sp->GetOpaqueClangQualType()); - if (val_cstr) - out_stream.Printf ("= %s ", val_cstr); - - if (sum_cstr) - out_stream.Printf ("%s ", sum_cstr); - - if (is_aggregate) - { - out_stream.PutChar ('{'); - const uint32_t num_children = m_opaque_sp->GetNumChildren(); - if (num_children) - { - out_stream.IndentMore(); - for (uint32_t idx = 0; idx < num_children; ++idx) - { - lldb::ValueObjectSP child_sp (m_opaque_sp->GetChildAtIndex (idx, true)); - if (child_sp.get()) - { - out_stream.EOL(); - out_stream.Indent(); - out_stream.Printf ("%s (%s) = %s", child_sp.get()->GetName().AsCString (""), - child_sp.get()->GetTypeName().AsCString ("<unknown type>"), - child_sp.get()->GetValueAsCString(exe_scope)); - } - } - out_stream.IndentLess(); - } - out_stream.EOL(); - out_stream.Indent ("}"); - } - } - } - out_stream.EOL (); - } -} - const char * SBValue::GetName() { |