Remove unnecessary/inappropriate output-printing functions from
the API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113993 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBBreakpoint.cpp b/source/API/SBBreakpoint.cpp
index 91b1598..1e3c712 100644
--- a/source/API/SBBreakpoint.cpp
+++ b/source/API/SBBreakpoint.cpp
@@ -108,16 +108,6 @@
 }
 
 void
-SBBreakpoint::Dump (FILE *f)
-{
-    if (m_opaque_sp && f)
-    {
-        lldb_private::StreamFile str (f);
-        m_opaque_sp->Dump (&str);
-    }
-}
-
-void
 SBBreakpoint::ClearAllBreakpointSites ()
 {
     if (m_opaque_sp)
@@ -192,34 +182,6 @@
 }
 
 void
-SBBreakpoint::ListLocations (FILE* f, const char *description_level)
-{
-    if (m_opaque_sp && f)
-    {
-        DescriptionLevel level;
-        if (strcmp (description_level, "brief") == 0)
-            level = eDescriptionLevelBrief;
-        else if (strcmp (description_level, "full") == 0)
-            level = eDescriptionLevelFull;
-        else if (strcmp (description_level, "verbose") == 0)
-            level = eDescriptionLevelVerbose;
-        else
-            level = eDescriptionLevelBrief;
-
-        StreamFile str (f);
-
-        str.IndentMore();
-        int num_locs = m_opaque_sp->GetNumLocations();
-        for (int i = 0; i < num_locs; ++i)
-        {
-            BreakpointLocation *loc = m_opaque_sp->GetLocationAtIndex (i).get();
-            loc->GetDescription (&str, level);
-            str.EOL();
-        }
-    }
-}
-
-void
 SBBreakpoint::SetEnabled (bool enable)
 {
     if (m_opaque_sp)
@@ -360,7 +322,7 @@
 }
 
 void
-SBBreakpoint::GetDescription (FILE *f, const char *description_level, bool describe_locations)
+SBBreakpoint::GetDescription (FILE *f, const char *description_level)
 {
     if (f == NULL)
         return;
@@ -381,18 +343,6 @@
 
         m_opaque_sp->GetDescription (&str, level);
         str.EOL();
-        if (describe_locations)
-        {
-          //str.IndentMore();
-          // int num_locs = m_opaque_sp->GetNumLocations();
-          //  for (int i = 0; i < num_locs; ++i)
-          //  {
-          //      BreakpointLocation *loc = m_opaque_sp->FindLocationByIndex (i);
-          //      loc->GetDescription (&str, level);
-          //      str.EOL();
-          //  }
-            ListLocations (f, description_level);
-        }
     }
 }
 
diff --git a/source/API/SBCommandInterpreter.cpp b/source/API/SBCommandInterpreter.cpp
index c40d7cc..d38b741 100644
--- a/source/API/SBCommandInterpreter.cpp
+++ b/source/API/SBCommandInterpreter.cpp
@@ -18,7 +18,6 @@
 #include "lldb/API/SBBroadcaster.h"
 #include "lldb/API/SBDebugger.h"
 #include "lldb/API/SBCommandReturnObject.h"
-#include "lldb/API/SBCommandContext.h"
 #include "lldb/API/SBSourceManager.h"
 #include "lldb/API/SBCommandInterpreter.h"
 #include "lldb/API/SBProcess.h"
@@ -62,14 +61,6 @@
     return false;
 }
 
-bool
-SBCommandInterpreter::UserCommandExists (const char *cmd)
-{
-    if (m_opaque_ptr)
-        return m_opaque_ptr->UserCommandExists (cmd);
-    return false;
-}
-
 lldb::ReturnStatus
 SBCommandInterpreter::HandleCommand (const char *command_line, SBCommandReturnObject &result, bool add_to_history)
 {
@@ -107,18 +98,6 @@
     return num_completions;
 }
 
-//const char **
-//SBCommandInterpreter::GetEnvironmentVariables ()
-//{
-//    if (m_opaque_ptr)
-//    {
-//        //const Args *env_vars =  m_opaque_ptr->GetEnvironmentVariables();
-//        //if (env_vars)
-//        //    return env_vars->GetConstArgumentVector ();
-//    }
-//    return NULL;
-//}
-
 bool
 SBCommandInterpreter::HasCommands ()
 {
@@ -136,14 +115,6 @@
 }
 
 bool
-SBCommandInterpreter::HasUserCommands ()
-{
-    if (m_opaque_ptr)
-        return m_opaque_ptr->HasUserCommands ();
-    return false;
-}
-
-bool
 SBCommandInterpreter::HasAliasOptions ()
 {
     if (m_opaque_ptr)
@@ -151,14 +122,6 @@
     return false;
 }
 
-//bool
-//SBCommandInterpreter::HasInterpreterVariables ()
-//{
-//    if (m_opaque_ptr)
-//        return m_opaque_ptr->HasInterpreterVariables ();
-//    return false;
-//}
-
 SBProcess
 SBCommandInterpreter::GetProcess ()
 {
diff --git a/source/API/SBEvent.cpp b/source/API/SBEvent.cpp
index c04ee72..543383b 100644
--- a/source/API/SBEvent.cpp
+++ b/source/API/SBEvent.cpp
@@ -44,17 +44,6 @@
 {
 }
 
-void
-SBEvent::Dump (FILE *f) const
-{
-    const Event *lldb_event = get();
-    if (lldb_event)
-    {
-        StreamFile str(f);
-        lldb_event->Dump ((Stream *) &str);
-    }
-}
-
 const char *
 SBEvent::GetDataFlavor ()
 {
diff --git a/source/API/SBProcess.cpp b/source/API/SBProcess.cpp
index b3b083e..0cae975 100644
--- a/source/API/SBProcess.cpp
+++ b/source/API/SBProcess.cpp
@@ -342,13 +342,13 @@
 }
 
 lldb::pid_t
-SBProcess::AttachByPID (lldb::pid_t attach_pid)  // DEPRECATED: will be removed in a few builds in favor of SBError AttachByPID(pid_t)
+SBProcess::AttachByPID (lldb::pid_t attach_pid) // DEPRECATED: will be removed in a few builds in favor of SBError AttachByPID(pid_t)
 {
     Attach (attach_pid);
     return GetProcessID();
 }
 
-    
+
 SBError
 SBProcess::Attach (lldb::pid_t attach_pid)
 {
diff --git a/source/API/SBThread.cpp b/source/API/SBThread.cpp
index 705f08c..3c75e4d 100644
--- a/source/API/SBThread.cpp
+++ b/source/API/SBThread.cpp
@@ -219,106 +219,6 @@
 
 
 void
-SBThread::DisplayFramesForSelectedContext (FILE *out,
-                                          FILE *err,
-                                          uint32_t first_frame,
-                                          uint32_t num_frames,
-                                          bool show_frame_info,
-                                          uint32_t num_frames_with_source,
-                                          uint32_t source_lines_before,
-                                          uint32_t source_lines_after)
-{
-    if ((out == NULL) || (err == NULL))
-        return;
-
-    if (m_opaque_sp)
-    {
-        uint32_t num_stack_frames = m_opaque_sp->GetStackFrameCount ();
-        StackFrameSP frame_sp;
-        uint32_t frame_idx = 0;
-
-        for (frame_idx = first_frame; frame_idx < first_frame + num_frames; ++frame_idx)
-        {
-            if (frame_idx >= num_stack_frames)
-                break;
-
-            frame_sp = m_opaque_sp->GetStackFrameAtIndex (frame_idx);
-            if (!frame_sp)
-                break;
-
-            SBFrame sb_frame (frame_sp);
-            if (DisplaySingleFrameForSelectedContext (out,
-                                                     err,
-                                                     sb_frame,
-                                                     show_frame_info,
-                                                     num_frames_with_source > first_frame - frame_idx,
-                                                     source_lines_before,
-                                                     source_lines_after) == false)
-                break;
-        }
-    }
-}
-
-bool
-SBThread::DisplaySingleFrameForSelectedContext (FILE *out,
-                                                FILE *err,
-                                                SBFrame &frame,
-                                                bool show_frame_info,
-                                                bool show_source,
-                                                uint32_t source_lines_after,
-                                                uint32_t source_lines_before)
-{
-    bool success = false;
-    
-    if ((out == NULL) || (err == NULL))
-        return false;
-    
-    if (m_opaque_sp && frame.IsValid())
-    {
-        StreamFile str (out);
-        
-        SBSymbolContext sc(frame.GetSymbolContext(eSymbolContextEverything));
-        
-        if (show_frame_info && sc.IsValid())
-        {
-            user_id_t frame_idx = (user_id_t) frame.GetFrameID();
-            lldb::addr_t pc = frame.GetPC();
-            ::fprintf (out,
-                       "     frame #%u: tid = 0x%4.4x, pc = 0x%llx ",
-                       frame_idx,
-                       GetThreadID(),
-                       (long long)pc);
-            sc->DumpStopContext (&str, &m_opaque_sp->GetProcess(), *frame.GetPCAddress(), false, true, false);
-            fprintf (out, "\n");
-            success = true;
-        }
-        
-        SBCompileUnit comp_unit(sc.GetCompileUnit());
-        if (show_source && comp_unit.IsValid())
-        {
-            success = false;
-            SBLineEntry line_entry;
-            if (line_entry.IsValid())
-            {
-                SourceManager& source_manager = m_opaque_sp->GetProcess().GetTarget().GetDebugger().GetSourceManager();
-                SBFileSpec line_entry_file_spec (line_entry.GetFileSpec());
-                
-                if (line_entry_file_spec.IsValid())
-                {
-                    source_manager.DisplaySourceLinesWithLineNumbers (line_entry_file_spec.ref(),
-                                                                      line_entry.GetLine(),
-                                                                      source_lines_after,
-                                                                      source_lines_before, "->",
-                                                                      &str);
-                    success = true;
-                }
-            }
-        }
-    }
-    return success;
-}
-
-void
 SBThread::StepOver (lldb::RunMode stop_other_threads)
 {
     if (m_opaque_sp)
diff --git a/source/API/SBValue.cpp b/source/API/SBValue.cpp
index a90c1bf..e9d970b 100644
--- a/source/API/SBValue.cpp
+++ b/source/API/SBValue.cpp
@@ -52,81 +52,6 @@
     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()
 {