[Lldb-commits] [lldb] r355649 - [SBAPI] Log from record macro

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 7 14:47:14 PST 2019


Author: jdevlieghere
Date: Thu Mar  7 14:47:13 2019
New Revision: 355649

URL: http://llvm.org/viewvc/llvm-project?rev=355649&view=rev
Log:
[SBAPI] Log from record macro

The current record macros already log the function being called. This
patch extends the macros to also log their input arguments and removes
explicit logging from the SB API.

This might degrade the amount of information in some cases (because of
smarter casts or efforts to log return values). However I think this is
outweighed by the increased coverage and consistency. Furthermore, using
the reproducer infrastructure, diagnosing bugs in the API layer should
become much easier compared to relying on log messages.

Differential revision: https://reviews.llvm.org/D59101

Modified:
    lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h
    lldb/trunk/source/API/SBAddress.cpp
    lldb/trunk/source/API/SBBlock.cpp
    lldb/trunk/source/API/SBBreakpoint.cpp
    lldb/trunk/source/API/SBBreakpointLocation.cpp
    lldb/trunk/source/API/SBBreakpointName.cpp
    lldb/trunk/source/API/SBBroadcaster.cpp
    lldb/trunk/source/API/SBCommandInterpreter.cpp
    lldb/trunk/source/API/SBCommandReturnObject.cpp
    lldb/trunk/source/API/SBCommunication.cpp
    lldb/trunk/source/API/SBCompileUnit.cpp
    lldb/trunk/source/API/SBData.cpp
    lldb/trunk/source/API/SBDebugger.cpp
    lldb/trunk/source/API/SBDeclaration.cpp
    lldb/trunk/source/API/SBError.cpp
    lldb/trunk/source/API/SBEvent.cpp
    lldb/trunk/source/API/SBFileSpec.cpp
    lldb/trunk/source/API/SBFileSpecList.cpp
    lldb/trunk/source/API/SBFrame.cpp
    lldb/trunk/source/API/SBFunction.cpp
    lldb/trunk/source/API/SBHostOS.cpp
    lldb/trunk/source/API/SBLineEntry.cpp
    lldb/trunk/source/API/SBListener.cpp
    lldb/trunk/source/API/SBMemoryRegionInfoList.cpp
    lldb/trunk/source/API/SBModule.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/API/SBQueue.cpp
    lldb/trunk/source/API/SBQueueItem.cpp
    lldb/trunk/source/API/SBSection.cpp
    lldb/trunk/source/API/SBSymbol.cpp
    lldb/trunk/source/API/SBSymbolContext.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/API/SBThread.cpp
    lldb/trunk/source/API/SBTrace.cpp
    lldb/trunk/source/API/SBType.cpp
    lldb/trunk/source/API/SBUnixSignals.cpp
    lldb/trunk/source/API/SBValue.cpp
    lldb/trunk/source/API/SBValueList.cpp
    lldb/trunk/source/API/SBWatchpoint.cpp

Modified: lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h (original)
+++ lldb/trunk/include/lldb/Utility/ReproducerInstrumentation.h Thu Mar  7 14:47:13 2019
@@ -16,7 +16,48 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/ErrorHandling.h"
 
+#include <iostream>
 #include <map>
+#include <type_traits>
+
+template <typename T,
+          typename std::enable_if<std::is_fundamental<T>::value, int>::type = 0>
+void log_append(llvm::raw_string_ostream &ss, const T &t) {
+  ss << t;
+}
+
+template <typename T, typename std::enable_if<!std::is_fundamental<T>::value,
+                                              int>::type = 0>
+void log_append(llvm::raw_string_ostream &ss, const T &t) {
+  ss << &t;
+}
+
+template <typename T>
+void log_append(llvm::raw_string_ostream &ss, const T *t) {
+  ss << t;
+}
+
+void log_append(llvm::raw_string_ostream &ss, const char *t) { ss << t; }
+
+template <typename Head>
+void log_helper(llvm::raw_string_ostream &ss, const Head &head) {
+  log_append(ss, head);
+}
+
+template <typename Head, typename... Tail>
+void log_helper(llvm::raw_string_ostream &ss, const Head &head,
+                const Tail &... tail) {
+  log_append(ss, head);
+  ss << ", ";
+  log_helper(ss, tail...);
+}
+
+template <typename... Ts> std::string log_args(const Ts &... ts) {
+  std::string buffer;
+  llvm::raw_string_ostream ss(buffer);
+  log_helper(ss, ts...);
+  return ss.str();
+}
 
 // Define LLDB_REPRO_INSTR_TRACE to trace to stderr instead of LLDB's log
 // infrastructure. This is useful when you need to see traces before the logger
@@ -38,8 +79,8 @@
                              #Result, #Class, #Method, #Signature)
 
 #define LLDB_RECORD_CONSTRUCTOR(Class, Signature, ...)                         \
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0}",                   \
-           LLVM_PRETTY_FUNCTION);                                              \
+  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0} ({1})",             \
+           LLVM_PRETTY_FUNCTION, log_args(__VA_ARGS__));                       \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \
     lldb_private::repro::Recorder sb_recorder(                                 \
@@ -61,8 +102,8 @@
   }
 
 #define LLDB_RECORD_METHOD(Result, Class, Method, Signature, ...)              \
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0}",                   \
-           LLVM_PRETTY_FUNCTION);                                              \
+  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0} ({1})",             \
+           LLVM_PRETTY_FUNCTION, log_args(__VA_ARGS__));                       \
   llvm::Optional<lldb_private::repro::Recorder> sb_recorder;                   \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \
@@ -75,8 +116,8 @@
   }
 
 #define LLDB_RECORD_METHOD_CONST(Result, Class, Method, Signature, ...)        \
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0}",                   \
-           LLVM_PRETTY_FUNCTION);                                              \
+  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0} ({1})",             \
+           LLVM_PRETTY_FUNCTION, log_args(__VA_ARGS__));                       \
   llvm::Optional<lldb_private::repro::Recorder> sb_recorder;                   \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \
@@ -116,8 +157,8 @@
   }
 
 #define LLDB_RECORD_STATIC_METHOD(Result, Class, Method, Signature, ...)       \
-  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0}",                   \
-           LLVM_PRETTY_FUNCTION);                                              \
+  LLDB_LOG(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API), "{0} ({1})",             \
+           LLVM_PRETTY_FUNCTION, log_args(__VA_ARGS__));                       \
   llvm::Optional<lldb_private::repro::Recorder> sb_recorder;                   \
   if (lldb_private::repro::InstrumentationData data =                          \
           LLDB_GET_INSTRUMENTATION_DATA()) {                                   \

Modified: lldb/trunk/source/API/SBAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBAddress.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBAddress.cpp (original)
+++ lldb/trunk/source/API/SBAddress.cpp Thu Mar  7 14:47:13 2019
@@ -16,7 +16,6 @@
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/LineEntry.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
@@ -111,8 +110,6 @@ lldb::addr_t SBAddress::GetLoadAddress(c
   LLDB_RECORD_METHOD_CONST(lldb::addr_t, SBAddress, GetLoadAddress,
                            (const lldb::SBTarget &), target);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   lldb::addr_t addr = LLDB_INVALID_ADDRESS;
   TargetSP target_sp(target.GetSP());
   if (target_sp) {
@@ -122,16 +119,6 @@ lldb::addr_t SBAddress::GetLoadAddress(c
     }
   }
 
-  if (log) {
-    if (addr == LLDB_INVALID_ADDRESS)
-      log->Printf(
-          "SBAddress::GetLoadAddress (SBTarget(%p)) => LLDB_INVALID_ADDRESS",
-          static_cast<void *>(target_sp.get()));
-    else
-      log->Printf("SBAddress::GetLoadAddress (SBTarget(%p)) => 0x%" PRIx64,
-                  static_cast<void *>(target_sp.get()), addr);
-  }
-
   return addr;
 }
 

Modified: lldb/trunk/source/API/SBBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBlock.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBlock.cpp (original)
+++ lldb/trunk/source/API/SBBlock.cpp Thu Mar  7 14:47:13 2019
@@ -21,7 +21,6 @@
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;

Modified: lldb/trunk/source/API/SBBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpoint.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpoint.cpp (original)
+++ lldb/trunk/source/API/SBBreakpoint.cpp Thu Mar  7 14:47:13 2019
@@ -32,7 +32,6 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadSpec.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include "SBBreakpointOptionCommon.h"
@@ -83,14 +82,11 @@ bool SBBreakpoint::operator!=(const lldb
 break_id_t SBBreakpoint::GetID() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::break_id_t, SBBreakpoint, GetID);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   break_id_t break_id = LLDB_INVALID_BREAK_ID;
   BreakpointSP bkpt_sp = GetSP();
   if (bkpt_sp)
     break_id = bkpt_sp->GetID();
 
-  LLDB_LOG(log, "breakpoint = {0}, id = {1}", bkpt_sp.get(), break_id);
   return break_id;
 }
 
@@ -195,11 +191,8 @@ SBBreakpointLocation SBBreakpoint::GetLo
 void SBBreakpoint::SetEnabled(bool enable) {
   LLDB_RECORD_METHOD(void, SBBreakpoint, SetEnabled, (bool), enable);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
 
-  LLDB_LOG(log, "breakpoint = {0}, enable = {1}", bkpt_sp.get(), enable);
-
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         bkpt_sp->GetTarget().GetAPIMutex());
@@ -222,11 +215,8 @@ bool SBBreakpoint::IsEnabled() {
 void SBBreakpoint::SetOneShot(bool one_shot) {
   LLDB_RECORD_METHOD(void, SBBreakpoint, SetOneShot, (bool), one_shot);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
 
-  LLDB_LOG(log, "breakpoint = {0}, one_shot = {1}", bkpt_sp.get(), one_shot);
-
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         bkpt_sp->GetTarget().GetAPIMutex());
@@ -261,11 +251,8 @@ bool SBBreakpoint::IsInternal() {
 void SBBreakpoint::SetIgnoreCount(uint32_t count) {
   LLDB_RECORD_METHOD(void, SBBreakpoint, SetIgnoreCount, (uint32_t), count);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
 
-  LLDB_LOG(log, "breakpoint = {0}, count = {1}", bkpt_sp.get(), count);
-
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         bkpt_sp->GetTarget().GetAPIMutex());
@@ -332,9 +319,6 @@ uint32_t SBBreakpoint::GetHitCount() con
     count = bkpt_sp->GetHitCount();
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, count = {1}", bkpt_sp.get(), count);
-
   return count;
 }
 
@@ -349,9 +333,6 @@ uint32_t SBBreakpoint::GetIgnoreCount()
     count = bkpt_sp->GetIgnoreCount();
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, count = {1}", bkpt_sp.get(), count);
-
   return count;
 }
 
@@ -364,8 +345,6 @@ void SBBreakpoint::SetThreadID(tid_t tid
         bkpt_sp->GetTarget().GetAPIMutex());
     bkpt_sp->SetThreadID(tid);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, tid = {1:x}", bkpt_sp.get(), tid);
 }
 
 tid_t SBBreakpoint::GetThreadID() {
@@ -379,17 +358,13 @@ tid_t SBBreakpoint::GetThreadID() {
     tid = bkpt_sp->GetThreadID();
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, tid = {1:x}", bkpt_sp.get(), tid);
   return tid;
 }
 
 void SBBreakpoint::SetThreadIndex(uint32_t index) {
   LLDB_RECORD_METHOD(void, SBBreakpoint, SetThreadIndex, (uint32_t), index);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, index = {1}", bkpt_sp.get(), index);
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         bkpt_sp->GetTarget().GetAPIMutex());
@@ -410,8 +385,6 @@ uint32_t SBBreakpoint::GetThreadIndex()
     if (thread_spec != nullptr)
       thread_idx = thread_spec->GetIndex();
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, index = {1}", bkpt_sp.get(), thread_idx);
 
   return thread_idx;
 }
@@ -420,9 +393,7 @@ void SBBreakpoint::SetThreadName(const c
   LLDB_RECORD_METHOD(void, SBBreakpoint, SetThreadName, (const char *),
                      thread_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), thread_name);
 
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
@@ -444,8 +415,6 @@ const char *SBBreakpoint::GetThreadName(
     if (thread_spec != nullptr)
       name = thread_spec->GetName();
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name);
 
   return name;
 }
@@ -454,10 +423,7 @@ void SBBreakpoint::SetQueueName(const ch
   LLDB_RECORD_METHOD(void, SBBreakpoint, SetQueueName, (const char *),
                      queue_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, queue_name = {1}", bkpt_sp.get(),
-           queue_name);
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         bkpt_sp->GetTarget().GetAPIMutex());
@@ -478,8 +444,6 @@ const char *SBBreakpoint::GetQueueName()
     if (thread_spec)
       name = thread_spec->GetQueueName();
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name);
 
   return name;
 }
@@ -495,9 +459,6 @@ size_t SBBreakpoint::GetNumResolvedLocat
         bkpt_sp->GetTarget().GetAPIMutex());
     num_resolved = bkpt_sp->GetNumResolvedLocations();
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, num_resolved = {1}", bkpt_sp.get(),
-           num_resolved);
   return num_resolved;
 }
 
@@ -511,8 +472,6 @@ size_t SBBreakpoint::GetNumLocations() c
         bkpt_sp->GetTarget().GetAPIMutex());
     num_locs = bkpt_sp->GetNumLocations();
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOG(log, "breakpoint = {0}, num_locs = {1}", bkpt_sp.get(), num_locs);
   return num_locs;
 }
 
@@ -613,10 +572,7 @@ SBError SBBreakpoint::AddLocation(SBAddr
 void SBBreakpoint
   ::SetCallback(SBBreakpointHitCallback callback,
   void *baton) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, callback = {1}, baton = {2}", bkpt_sp.get(),
-           callback, baton);
 
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
@@ -633,10 +589,7 @@ void SBBreakpoint::SetScriptCallbackFunc
   LLDB_RECORD_METHOD(void, SBBreakpoint, SetScriptCallbackFunction,
                      (const char *), callback_function_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, callback = {1}", bkpt_sp.get(),
-           callback_function_name);
 
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
@@ -655,10 +608,7 @@ SBError SBBreakpoint::SetScriptCallbackB
   LLDB_RECORD_METHOD(lldb::SBError, SBBreakpoint, SetScriptCallbackBody,
                      (const char *), callback_body_text);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, callback body:\n{1}", bkpt_sp.get(),
-           callback_body_text);
 
   SBError sb_error;
   if (bkpt_sp) {
@@ -681,9 +631,7 @@ SBError SBBreakpoint::SetScriptCallbackB
 bool SBBreakpoint::AddName(const char *new_name) {
   LLDB_RECORD_METHOD(bool, SBBreakpoint, AddName, (const char *), new_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), new_name);
 
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
@@ -692,12 +640,7 @@ bool SBBreakpoint::AddName(const char *n
                   // probably more annoying to have to provide it.
     bkpt_sp->GetTarget().AddNameToBreakpoint(bkpt_sp, new_name, error);
     if (error.Fail())
-    {
-      if (log)
-        log->Printf("Failed to add name: '%s' to breakpoint: %s", 
-            new_name, error.AsCString());
       return false;
-    }
   }
 
   return true;
@@ -707,24 +650,20 @@ void SBBreakpoint::RemoveName(const char
   LLDB_RECORD_METHOD(void, SBBreakpoint, RemoveName, (const char *),
                      name_to_remove);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name_to_remove);
 
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         bkpt_sp->GetTarget().GetAPIMutex());
-    bkpt_sp->GetTarget().RemoveNameFromBreakpoint(bkpt_sp, 
-                                                 ConstString(name_to_remove));
+    bkpt_sp->GetTarget().RemoveNameFromBreakpoint(bkpt_sp,
+                                                  ConstString(name_to_remove));
   }
 }
 
 bool SBBreakpoint::MatchesName(const char *name) {
   LLDB_RECORD_METHOD(bool, SBBreakpoint, MatchesName, (const char *), name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}, name = {1}", bkpt_sp.get(), name);
 
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(
@@ -739,9 +678,7 @@ void SBBreakpoint::GetNames(SBStringList
   LLDB_RECORD_METHOD(void, SBBreakpoint, GetNames, (lldb::SBStringList &),
                      names);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointSP bkpt_sp = GetSP();
-  LLDB_LOG(log, "breakpoint = {0}", bkpt_sp.get());
 
   if (bkpt_sp) {
     std::lock_guard<std::recursive_mutex> guard(

Modified: lldb/trunk/source/API/SBBreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpointLocation.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpointLocation.cpp (original)
+++ lldb/trunk/source/API/SBBreakpointLocation.cpp Thu Mar  7 14:47:13 2019
@@ -22,7 +22,6 @@
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/ThreadSpec.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-types.h"
@@ -39,14 +38,6 @@ SBBreakpointLocation::SBBreakpointLocati
     : m_opaque_wp(break_loc_sp) {
   LLDB_RECORD_CONSTRUCTOR(SBBreakpointLocation,
                           (const lldb::BreakpointLocationSP &), break_loc_sp);
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log) {
-    SBStream sstr;
-    GetDescription(sstr, lldb::eDescriptionLevelBrief);
-    LLDB_LOG(log, "location = {0} ({1})", break_loc_sp.get(), sstr.GetData());
-  }
 }
 
 SBBreakpointLocation::SBBreakpointLocation(const SBBreakpointLocation &rhs)
@@ -216,10 +207,7 @@ void SBBreakpointLocation::SetScriptCall
   LLDB_RECORD_METHOD(void, SBBreakpointLocation, SetScriptCallbackFunction,
                      (const char *), callback_function_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointLocationSP loc_sp = GetSP();
-  LLDB_LOG(log, "location = {0}, callback = {1}", loc_sp.get(),
-           callback_function_name);
 
   if (loc_sp) {
     std::lock_guard<std::recursive_mutex> guard(
@@ -240,10 +228,7 @@ SBBreakpointLocation::SetScriptCallbackB
   LLDB_RECORD_METHOD(lldb::SBError, SBBreakpointLocation, SetScriptCallbackBody,
                      (const char *), callback_body_text);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointLocationSP loc_sp = GetSP();
-  LLDB_LOG(log, "location = {0}: callback body:\n{1}", loc_sp.get(),
-           callback_body_text);
 
   SBError sb_error;
   if (loc_sp) {
@@ -452,7 +437,6 @@ SBBreakpoint SBBreakpointLocation::GetBr
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBreakpoint, SBBreakpointLocation,
                              GetBreakpoint);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointLocationSP loc_sp = GetSP();
 
   SBBreakpoint sb_bp;
@@ -462,11 +446,5 @@ SBBreakpoint SBBreakpointLocation::GetBr
     sb_bp = loc_sp->GetBreakpoint().shared_from_this();
   }
 
-  if (log) {
-    SBStream sstr;
-    sb_bp.GetDescription(sstr);
-    LLDB_LOG(log, "location = {0}, breakpoint = {1} ({2})", loc_sp.get(),
-             sb_bp.GetSP().get(), sstr.GetData());
-  }
   return LLDB_RECORD_RESULT(sb_bp);
 }

Modified: lldb/trunk/source/API/SBBreakpointName.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpointName.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpointName.cpp (original)
+++ lldb/trunk/source/API/SBBreakpointName.cpp Thu Mar  7 14:47:13 2019
@@ -21,7 +21,6 @@
 #include "lldb/Interpreter/ScriptInterpreter.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/ThreadSpec.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include "SBBreakpointOptionCommon.h"
@@ -37,10 +36,10 @@ public:
     if (!name || name[0] == '\0')
       return;
     m_name.assign(name);
-    
+
     if (!target_sp)
       return;
-    
+
     m_target_wp = target_sp;
   }
 
@@ -50,15 +49,15 @@ public:
 
   // For now we take a simple approach and only keep the name, and relook up
   // the location when we need it.
-  
+
   TargetSP GetTarget() const {
     return m_target_wp.lock();
   }
-  
+
   const char *GetName() const {
     return m_name.c_str();
   }
-  
+
   bool IsValid() const {
     return !m_name.empty() && m_target_wp.lock();
   }
@@ -133,14 +132,14 @@ SBBreakpointName::SBBreakpointName(SBBre
   Target &target = bkpt_sp->GetTarget();
 
   m_impl_up.reset(new SBBreakpointNameImpl(target.shared_from_this(), name));
-  
+
   // Call FindBreakpointName here to make sure the name is valid, reset if not:
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name) {
     m_impl_up.reset();
     return;
   }
-  
+
   // Now copy over the breakpoint's options:
   target.ConfigureBreakpointName(*bp_name, *bkpt_sp->GetOptions(),
                                  BreakpointName::Permissions());
@@ -169,7 +168,7 @@ operator=(const SBBreakpointName &rhs) {
     m_impl_up.reset();
     return *this;
   }
-  
+
   m_impl_up.reset(new SBBreakpointNameImpl(rhs.m_impl_up->GetTarget(),
                                            rhs.m_impl_up->GetName()));
   return *this;
@@ -208,13 +207,10 @@ const char *SBBreakpointName::GetName()
 void SBBreakpointName::SetEnabled(bool enable) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetEnabled, (bool), enable);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} enabled: {1}\n", bp_name->GetName(), enable);
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -235,13 +231,10 @@ void SBBreakpointName::UpdateName(Breakp
 bool SBBreakpointName::IsEnabled() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, IsEnabled);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return false;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -251,13 +244,10 @@ bool SBBreakpointName::IsEnabled() {
 void SBBreakpointName::SetOneShot(bool one_shot) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetOneShot, (bool), one_shot);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} one_shot: {1}\n", bp_name->GetName(), one_shot);
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -268,13 +258,10 @@ void SBBreakpointName::SetOneShot(bool o
 bool SBBreakpointName::IsOneShot() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBBreakpointName, IsOneShot);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   const BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return false;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -284,13 +271,10 @@ bool SBBreakpointName::IsOneShot() const
 void SBBreakpointName::SetIgnoreCount(uint32_t count) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetIgnoreCount, (uint32_t), count);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} one_shot: {1}\n", bp_name->GetName(), count);
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -301,13 +285,10 @@ void SBBreakpointName::SetIgnoreCount(ui
 uint32_t SBBreakpointName::GetIgnoreCount() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointName, GetIgnoreCount);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return false;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -318,15 +299,10 @@ void SBBreakpointName::SetCondition(cons
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetCondition, (const char *),
                      condition);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} one_shot: {1}\n", bp_name->GetName(),
-          condition ? condition : "<NULL>");
-  
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -337,13 +313,10 @@ void SBBreakpointName::SetCondition(cons
 const char *SBBreakpointName::GetCondition() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBBreakpointName, GetCondition);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return nullptr;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -354,14 +327,10 @@ void SBBreakpointName::SetAutoContinue(b
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetAutoContinue, (bool),
                      auto_continue);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} auto-continue: {1}\n", bp_name->GetName(), auto_continue);
-  
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -372,13 +341,10 @@ void SBBreakpointName::SetAutoContinue(b
 bool SBBreakpointName::GetAutoContinue() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBBreakpointName, GetAutoContinue);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return false;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -388,14 +354,10 @@ bool SBBreakpointName::GetAutoContinue()
 void SBBreakpointName::SetThreadID(tid_t tid) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadID, (lldb::tid_t), tid);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} tid: {1:x}\n", bp_name->GetName(), tid);
-  
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -406,13 +368,10 @@ void SBBreakpointName::SetThreadID(tid_t
 tid_t SBBreakpointName::GetThreadID() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::tid_t, SBBreakpointName, GetThreadID);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return LLDB_INVALID_THREAD_ID;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -422,14 +381,10 @@ tid_t SBBreakpointName::GetThreadID() {
 void SBBreakpointName::SetThreadIndex(uint32_t index) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadIndex, (uint32_t), index);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} thread index: {1}\n", bp_name->GetName(), index);
-  
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -440,13 +395,10 @@ void SBBreakpointName::SetThreadIndex(ui
 uint32_t SBBreakpointName::GetThreadIndex() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBBreakpointName, GetThreadIndex);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return LLDB_INVALID_THREAD_ID;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -457,14 +409,10 @@ void SBBreakpointName::SetThreadName(con
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetThreadName, (const char *),
                      thread_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} thread name: {1}\n", bp_name->GetName(), thread_name);
-  
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -476,13 +424,10 @@ const char *SBBreakpointName::GetThreadN
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName,
                                    GetThreadName);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return nullptr;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -493,14 +438,10 @@ void SBBreakpointName::SetQueueName(cons
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetQueueName, (const char *),
                      queue_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} queue name: {1}\n", bp_name->GetName(), queue_name);
-  
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -512,13 +453,10 @@ const char *SBBreakpointName::GetQueueNa
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName,
                                    GetQueueName);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return nullptr;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -529,14 +467,12 @@ void SBBreakpointName::SetCommandLineCom
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetCommandLineCommands,
                      (lldb::SBStringList &), commands);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
   if (commands.GetSize() == 0)
     return;
 
-  LLDB_LOG(log, "Name: {0} commands\n", bp_name->GetName());
 
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
@@ -551,13 +487,10 @@ bool SBBreakpointName::GetCommandLineCom
   LLDB_RECORD_METHOD(bool, SBBreakpointName, GetCommandLineCommands,
                      (lldb::SBStringList &), commands);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return false;
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   StringList command_list;
   bool has_commands =
       bp_name->GetOptions().GetCommandLineCallbacks(command_list);
@@ -570,13 +503,10 @@ const char *SBBreakpointName::GetHelpStr
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBBreakpointName,
                                    GetHelpString);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return "";
- 
-  LLDB_LOG(log, "Help: {0}\n", bp_name->GetHelp());
+
   return bp_name->GetHelp();
 }
 
@@ -584,12 +514,10 @@ void SBBreakpointName::SetHelpString(con
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetHelpString, (const char *),
                      help_string);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
 
-  LLDB_LOG(log, "Name: {0} help: {1}\n", bp_name->GetName(), help_string);
 
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
@@ -600,16 +528,13 @@ bool SBBreakpointName::GetDescription(SB
   LLDB_RECORD_METHOD(bool, SBBreakpointName, GetDescription, (lldb::SBStream &),
                      s);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
   {
     s.Printf("No value");
     return false;
   }
- 
-  LLDB_LOG(log, "Name: {0}\n", bp_name->GetName());
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
   bp_name->GetDescription(s.get(), eDescriptionLevelFull);
@@ -618,11 +543,9 @@ bool SBBreakpointName::GetDescription(SB
 
 void SBBreakpointName::SetCallback(SBBreakpointHitCallback callback,
                                    void *baton) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
-  LLDB_LOG(log, "callback = {1}, baton = {2}", callback, baton);
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -639,15 +562,10 @@ void SBBreakpointName::SetScriptCallback
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetScriptCallbackFunction,
                      (const char *), callback_function_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
- 
-  LLDB_LOG(log, "Name: {0} callback: {1}\n", bp_name->GetName(),
-           callback_function_name);
-  
+
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -666,15 +584,11 @@ SBBreakpointName::SetScriptCallbackBody(
   LLDB_RECORD_METHOD(lldb::SBError, SBBreakpointName, SetScriptCallbackBody,
                      (const char *), callback_body_text);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBError sb_error;
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return LLDB_RECORD_RESULT(sb_error);
 
-  LLDB_LOG(log, "Name: {0} callback: {1}\n", bp_name->GetName(),
-           callback_body_text);
-  
   std::lock_guard<std::recursive_mutex> guard(
         m_impl_up->GetTarget()->GetAPIMutex());
 
@@ -704,14 +618,10 @@ bool SBBreakpointName::GetAllowList() co
 void SBBreakpointName::SetAllowList(bool value) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowList, (bool), value);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
-  if (log)
-    log->Printf("Setting allow list to %u for %s.", value, 
-                bp_name->GetName().AsCString());
   bp_name->GetPermissions().SetAllowList(value);
 }
 
@@ -727,14 +637,10 @@ bool SBBreakpointName::GetAllowDelete()
 void SBBreakpointName::SetAllowDelete(bool value) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDelete, (bool), value);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
-  if (log)
-    log->Printf("Setting allow delete to %u for %s.", value, 
-                bp_name->GetName().AsCString());
   bp_name->GetPermissions().SetAllowDelete(value);
 }
 
@@ -750,14 +656,9 @@ bool SBBreakpointName::GetAllowDisable()
 void SBBreakpointName::SetAllowDisable(bool value) {
   LLDB_RECORD_METHOD(void, SBBreakpointName, SetAllowDisable, (bool), value);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   BreakpointName *bp_name = GetBreakpointName();
   if (!bp_name)
     return;
-  if (log)
-    log->Printf("Setting allow disable to %u for %s.", value, 
-                bp_name->GetName().AsCString());
   bp_name->GetPermissions().SetAllowDisable(value);
 }
 

Modified: lldb/trunk/source/API/SBBroadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBroadcaster.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBroadcaster.cpp (original)
+++ lldb/trunk/source/API/SBBroadcaster.cpp Thu Mar  7 14:47:13 2019
@@ -8,7 +8,6 @@
 
 #include "SBReproducerPrivate.h"
 #include "lldb/Utility/Broadcaster.h"
-#include "lldb/Utility/Log.h"
 
 #include "lldb/API/SBBroadcaster.h"
 #include "lldb/API/SBEvent.h"
@@ -26,15 +25,10 @@ SBBroadcaster::SBBroadcaster(const char
   LLDB_RECORD_CONSTRUCTOR(SBBroadcaster, (const char *), name);
 
   m_opaque_ptr = m_opaque_sp.get();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOGV(log, "(name=\"{0}\") => SBBroadcaster({1})", name, m_opaque_ptr);
 }
 
 SBBroadcaster::SBBroadcaster(lldb_private::Broadcaster *broadcaster, bool owns)
     : m_opaque_sp(owns ? broadcaster : NULL), m_opaque_ptr(broadcaster) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOGV(log, "(broadcaster={0}, owns={1}) => SBBroadcaster({2})",
-            broadcaster, owns, m_opaque_ptr);
 }
 
 SBBroadcaster::SBBroadcaster(const SBBroadcaster &rhs)
@@ -60,13 +54,6 @@ void SBBroadcaster::BroadcastEventByType
   LLDB_RECORD_METHOD(void, SBBroadcaster, BroadcastEventByType,
                      (uint32_t, bool), event_type, unique);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBBroadcaster(%p)::BroadcastEventByType (event_type=0x%8.8x, "
-                "unique=%i)",
-                static_cast<void *>(m_opaque_ptr), event_type, unique);
-
   if (m_opaque_ptr == NULL)
     return;
 
@@ -80,14 +67,6 @@ void SBBroadcaster::BroadcastEvent(const
   LLDB_RECORD_METHOD(void, SBBroadcaster, BroadcastEvent,
                      (const lldb::SBEvent &, bool), event, unique);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf(
-        "SBBroadcaster(%p)::BroadcastEventByType (SBEvent(%p), unique=%i)",
-        static_cast<void *>(m_opaque_ptr), static_cast<void *>(event.get()),
-        unique);
-
   if (m_opaque_ptr == NULL)
     return;
 
@@ -104,12 +83,6 @@ void SBBroadcaster::AddInitialEventsToLi
                      (const lldb::SBListener &, uint32_t), listener,
                      requested_events);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBBroadcaster(%p)::AddInitialEventsToListener "
-                "(SBListener(%p), event_mask=0x%8.8x)",
-                static_cast<void *>(m_opaque_ptr),
-                static_cast<void *>(listener.get()), requested_events);
   if (m_opaque_ptr)
     m_opaque_ptr->AddInitialEventsToListener(listener.m_opaque_sp,
                                              requested_events);

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Thu Mar  7 14:47:13 2019
@@ -178,13 +178,6 @@ SBCommandInterpreter::SBCommandInterpret
   LLDB_RECORD_CONSTRUCTOR(SBCommandInterpreter,
                           (lldb_private::CommandInterpreter *), interpreter);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBCommandInterpreter::SBCommandInterpreter (interpreter=%p)"
-                " => SBCommandInterpreter(%p)",
-                static_cast<void *>(interpreter),
-                static_cast<void *>(m_opaque_ptr));
 }
 
 SBCommandInterpreter::SBCommandInterpreter(const SBCommandInterpreter &rhs)
@@ -271,13 +264,6 @@ lldb::ReturnStatus SBCommandInterpreter:
                       lldb::SBCommandReturnObject &, bool),
                      command_line, override_context, result, add_to_history);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBCommandInterpreter(%p)::HandleCommand (command=\"%s\", "
-                "SBCommandReturnObject(%p), add_to_history=%i)",
-                static_cast<void *>(m_opaque_ptr), command_line,
-                static_cast<void *>(result.get()), add_to_history);
 
   ExecutionContext ctx, *ctx_ptr;
   if (override_context.get()) {
@@ -298,17 +284,6 @@ lldb::ReturnStatus SBCommandInterpreter:
     result->SetStatus(eReturnStatusFailed);
   }
 
-  // We need to get the value again, in case the command disabled the log!
-  log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API);
-  if (log) {
-    SBStream sstr;
-    result.GetDescription(sstr);
-    log->Printf("SBCommandInterpreter(%p)::HandleCommand (command=\"%s\", "
-                "SBCommandReturnObject(%p): %s, add_to_history=%i) => %i",
-                static_cast<void *>(m_opaque_ptr), command_line,
-                static_cast<void *>(result.get()), sstr.GetData(),
-                add_to_history, result.GetStatus());
-  }
 
   return result.GetStatus();
 }
@@ -323,17 +298,6 @@ void SBCommandInterpreter::HandleCommand
                       lldb::SBCommandReturnObject),
                      file, override_context, options, result);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log) {
-    SBStream s;
-    file.GetDescription(s);
-    log->Printf("SBCommandInterpreter(%p)::HandleCommandsFromFile "
-                "(file=\"%s\", SBCommandReturnObject(%p))",
-                static_cast<void *>(m_opaque_ptr), s.GetData(),
-                static_cast<void *>(result.get()));
-  }
-
   if (!IsValid()) {
     result->AppendError("SBCommandInterpreter is not valid.");
     result->SetStatus(eReturnStatusFailed);
@@ -385,7 +349,6 @@ int SBCommandInterpreter::HandleCompleti
                      current_line, cursor, last_char, match_start_point,
                      max_return_elements, matches, descriptions);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   int num_completions = 0;
 
   // Sanity check the arguments that are passed in: cursor & last_char have to
@@ -401,15 +364,6 @@ int SBCommandInterpreter::HandleCompleti
       last_char - current_line > static_cast<ptrdiff_t>(current_line_size))
     return 0;
 
-  if (log)
-    log->Printf("SBCommandInterpreter(%p)::HandleCompletion "
-                "(current_line=\"%s\", cursor at: %" PRId64
-                ", last char at: %" PRId64
-                ", match_start_point: %d, max_return_elements: %d)",
-                static_cast<void *>(m_opaque_ptr), current_line,
-                static_cast<uint64_t>(cursor - current_line),
-                static_cast<uint64_t>(last_char - current_line),
-                match_start_point, max_return_elements);
 
   if (IsValid()) {
     lldb_private::StringList lldb_matches, lldb_descriptions;
@@ -422,10 +376,6 @@ int SBCommandInterpreter::HandleCompleti
     SBStringList temp_descriptions_list(&lldb_descriptions);
     descriptions.AppendList(temp_descriptions_list);
   }
-  if (log)
-    log->Printf(
-        "SBCommandInterpreter(%p)::HandleCompletion - Found %d completions.",
-        static_cast<void *>(m_opaque_ptr), num_completions);
 
   return num_completions;
 }
@@ -495,12 +445,6 @@ SBProcess SBCommandInterpreter::GetProce
       sb_process.SetSP(process_sp);
     }
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBCommandInterpreter(%p)::GetProcess () => SBProcess(%p)",
-                static_cast<void *>(m_opaque_ptr),
-                static_cast<void *>(process_sp.get()));
 
   return LLDB_RECORD_RESULT(sb_process);
 }
@@ -512,12 +456,6 @@ SBDebugger SBCommandInterpreter::GetDebu
   SBDebugger sb_debugger;
   if (IsValid())
     sb_debugger.reset(m_opaque_ptr->GetDebugger().shared_from_this());
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBCommandInterpreter(%p)::GetDebugger () => SBDebugger(%p)",
-                static_cast<void *>(m_opaque_ptr),
-                static_cast<void *>(sb_debugger.get()));
 
   return LLDB_RECORD_RESULT(sb_debugger);
 }
@@ -603,13 +541,6 @@ void SBCommandInterpreter::SourceInitFil
     result->AppendError("SBCommandInterpreter is not valid");
     result->SetStatus(eReturnStatusFailed);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBCommandInterpreter(%p)::SourceInitFileInHomeDirectory "
-                "(&SBCommandReturnObject(%p))",
-                static_cast<void *>(m_opaque_ptr),
-                static_cast<void *>(result.get()));
 }
 
 void SBCommandInterpreter::SourceInitFileInCurrentWorkingDirectory(
@@ -629,28 +560,15 @@ void SBCommandInterpreter::SourceInitFil
     result->AppendError("SBCommandInterpreter is not valid");
     result->SetStatus(eReturnStatusFailed);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf(
-        "SBCommandInterpreter(%p)::SourceInitFileInCurrentWorkingDirectory "
-        "(&SBCommandReturnObject(%p))",
-        static_cast<void *>(m_opaque_ptr), static_cast<void *>(result.get()));
 }
 
 SBBroadcaster SBCommandInterpreter::GetBroadcaster() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBBroadcaster, SBCommandInterpreter,
                              GetBroadcaster);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBBroadcaster broadcaster(m_opaque_ptr, false);
 
-  if (log)
-    log->Printf(
-        "SBCommandInterpreter(%p)::GetBroadcaster() => SBBroadcaster(%p)",
-        static_cast<void *>(m_opaque_ptr),
-        static_cast<void *>(broadcaster.get()));
 
   return LLDB_RECORD_RESULT(broadcaster);
 }

Modified: lldb/trunk/source/API/SBCommandReturnObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandReturnObject.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandReturnObject.cpp (original)
+++ lldb/trunk/source/API/SBCommandReturnObject.cpp Thu Mar  7 14:47:13 2019
@@ -13,7 +13,6 @@
 #include "lldb/API/SBStream.h"
 #include "lldb/Interpreter/CommandReturnObject.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"
 
 using namespace lldb;
@@ -68,45 +67,25 @@ bool SBCommandReturnObject::IsValid() co
 const char *SBCommandReturnObject::GetOutput() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBCommandReturnObject, GetOutput);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   if (m_opaque_up) {
     llvm::StringRef output = m_opaque_up->GetOutputData();
     ConstString result(output.empty() ? llvm::StringRef("") : output);
 
-    if (log)
-      log->Printf("SBCommandReturnObject(%p)::GetOutput () => \"%s\"",
-                  static_cast<void *>(m_opaque_up.get()), result.AsCString());
-
     return result.AsCString();
   }
 
-  if (log)
-    log->Printf("SBCommandReturnObject(%p)::GetOutput () => nullptr",
-                static_cast<void *>(m_opaque_up.get()));
-
   return nullptr;
 }
 
 const char *SBCommandReturnObject::GetError() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBCommandReturnObject, GetError);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   if (m_opaque_up) {
     llvm::StringRef output = m_opaque_up->GetErrorData();
     ConstString result(output.empty() ? llvm::StringRef("") : output);
-    if (log)
-      log->Printf("SBCommandReturnObject(%p)::GetError () => \"%s\"",
-                  static_cast<void *>(m_opaque_up.get()), result.AsCString());
-
     return result.AsCString();
   }
 
-  if (log)
-    log->Printf("SBCommandReturnObject(%p)::GetError () => nullptr",
-                static_cast<void *>(m_opaque_up.get()));
-
   return nullptr;
 }
 

Modified: lldb/trunk/source/API/SBCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommunication.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommunication.cpp (original)
+++ lldb/trunk/source/API/SBCommunication.cpp Thu Mar  7 14:47:13 2019
@@ -12,7 +12,6 @@
 #include "lldb/Core/Communication.h"
 #include "lldb/Host/ConnectionFileDescriptor.h"
 #include "lldb/Host/Host.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -24,13 +23,6 @@ SBCommunication::SBCommunication() : m_o
 SBCommunication::SBCommunication(const char *broadcaster_name)
     : m_opaque(new Communication(broadcaster_name)), m_opaque_owned(true) {
   LLDB_RECORD_CONSTRUCTOR(SBCommunication, (const char *), broadcaster_name);
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBCommunication::SBCommunication (broadcaster_name=\"%s\") => "
-                "SBCommunication(%p)",
-                broadcaster_name, static_cast<void *>(m_opaque));
 }
 
 SBCommunication::~SBCommunication() {
@@ -77,8 +69,6 @@ ConnectionStatus SBCommunication::AdoptF
   LLDB_RECORD_METHOD(lldb::ConnectionStatus, SBCommunication,
                      AdoptFileDesriptor, (int, bool), fd, owns_fd);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   ConnectionStatus status = eConnectionStatusNoConnection;
   if (m_opaque) {
     if (m_opaque->HasConnection()) {
@@ -91,13 +81,6 @@ ConnectionStatus SBCommunication::AdoptF
     else
       status = eConnectionStatusLostConnection;
   }
-
-  if (log)
-    log->Printf(
-        "SBCommunication(%p)::AdoptFileDescriptor (fd=%d, ownd_fd=%i) => %s",
-        static_cast<void *>(m_opaque), fd, owns_fd,
-        Communication::ConnectionStatusAsCString(status));
-
   return status;
 }
 
@@ -105,43 +88,20 @@ ConnectionStatus SBCommunication::Discon
   LLDB_RECORD_METHOD_NO_ARGS(lldb::ConnectionStatus, SBCommunication,
                              Disconnect);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   ConnectionStatus status = eConnectionStatusNoConnection;
   if (m_opaque)
     status = m_opaque->Disconnect();
-
-  if (log)
-    log->Printf("SBCommunication(%p)::Disconnect () => %s",
-                static_cast<void *>(m_opaque),
-                Communication::ConnectionStatusAsCString(status));
-
   return status;
 }
 
 bool SBCommunication::IsConnected() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommunication, IsConnected);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  bool result = false;
-  if (m_opaque)
-    result = m_opaque->IsConnected();
-
-  if (log)
-    log->Printf("SBCommunication(%p)::IsConnected () => %i",
-                static_cast<void *>(m_opaque), result);
-
-  return false;
+  return m_opaque ? m_opaque->IsConnected() : false;
 }
 
 size_t SBCommunication::Read(void *dst, size_t dst_len, uint32_t timeout_usec,
                              ConnectionStatus &status) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBCommunication(%p)::Read (dst=%p, dst_len=%" PRIu64
-                ", timeout_usec=%u, &status)...",
-                static_cast<void *>(m_opaque), static_cast<void *>(dst),
-                static_cast<uint64_t>(dst_len), timeout_usec);
   size_t bytes_read = 0;
   Timeout<std::micro> timeout = timeout_usec == UINT32_MAX
                                     ? Timeout<std::micro>(llvm::None)
@@ -151,13 +111,6 @@ size_t SBCommunication::Read(void *dst,
   else
     status = eConnectionStatusNoConnection;
 
-  if (log)
-    log->Printf("SBCommunication(%p)::Read (dst=%p, dst_len=%" PRIu64
-                ", timeout_usec=%u, &status=%s) => %" PRIu64,
-                static_cast<void *>(m_opaque), static_cast<void *>(dst),
-                static_cast<uint64_t>(dst_len), timeout_usec,
-                Communication::ConnectionStatusAsCString(status),
-                static_cast<uint64_t>(bytes_read));
   return bytes_read;
 }
 
@@ -169,83 +122,34 @@ size_t SBCommunication::Write(const void
   else
     status = eConnectionStatusNoConnection;
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBCommunication(%p)::Write (src=%p, src_len=%" PRIu64
-                ", &status=%s) => %" PRIu64,
-                static_cast<void *>(m_opaque), static_cast<const void *>(src),
-                static_cast<uint64_t>(src_len),
-                Communication::ConnectionStatusAsCString(status),
-                static_cast<uint64_t>(bytes_written));
-
-  return 0;
+  return bytes_written;
 }
 
 bool SBCommunication::ReadThreadStart() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBCommunication, ReadThreadStart);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  bool success = false;
-  if (m_opaque)
-    success = m_opaque->StartReadThread();
-
-  if (log)
-    log->Printf("SBCommunication(%p)::ReadThreadStart () => %i",
-                static_cast<void *>(m_opaque), success);
-
-  return success;
+  return m_opaque ? m_opaque->StartReadThread() : false;
 }
 
 bool SBCommunication::ReadThreadStop() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBCommunication, ReadThreadStop);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBCommunication(%p)::ReadThreadStop ()...",
-                static_cast<void *>(m_opaque));
-
-  bool success = false;
-  if (m_opaque)
-    success = m_opaque->StopReadThread();
-
-  if (log)
-    log->Printf("SBCommunication(%p)::ReadThreadStop () => %i",
-                static_cast<void *>(m_opaque), success);
-
-  return success;
+  return m_opaque ? m_opaque->StopReadThread() : false;
 }
 
 bool SBCommunication::ReadThreadIsRunning() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBCommunication, ReadThreadIsRunning);
 
-  bool result = false;
-  if (m_opaque)
-    result = m_opaque->ReadThreadIsRunning();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBCommunication(%p)::ReadThreadIsRunning () => %i",
-                static_cast<void *>(m_opaque), result);
-  return result;
+  return m_opaque ? m_opaque->ReadThreadIsRunning() : false;
 }
 
 bool SBCommunication::SetReadThreadBytesReceivedCallback(
     ReadThreadBytesReceived callback, void *callback_baton) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   bool result = false;
   if (m_opaque) {
     m_opaque->SetReadThreadBytesReceivedCallback(callback, callback_baton);
     result = true;
   }
-
-  if (log)
-    log->Printf("SBCommunication(%p)::SetReadThreadBytesReceivedCallback "
-                "(callback=%p, baton=%p) => %i",
-                static_cast<void *>(m_opaque),
-                reinterpret_cast<void *>(reinterpret_cast<intptr_t>(callback)),
-                static_cast<void *>(callback_baton), result);
-
   return result;
 }
 
@@ -254,14 +158,6 @@ SBBroadcaster SBCommunication::GetBroadc
                              GetBroadcaster);
 
   SBBroadcaster broadcaster(m_opaque, false);
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBCommunication(%p)::GetBroadcaster () => SBBroadcaster (%p)",
-                static_cast<void *>(m_opaque),
-                static_cast<void *>(broadcaster.get()));
-
   return LLDB_RECORD_RESULT(broadcaster);
 }
 
@@ -271,20 +167,3 @@ const char *SBCommunication::GetBroadcas
 
   return Communication::GetStaticBroadcasterClass().AsCString();
 }
-
-//
-// void
-// SBCommunication::CreateIfNeeded ()
-//{
-//    if (m_opaque == NULL)
-//    {
-//        static uint32_t g_broadcaster_num;
-//        char broadcaster_name[256];
-//        ::snprintf (name, broadcaster_name, "%p SBCommunication", this);
-//        m_opaque = new Communication (broadcaster_name);
-//        m_opaque_owned = true;
-//    }
-//    assert (m_opaque);
-//}
-//
-//

Modified: lldb/trunk/source/API/SBCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCompileUnit.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCompileUnit.cpp (original)
+++ lldb/trunk/source/API/SBCompileUnit.cpp Thu Mar  7 14:47:13 2019
@@ -16,7 +16,6 @@
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/SymbolVendor.h"
 #include "lldb/Symbol/Type.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -57,14 +56,9 @@ SBFileSpec SBCompileUnit::GetFileSpec()
 uint32_t SBCompileUnit::GetNumLineEntries() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBCompileUnit, GetNumLineEntries);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (m_opaque_ptr) {
     LineTable *line_table = m_opaque_ptr->GetLineTable();
     if (line_table) {
-      if (log)
-        log->Printf("SBCompileUnit(%p)::GetNumLineEntries() => %d",
-                    static_cast<void *>(m_opaque_ptr),
-                    (int)line_table->GetSize());
       return line_table->GetSize();
     }
   }
@@ -75,8 +69,6 @@ SBLineEntry SBCompileUnit::GetLineEntryA
   LLDB_RECORD_METHOD_CONST(lldb::SBLineEntry, SBCompileUnit,
                            GetLineEntryAtIndex, (uint32_t), idx);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBLineEntry sb_line_entry;
   if (m_opaque_ptr) {
     LineTable *line_table = m_opaque_ptr->GetLineTable();
@@ -87,15 +79,6 @@ SBLineEntry SBCompileUnit::GetLineEntryA
     }
   }
 
-  if (log) {
-    SBStream sstr;
-    sb_line_entry.GetDescription(sstr);
-    log->Printf("SBCompileUnit(%p)::GetLineEntryAtIndex (idx=%u) => "
-                "SBLineEntry(%p): '%s'",
-                static_cast<void *>(m_opaque_ptr), idx,
-                static_cast<void *>(sb_line_entry.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_line_entry);
 }
 
@@ -116,8 +99,6 @@ uint32_t SBCompileUnit::FindLineEntryInd
                            (uint32_t, uint32_t, lldb::SBFileSpec *, bool),
                            start_idx, line, inline_file_spec, exact);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t index = UINT32_MAX;
   if (m_opaque_ptr) {
     FileSpec file_spec;
@@ -131,26 +112,6 @@ uint32_t SBCompileUnit::FindLineEntryInd
         exact, NULL);
   }
 
-  if (log) {
-    SBStream sstr;
-    if (index == UINT32_MAX) {
-      log->Printf("SBCompileUnit(%p)::FindLineEntryIndex (start_idx=%u, "
-                  "line=%u, SBFileSpec(%p)) => NOT FOUND",
-                  static_cast<void *>(m_opaque_ptr), start_idx, line,
-                  inline_file_spec
-                      ? static_cast<const void *>(inline_file_spec->get())
-                      : NULL);
-    } else {
-      log->Printf("SBCompileUnit(%p)::FindLineEntryIndex (start_idx=%u, "
-                  "line=%u, SBFileSpec(%p)) => %u",
-                  static_cast<void *>(m_opaque_ptr), start_idx, line,
-                  inline_file_spec
-                      ? static_cast<const void *>(inline_file_spec->get())
-                      : NULL,
-                  index);
-    }
-  }
-
   return index;
 }
 
@@ -192,8 +153,6 @@ SBFileSpec SBCompileUnit::GetSupportFile
   LLDB_RECORD_METHOD_CONST(lldb::SBFileSpec, SBCompileUnit,
                            GetSupportFileAtIndex, (uint32_t), idx);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBFileSpec sb_file_spec;
   if (m_opaque_ptr) {
     FileSpecList &support_files = m_opaque_ptr->GetSupportFiles();
@@ -201,14 +160,6 @@ SBFileSpec SBCompileUnit::GetSupportFile
     sb_file_spec.SetFileSpec(file_spec);
   }
 
-  if (log) {
-    SBStream sstr;
-    sb_file_spec.GetDescription(sstr);
-    log->Printf("SBCompileUnit(%p)::GetGetFileSpecAtIndex (idx=%u) => "
-                "SBFileSpec(%p): '%s'",
-                static_cast<void *>(m_opaque_ptr), idx,
-                static_cast<const void *>(sb_file_spec.get()), sstr.GetData());
-  }
 
   return LLDB_RECORD_RESULT(sb_file_spec);
 }

Modified: lldb/trunk/source/API/SBData.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBData.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBData.cpp (original)
+++ lldb/trunk/source/API/SBData.cpp Thu Mar  7 14:47:13 2019
@@ -14,7 +14,6 @@
 #include "lldb/Core/DumpDataExtractor.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include <cinttypes>
@@ -67,14 +66,9 @@ bool SBData::IsValid() {
 uint8_t SBData::GetAddressByteSize() {
   LLDB_RECORD_METHOD_NO_ARGS(uint8_t, SBData, GetAddressByteSize);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   uint8_t value = 0;
   if (m_opaque_sp.get())
     value = m_opaque_sp->GetAddressByteSize();
-  if (log)
-    log->Printf("SBData::GetAddressByteSize () => "
-                "(%i)",
-                value);
   return value;
 }
 
@@ -82,11 +76,8 @@ void SBData::SetAddressByteSize(uint8_t
   LLDB_RECORD_METHOD(void, SBData, SetAddressByteSize, (uint8_t),
                      addr_byte_size);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (m_opaque_sp.get())
     m_opaque_sp->SetAddressByteSize(addr_byte_size);
-  if (log)
-    log->Printf("SBData::SetAddressByteSize (%i)", addr_byte_size);
 }
 
 void SBData::Clear() {
@@ -99,46 +90,32 @@ void SBData::Clear() {
 size_t SBData::GetByteSize() {
   LLDB_RECORD_METHOD_NO_ARGS(size_t, SBData, GetByteSize);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   size_t value = 0;
   if (m_opaque_sp.get())
     value = m_opaque_sp->GetByteSize();
-  if (log)
-    log->Printf("SBData::GetByteSize () => "
-                "( %" PRIu64 " )",
-                (uint64_t)value);
   return value;
 }
 
 lldb::ByteOrder SBData::GetByteOrder() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::ByteOrder, SBData, GetByteOrder);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   lldb::ByteOrder value = eByteOrderInvalid;
   if (m_opaque_sp.get())
     value = m_opaque_sp->GetByteOrder();
-  if (log)
-    log->Printf("SBData::GetByteOrder () => "
-                "(%i)",
-                value);
   return value;
 }
 
 void SBData::SetByteOrder(lldb::ByteOrder endian) {
   LLDB_RECORD_METHOD(void, SBData, SetByteOrder, (lldb::ByteOrder), endian);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (m_opaque_sp.get())
     m_opaque_sp->SetByteOrder(endian);
-  if (log)
-    log->Printf("SBData::GetByteOrder (%i)", endian);
 }
 
 float SBData::GetFloat(lldb::SBError &error, lldb::offset_t offset) {
   LLDB_RECORD_METHOD(float, SBData, GetFloat, (lldb::SBError &, lldb::offset_t),
                      error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   float value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -148,9 +125,6 @@ float SBData::GetFloat(lldb::SBError &er
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetFloat (error=%p,offset=%" PRIu64 ") => (%f)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -158,7 +132,6 @@ double SBData::GetDouble(lldb::SBError &
   LLDB_RECORD_METHOD(double, SBData, GetDouble,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   double value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -168,10 +141,6 @@ double SBData::GetDouble(lldb::SBError &
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetDouble (error=%p,offset=%" PRIu64 ") => "
-                "(%f)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -179,7 +148,6 @@ long double SBData::GetLongDouble(lldb::
   LLDB_RECORD_METHOD(long double, SBData, GetLongDouble,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   long double value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -189,10 +157,6 @@ long double SBData::GetLongDouble(lldb::
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetLongDouble (error=%p,offset=%" PRIu64 ") => "
-                "(%Lf)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -200,7 +164,6 @@ lldb::addr_t SBData::GetAddress(lldb::SB
   LLDB_RECORD_METHOD(lldb::addr_t, SBData, GetAddress,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   lldb::addr_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -210,11 +173,6 @@ lldb::addr_t SBData::GetAddress(lldb::SB
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetAddress (error=%p,offset=%" PRIu64 ") => "
-                "(%p)",
-                static_cast<void *>(error.get()), offset,
-                reinterpret_cast<void *>(value));
   return value;
 }
 
@@ -222,7 +180,6 @@ uint8_t SBData::GetUnsignedInt8(lldb::SB
   LLDB_RECORD_METHOD(uint8_t, SBData, GetUnsignedInt8,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   uint8_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -232,10 +189,6 @@ uint8_t SBData::GetUnsignedInt8(lldb::SB
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetUnsignedInt8 (error=%p,offset=%" PRIu64 ") => "
-                "(%c)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -243,7 +196,6 @@ uint16_t SBData::GetUnsignedInt16(lldb::
   LLDB_RECORD_METHOD(uint16_t, SBData, GetUnsignedInt16,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   uint16_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -253,10 +205,6 @@ uint16_t SBData::GetUnsignedInt16(lldb::
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetUnsignedInt16 (error=%p,offset=%" PRIu64 ") => "
-                "(%hd)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -264,7 +212,6 @@ uint32_t SBData::GetUnsignedInt32(lldb::
   LLDB_RECORD_METHOD(uint32_t, SBData, GetUnsignedInt32,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   uint32_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -274,10 +221,6 @@ uint32_t SBData::GetUnsignedInt32(lldb::
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetUnsignedInt32 (error=%p,offset=%" PRIu64 ") => "
-                "(%d)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -285,7 +228,6 @@ uint64_t SBData::GetUnsignedInt64(lldb::
   LLDB_RECORD_METHOD(uint64_t, SBData, GetUnsignedInt64,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   uint64_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -295,10 +237,6 @@ uint64_t SBData::GetUnsignedInt64(lldb::
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetUnsignedInt64 (error=%p,offset=%" PRIu64 ") => "
-                "(%" PRId64 ")",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -306,7 +244,6 @@ int8_t SBData::GetSignedInt8(lldb::SBErr
   LLDB_RECORD_METHOD(int8_t, SBData, GetSignedInt8,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   int8_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -316,10 +253,6 @@ int8_t SBData::GetSignedInt8(lldb::SBErr
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetSignedInt8 (error=%p,offset=%" PRIu64 ") => "
-                "(%c)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -327,7 +260,6 @@ int16_t SBData::GetSignedInt16(lldb::SBE
   LLDB_RECORD_METHOD(int16_t, SBData, GetSignedInt16,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   int16_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -337,10 +269,6 @@ int16_t SBData::GetSignedInt16(lldb::SBE
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetSignedInt16 (error=%p,offset=%" PRIu64 ") => "
-                "(%hd)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -348,7 +276,6 @@ int32_t SBData::GetSignedInt32(lldb::SBE
   LLDB_RECORD_METHOD(int32_t, SBData, GetSignedInt32,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   int32_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -358,10 +285,6 @@ int32_t SBData::GetSignedInt32(lldb::SBE
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetSignedInt32 (error=%p,offset=%" PRIu64 ") => "
-                "(%d)",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -369,7 +292,6 @@ int64_t SBData::GetSignedInt64(lldb::SBE
   LLDB_RECORD_METHOD(int64_t, SBData, GetSignedInt64,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   int64_t value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -379,10 +301,6 @@ int64_t SBData::GetSignedInt64(lldb::SBE
     if (offset == old_offset)
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetSignedInt64 (error=%p,offset=%" PRIu64 ") => "
-                "(%" PRId64 ")",
-                static_cast<void *>(error.get()), offset, value);
   return value;
 }
 
@@ -390,7 +308,6 @@ const char *SBData::GetString(lldb::SBEr
   LLDB_RECORD_METHOD(const char *, SBData, GetString,
                      (lldb::SBError &, lldb::offset_t), error, offset);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *value = 0;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -400,10 +317,6 @@ const char *SBData::GetString(lldb::SBEr
     if (offset == old_offset || (value == NULL))
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::GetString (error=%p,offset=%" PRIu64 ") => (%p)",
-                static_cast<void *>(error.get()), offset,
-                static_cast<const void *>(value));
   return value;
 }
 
@@ -425,7 +338,6 @@ bool SBData::GetDescription(lldb::SBStre
 
 size_t SBData::ReadRawData(lldb::SBError &error, lldb::offset_t offset,
                            void *buf, size_t size) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   void *ok = NULL;
   if (!m_opaque_sp.get()) {
     error.SetErrorString("no value to read from");
@@ -435,19 +347,11 @@ size_t SBData::ReadRawData(lldb::SBError
     if ((offset == old_offset) || (ok == NULL))
       error.SetErrorString("unable to read data");
   }
-  if (log)
-    log->Printf("SBData::ReadRawData (error=%p,offset=%" PRIu64
-                ",buf=%p,size=%" PRIu64 ") => "
-                "(%p)",
-                static_cast<void *>(error.get()), offset,
-                static_cast<void *>(buf), static_cast<uint64_t>(size),
-                static_cast<void *>(ok));
   return ok ? size : 0;
 }
 
 void SBData::SetData(lldb::SBError &error, const void *buf, size_t size,
                      lldb::ByteOrder endian, uint8_t addr_size) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (!m_opaque_sp.get())
     m_opaque_sp = std::make_shared<DataExtractor>(buf, size, endian, addr_size);
   else
@@ -456,25 +360,14 @@ void SBData::SetData(lldb::SBError &erro
     m_opaque_sp->SetAddressByteSize(addr_size);
   }
 
-  if (log)
-    log->Printf("SBData::SetData (error=%p,buf=%p,size=%" PRIu64
-                ",endian=%d,addr_size=%c) => "
-                "(%p)",
-                static_cast<void *>(error.get()),
-                static_cast<const void *>(buf), static_cast<uint64_t>(size),
-                endian, addr_size, static_cast<void *>(m_opaque_sp.get()));
 }
 
 bool SBData::Append(const SBData &rhs) {
   LLDB_RECORD_METHOD(bool, SBData, Append, (const lldb::SBData &), rhs);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   bool value = false;
   if (m_opaque_sp.get() && rhs.m_opaque_sp.get())
     value = m_opaque_sp.get()->Append(*rhs.m_opaque_sp);
-  if (log)
-    log->Printf("SBData::Append (rhs=%p) => (%s)",
-                static_cast<void *>(rhs.get()), value ? "true" : "false");
   return value;
 }
 
@@ -612,12 +505,8 @@ lldb::SBData SBData::CreateDataFromDoubl
 bool SBData::SetDataFromCString(const char *data) {
   LLDB_RECORD_METHOD(bool, SBData, SetDataFromCString, (const char *), data);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   if (!data) {
-    if (log)
-      log->Printf("SBData::SetDataFromCString (data=%p) => false",
-                  static_cast<const void *>(data));
     return false;
   }
 
@@ -631,9 +520,6 @@ bool SBData::SetDataFromCString(const ch
   else
     m_opaque_sp->SetData(buffer_sp);
 
-  if (log)
-    log->Printf("SBData::SetDataFromCString (data=%p) => true",
-                static_cast<const void *>(data));
 
   return true;
 }
@@ -642,15 +528,8 @@ bool SBData::SetDataFromUInt64Array(uint
   LLDB_RECORD_METHOD(bool, SBData, SetDataFromUInt64Array, (uint64_t *, size_t),
                      array, array_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   if (!array || array_len == 0) {
-    if (log)
-      log->Printf(
-          "SBData::SetDataFromUInt64Array (array=%p, array_len = %" PRIu64
-          ") => "
-          "false",
-          static_cast<void *>(array), static_cast<uint64_t>(array_len));
     return false;
   }
 
@@ -664,11 +543,6 @@ bool SBData::SetDataFromUInt64Array(uint
   else
     m_opaque_sp->SetData(buffer_sp);
 
-  if (log)
-    log->Printf("SBData::SetDataFromUInt64Array (array=%p, array_len = %" PRIu64
-                ") => "
-                "true",
-                static_cast<void *>(array), static_cast<uint64_t>(array_len));
 
   return true;
 }
@@ -677,15 +551,8 @@ bool SBData::SetDataFromUInt32Array(uint
   LLDB_RECORD_METHOD(bool, SBData, SetDataFromUInt32Array, (uint32_t *, size_t),
                      array, array_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   if (!array || array_len == 0) {
-    if (log)
-      log->Printf(
-          "SBData::SetDataFromUInt32Array (array=%p, array_len = %" PRIu64
-          ") => "
-          "false",
-          static_cast<void *>(array), static_cast<uint64_t>(array_len));
     return false;
   }
 
@@ -699,12 +566,6 @@ bool SBData::SetDataFromUInt32Array(uint
   else
     m_opaque_sp->SetData(buffer_sp);
 
-  if (log)
-    log->Printf("SBData::SetDataFromUInt32Array (array=%p, array_len = %" PRIu64
-                ") => "
-                "true",
-                static_cast<void *>(array), static_cast<uint64_t>(array_len));
-
   return true;
 }
 
@@ -712,15 +573,8 @@ bool SBData::SetDataFromSInt64Array(int6
   LLDB_RECORD_METHOD(bool, SBData, SetDataFromSInt64Array, (int64_t *, size_t),
                      array, array_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   if (!array || array_len == 0) {
-    if (log)
-      log->Printf(
-          "SBData::SetDataFromSInt64Array (array=%p, array_len = %" PRIu64
-          ") => "
-          "false",
-          static_cast<void *>(array), static_cast<uint64_t>(array_len));
     return false;
   }
 
@@ -734,12 +588,6 @@ bool SBData::SetDataFromSInt64Array(int6
   else
     m_opaque_sp->SetData(buffer_sp);
 
-  if (log)
-    log->Printf("SBData::SetDataFromSInt64Array (array=%p, array_len = %" PRIu64
-                ") => "
-                "true",
-                static_cast<void *>(array), static_cast<uint64_t>(array_len));
-
   return true;
 }
 
@@ -747,15 +595,8 @@ bool SBData::SetDataFromSInt32Array(int3
   LLDB_RECORD_METHOD(bool, SBData, SetDataFromSInt32Array, (int32_t *, size_t),
                      array, array_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   if (!array || array_len == 0) {
-    if (log)
-      log->Printf(
-          "SBData::SetDataFromSInt32Array (array=%p, array_len = %" PRIu64
-          ") => "
-          "false",
-          static_cast<void *>(array), static_cast<uint64_t>(array_len));
     return false;
   }
 
@@ -769,12 +610,6 @@ bool SBData::SetDataFromSInt32Array(int3
   else
     m_opaque_sp->SetData(buffer_sp);
 
-  if (log)
-    log->Printf("SBData::SetDataFromSInt32Array (array=%p, array_len = %" PRIu64
-                ") => "
-                "true",
-                static_cast<void *>(array), static_cast<uint64_t>(array_len));
-
   return true;
 }
 
@@ -782,15 +617,8 @@ bool SBData::SetDataFromDoubleArray(doub
   LLDB_RECORD_METHOD(bool, SBData, SetDataFromDoubleArray, (double *, size_t),
                      array, array_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   if (!array || array_len == 0) {
-    if (log)
-      log->Printf(
-          "SBData::SetDataFromDoubleArray (array=%p, array_len = %" PRIu64
-          ") => "
-          "false",
-          static_cast<void *>(array), static_cast<uint64_t>(array_len));
     return false;
   }
 
@@ -804,11 +632,5 @@ bool SBData::SetDataFromDoubleArray(doub
   else
     m_opaque_sp->SetData(buffer_sp);
 
-  if (log)
-    log->Printf("SBData::SetDataFromDoubleArray (array=%p, array_len = %" PRIu64
-                ") => "
-                "true",
-                static_cast<void *>(array), static_cast<uint64_t>(array_len));
-
   return true;
 }

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Thu Mar  7 14:47:13 2019
@@ -184,10 +184,7 @@ lldb::SBError SBDebugger::InitializeWith
   LLDB_RECORD_STATIC_METHOD_NO_ARGS(lldb::SBError, SBDebugger,
                                     InitializeWithErrorHandling);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
-  if (log)
-    log->Printf("SBDebugger::Initialize ()");
 
   SBError error;
   if (auto e = g_debugger_lifetime->Initialize(
@@ -206,11 +203,6 @@ void SBDebugger::Terminate() {
 void SBDebugger::Clear() {
   LLDB_RECORD_METHOD_NO_ARGS(void, SBDebugger, Clear);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBDebugger(%p)::Clear ()",
-                static_cast<void *>(m_opaque_sp.get()));
 
   if (m_opaque_sp)
     m_opaque_sp->ClearIOHandlers();
@@ -236,7 +228,6 @@ SBDebugger SBDebugger::Create(bool sourc
                               lldb::LogOutputCallback callback, void *baton)
 
 {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBDebugger debugger;
 
@@ -250,13 +241,6 @@ SBDebugger SBDebugger::Create(bool sourc
 
   debugger.reset(Debugger::CreateInstance(callback, baton));
 
-  if (log) {
-    SBStream sstr;
-    debugger.GetDescription(sstr);
-    log->Printf("SBDebugger::Create () => SBDebugger(%p): %s",
-                static_cast<void *>(debugger.m_opaque_sp.get()),
-                sstr.GetData());
-  }
 
   SBCommandInterpreter interp = debugger.GetCommandInterpreter();
   if (source_init_files) {
@@ -275,15 +259,6 @@ void SBDebugger::Destroy(SBDebugger &deb
   LLDB_RECORD_STATIC_METHOD(void, SBDebugger, Destroy, (lldb::SBDebugger &),
                             debugger);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log) {
-    SBStream sstr;
-    debugger.GetDescription(sstr);
-    log->Printf("SBDebugger::Destroy () => SBDebugger(%p): %s",
-                static_cast<void *>(debugger.m_opaque_sp.get()),
-                sstr.GetData());
-  }
 
   Debugger::Destroy(debugger.m_opaque_sp);
 
@@ -298,13 +273,8 @@ void SBDebugger::MemoryPressureDetected(
   // mandatory. We have seen deadlocks with this function when called so we
   // need to safeguard against this until we can determine what is causing the
   // deadlocks.
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   const bool mandatory = false;
-  if (log) {
-    log->Printf("SBDebugger::MemoryPressureDetected (), mandatory = %d",
-                mandatory);
-  }
 
   ModuleList::RemoveOrphanSharedModules(mandatory);
 }
@@ -349,14 +319,6 @@ void SBDebugger::SetInputFileHandle(FILE
   LLDB_RECORD_METHOD(void, SBDebugger, SetInputFileHandle, (FILE *, bool), fh,
                      transfer_ownership);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf(
-        "SBDebugger(%p)::SetInputFileHandle (fh=%p, transfer_ownership=%i)",
-        static_cast<void *>(m_opaque_sp.get()), static_cast<void *>(fh),
-        transfer_ownership);
-
   if (!m_opaque_sp)
     return;
 
@@ -375,14 +337,6 @@ void SBDebugger::SetOutputFileHandle(FIL
   LLDB_RECORD_METHOD(void, SBDebugger, SetOutputFileHandle, (FILE *, bool), fh,
                      transfer_ownership);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf(
-        "SBDebugger(%p)::SetOutputFileHandle (fh=%p, transfer_ownership=%i)",
-        static_cast<void *>(m_opaque_sp.get()), static_cast<void *>(fh),
-        transfer_ownership);
-
   if (m_opaque_sp)
     m_opaque_sp->SetOutputFileHandle(fh, transfer_ownership);
 }
@@ -391,13 +345,6 @@ void SBDebugger::SetErrorFileHandle(FILE
   LLDB_RECORD_METHOD(void, SBDebugger, SetErrorFileHandle, (FILE *, bool), fh,
                      transfer_ownership);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf(
-        "SBDebugger(%p)::SetErrorFileHandle (fh=%p, transfer_ownership=%i)",
-        static_cast<void *>(m_opaque_sp.get()), static_cast<void *>(fh),
-        transfer_ownership);
 
   if (m_opaque_sp)
     m_opaque_sp->SetErrorFileHandle(fh, transfer_ownership);
@@ -453,17 +400,11 @@ SBCommandInterpreter SBDebugger::GetComm
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBCommandInterpreter, SBDebugger,
                              GetCommandInterpreter);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBCommandInterpreter sb_interpreter;
   if (m_opaque_sp)
     sb_interpreter.reset(&m_opaque_sp->GetCommandInterpreter());
 
-  if (log)
-    log->Printf(
-        "SBDebugger(%p)::GetCommandInterpreter () => SBCommandInterpreter(%p)",
-        static_cast<void *>(m_opaque_sp.get()),
-        static_cast<void *>(sb_interpreter.get()));
 
   return LLDB_RECORD_RESULT(sb_interpreter);
 }
@@ -507,16 +448,11 @@ void SBDebugger::HandleCommand(const cha
 SBListener SBDebugger::GetListener() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBListener, SBDebugger, GetListener);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBListener sb_listener;
   if (m_opaque_sp)
     sb_listener.reset(m_opaque_sp->GetListener());
 
-  if (log)
-    log->Printf("SBDebugger(%p)::GetListener () => SBListener(%p)",
-                static_cast<void *>(m_opaque_sp.get()),
-                static_cast<void *>(sb_listener.get()));
 
   return LLDB_RECORD_RESULT(sb_listener);
 }
@@ -676,12 +612,8 @@ bool SBDebugger::StateIsRunningState(Sta
   LLDB_RECORD_STATIC_METHOD(bool, SBDebugger, StateIsRunningState,
                             (lldb::StateType), state);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   const bool result = lldb_private::StateIsRunningState(state);
-  if (log)
-    log->Printf("SBDebugger::StateIsRunningState (state=%s) => %i",
-                StateAsCString(state), result);
 
   return result;
 }
@@ -690,12 +622,8 @@ bool SBDebugger::StateIsStoppedState(Sta
   LLDB_RECORD_STATIC_METHOD(bool, SBDebugger, StateIsStoppedState,
                             (lldb::StateType), state);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   const bool result = lldb_private::StateIsStoppedState(state, false);
-  if (log)
-    log->Printf("SBDebugger::StateIsStoppedState (state=%s) => %i",
-                StateAsCString(state), result);
 
   return result;
 }

Modified: lldb/trunk/source/API/SBDeclaration.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDeclaration.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDeclaration.cpp (original)
+++ lldb/trunk/source/API/SBDeclaration.cpp Thu Mar  7 14:47:13 2019
@@ -12,7 +12,6 @@
 #include "lldb/API/SBStream.h"
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Symbol/Declaration.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include <limits.h>
@@ -63,19 +62,11 @@ SBFileSpec SBDeclaration::GetFileSpec()
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBDeclaration,
                                    GetFileSpec);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBFileSpec sb_file_spec;
   if (m_opaque_up.get() && m_opaque_up->GetFile())
     sb_file_spec.SetFileSpec(m_opaque_up->GetFile());
 
-  if (log) {
-    SBStream sstr;
-    sb_file_spec.GetDescription(sstr);
-    log->Printf("SBLineEntry(%p)::GetFileSpec () => SBFileSpec(%p): %s",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<const void *>(sb_file_spec.get()), sstr.GetData());
-  }
 
   return LLDB_RECORD_RESULT(sb_file_spec);
 }
@@ -83,15 +74,11 @@ SBFileSpec SBDeclaration::GetFileSpec()
 uint32_t SBDeclaration::GetLine() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBDeclaration, GetLine);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   uint32_t line = 0;
   if (m_opaque_up)
     line = m_opaque_up->GetLine();
 
-  if (log)
-    log->Printf("SBLineEntry(%p)::GetLine () => %u",
-                static_cast<void *>(m_opaque_up.get()), line);
 
   return line;
 }

Modified: lldb/trunk/source/API/SBError.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBError.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBError.cpp (original)
+++ lldb/trunk/source/API/SBError.cpp Thu Mar  7 14:47:13 2019
@@ -10,7 +10,6 @@
 #include "SBReproducerPrivate.h"
 #include "Utils.h"
 #include "lldb/API/SBStream.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"
 
 #include <stdarg.h>
@@ -55,15 +54,10 @@ void SBError::Clear() {
 bool SBError::Fail() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBError, Fail);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   bool ret_value = false;
   if (m_opaque_up)
     ret_value = m_opaque_up->Fail();
 
-  if (log)
-    log->Printf("SBError(%p)::Fail () => %i",
-                static_cast<void *>(m_opaque_up.get()), ret_value);
 
   return ret_value;
 }
@@ -71,30 +65,21 @@ bool SBError::Fail() const {
 bool SBError::Success() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBError, Success);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   bool ret_value = true;
   if (m_opaque_up)
     ret_value = m_opaque_up->Success();
 
-  if (log)
-    log->Printf("SBError(%p)::Success () => %i",
-                static_cast<void *>(m_opaque_up.get()), ret_value);
-
   return ret_value;
 }
 
 uint32_t SBError::GetError() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBError, GetError);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   uint32_t err = 0;
   if (m_opaque_up)
     err = m_opaque_up->GetError();
 
-  if (log)
-    log->Printf("SBError(%p)::GetError () => 0x%8.8x",
-                static_cast<void *>(m_opaque_up.get()), err);
 
   return err;
 }
@@ -102,15 +87,10 @@ uint32_t SBError::GetError() const {
 ErrorType SBError::GetType() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::ErrorType, SBError, GetType);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ErrorType err_type = eErrorTypeInvalid;
   if (m_opaque_up)
     err_type = m_opaque_up->GetType();
 
-  if (log)
-    log->Printf("SBError(%p)::GetType () => %i",
-                static_cast<void *>(m_opaque_up.get()), err_type);
-
   return err_type;
 }
 

Modified: lldb/trunk/source/API/SBEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBEvent.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBEvent.cpp (original)
+++ lldb/trunk/source/API/SBEvent.cpp Thu Mar  7 14:47:13 2019
@@ -75,23 +75,12 @@ const char *SBEvent::GetDataFlavor() {
 uint32_t SBEvent::GetType() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBEvent, GetType);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   const Event *lldb_event = get();
   uint32_t event_type = 0;
   if (lldb_event)
     event_type = lldb_event->GetType();
 
-  if (log) {
-    StreamString sstr;
-    if (lldb_event && lldb_event->GetBroadcaster() &&
-        lldb_event->GetBroadcaster()->GetEventNames(sstr, event_type, true))
-      log->Printf("SBEvent(%p)::GetType () => 0x%8.8x (%s)",
-                  static_cast<void *>(get()), event_type, sstr.GetData());
-    else
-      log->Printf("SBEvent(%p)::GetType () => 0x%8.8x",
-                  static_cast<void *>(get()), event_type);
-  }
 
   return event_type;
 }
@@ -135,11 +124,6 @@ bool SBEvent::BroadcasterMatchesRef(cons
   if (lldb_event)
     success = lldb_event->BroadcasterIs(broadcaster.get());
 
-  // For logging, this gets a little chatty so only enable this when verbose
-  // logging is on
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  LLDB_LOGV(log, "({0}) (SBBroadcaster({1}): {2}) => {3}", get(),
-            broadcaster.get(), broadcaster.GetName(), success);
 
   return success;
 }
@@ -187,14 +171,6 @@ const char *SBEvent::GetCStringFromEvent
   LLDB_RECORD_STATIC_METHOD(const char *, SBEvent, GetCStringFromEvent,
                             (const lldb::SBEvent &), event);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBEvent(%p)::GetCStringFromEvent () => \"%s\"",
-                static_cast<void *>(event.get()),
-                reinterpret_cast<const char *>(
-                    EventDataBytes::GetBytesFromEvent(event.get())));
-
   return reinterpret_cast<const char *>(
       EventDataBytes::GetBytesFromEvent(event.get()));
 }

Modified: lldb/trunk/source/API/SBFileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFileSpec.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFileSpec.cpp (original)
+++ lldb/trunk/source/API/SBFileSpec.cpp Thu Mar  7 14:47:13 2019
@@ -13,7 +13,6 @@
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include "llvm/ADT/SmallString.h"
@@ -72,16 +71,7 @@ bool SBFileSpec::IsValid() const {
 bool SBFileSpec::Exists() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFileSpec, Exists);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  bool result = FileSystem::Instance().Exists(*m_opaque_up);
-
-  if (log)
-    log->Printf("SBFileSpec(%p)::Exists () => %s",
-                static_cast<void *>(m_opaque_up.get()),
-                (result ? "true" : "false"));
-
-  return result;
+  return FileSystem::Instance().Exists(*m_opaque_up);
 }
 
 bool SBFileSpec::ResolveExecutableLocation() {
@@ -105,19 +95,7 @@ int SBFileSpec::ResolvePath(const char *
 const char *SBFileSpec::GetFilename() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFileSpec, GetFilename);
 
-  const char *s = m_opaque_up->GetFilename().AsCString();
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (s)
-      log->Printf("SBFileSpec(%p)::GetFilename () => \"%s\"",
-                  static_cast<void *>(m_opaque_up.get()), s);
-    else
-      log->Printf("SBFileSpec(%p)::GetFilename () => NULL",
-                  static_cast<void *>(m_opaque_up.get()));
-  }
-
-  return s;
+  return m_opaque_up->GetFilename().AsCString();
 }
 
 const char *SBFileSpec::GetDirectory() const {
@@ -125,16 +103,6 @@ const char *SBFileSpec::GetDirectory() c
 
   FileSpec directory{*m_opaque_up};
   directory.GetFilename().Clear();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (directory)
-      log->Printf("SBFileSpec(%p)::GetDirectory () => \"%s\"",
-                  static_cast<void *>(m_opaque_up.get()),
-                  directory.GetCString());
-    else
-      log->Printf("SBFileSpec(%p)::GetDirectory () => NULL",
-                  static_cast<void *>(m_opaque_up.get()));
-  }
   return directory.GetCString();
 }
 
@@ -160,16 +128,8 @@ uint32_t SBFileSpec::GetPath(char *dst_p
   LLDB_RECORD_METHOD_CONST(uint32_t, SBFileSpec, GetPath, (char *, size_t),
                            dst_path, dst_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t result = m_opaque_up->GetPath(dst_path, dst_len);
 
-  if (log)
-    log->Printf("SBFileSpec(%p)::GetPath (dst_path=\"%.*s\", dst_len=%" PRIu64
-                ") => %u",
-                static_cast<void *>(m_opaque_up.get()), result, dst_path,
-                static_cast<uint64_t>(dst_len), result);
-
   if (result == 0 && dst_path && dst_len > 0)
     *dst_path = '\0';
   return result;

Modified: lldb/trunk/source/API/SBFileSpecList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFileSpecList.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFileSpecList.cpp (original)
+++ lldb/trunk/source/API/SBFileSpecList.cpp Thu Mar  7 14:47:13 2019
@@ -14,7 +14,6 @@
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include <limits.h>
@@ -29,16 +28,8 @@ SBFileSpecList::SBFileSpecList() : m_opa
 SBFileSpecList::SBFileSpecList(const SBFileSpecList &rhs) : m_opaque_up() {
   LLDB_RECORD_CONSTRUCTOR(SBFileSpecList, (const lldb::SBFileSpecList &), rhs);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   m_opaque_up = clone(rhs.m_opaque_up);
-
-  if (log) {
-    log->Printf("SBFileSpecList::SBFileSpecList (const SBFileSpecList "
-                "rhs.ap=%p) => SBFileSpecList(%p)",
-                static_cast<void *>(rhs.m_opaque_up.get()),
-                static_cast<void *>(m_opaque_up.get()));
-  }
 }
 
 SBFileSpecList::~SBFileSpecList() {}

Modified: lldb/trunk/source/API/SBFrame.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFrame.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFrame.cpp (original)
+++ lldb/trunk/source/API/SBFrame.cpp Thu Mar  7 14:47:13 2019
@@ -38,7 +38,6 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include "lldb/API/SBAddress.h"
@@ -63,16 +62,6 @@ SBFrame::SBFrame(const StackFrameSP &lld
     : m_opaque_sp(new ExecutionContextRef(lldb_object_sp)) {
   LLDB_RECORD_CONSTRUCTOR(SBFrame, (const lldb::StackFrameSP &),
                           lldb_object_sp);
-
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log) {
-    SBStream sstr;
-    GetDescription(sstr);
-    log->Printf("SBFrame::SBFrame (sp=%p) => SBFrame(%p): %s",
-                static_cast<void *>(lldb_object_sp.get()),
-                static_cast<void *>(lldb_object_sp.get()), sstr.GetData());
-  }
 }
 
 SBFrame::SBFrame(const SBFrame &rhs) : m_opaque_sp() {
@@ -122,7 +111,6 @@ SBSymbolContext SBFrame::GetSymbolContex
   LLDB_RECORD_METHOD_CONST(lldb::SBSymbolContext, SBFrame, GetSymbolContext,
                            (uint32_t), resolve_scope);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBSymbolContext sb_sym_ctx;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -134,33 +122,17 @@ SBSymbolContext SBFrame::GetSymbolContex
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process->GetRunLock())) {
       frame = exe_ctx.GetFramePtr();
-      if (frame) {
+      if (frame)
         sb_sym_ctx.SetSymbolContext(&frame->GetSymbolContext(scope));
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetVariables () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf(
-            "SBFrame::GetSymbolContext () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::GetSymbolContext (resolve_scope=0x%8.8x) => "
-                "SBSymbolContext(%p)",
-                static_cast<void *>(frame), resolve_scope,
-                static_cast<void *>(sb_sym_ctx.get()));
-
   return LLDB_RECORD_RESULT(sb_sym_ctx);
 }
 
 SBModule SBFrame::GetModule() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBModule, SBFrame, GetModule);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBModule sb_module;
   ModuleSP module_sp;
   std::unique_lock<std::recursive_mutex> lock;
@@ -176,22 +148,10 @@ SBModule SBFrame::GetModule() const {
       if (frame) {
         module_sp = frame->GetSymbolContext(eSymbolContextModule).module_sp;
         sb_module.SetSP(module_sp);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetModule () => error: could not reconstruct "
-                      "frame object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetModule () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::GetModule () => SBModule(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(module_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_module);
 }
 
@@ -199,7 +159,6 @@ SBCompileUnit SBFrame::GetCompileUnit()
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBCompileUnit, SBFrame,
                                    GetCompileUnit);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBCompileUnit sb_comp_unit;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -214,20 +173,9 @@ SBCompileUnit SBFrame::GetCompileUnit()
       if (frame) {
         sb_comp_unit.reset(
             frame->GetSymbolContext(eSymbolContextCompUnit).comp_unit);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetCompileUnit () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetCompileUnit () => error: process is running");
+      }
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetCompileUnit () => SBCompileUnit(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(sb_comp_unit.get()));
 
   return LLDB_RECORD_RESULT(sb_comp_unit);
 }
@@ -235,7 +183,6 @@ SBCompileUnit SBFrame::GetCompileUnit()
 SBFunction SBFrame::GetFunction() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFunction, SBFrame, GetFunction);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBFunction sb_function;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -250,20 +197,9 @@ SBFunction SBFrame::GetFunction() const
       if (frame) {
         sb_function.reset(
             frame->GetSymbolContext(eSymbolContextFunction).function);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetFunction () => error: could not reconstruct "
-                      "frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetFunction () => error: process is running");
+      }
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetFunction () => SBFunction(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(sb_function.get()));
 
   return LLDB_RECORD_RESULT(sb_function);
 }
@@ -271,7 +207,6 @@ SBFunction SBFrame::GetFunction() const
 SBSymbol SBFrame::GetSymbol() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBSymbol, SBFrame, GetSymbol);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBSymbol sb_symbol;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -285,27 +220,16 @@ SBSymbol SBFrame::GetSymbol() const {
       frame = exe_ctx.GetFramePtr();
       if (frame) {
         sb_symbol.reset(frame->GetSymbolContext(eSymbolContextSymbol).symbol);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetSymbol () => error: could not reconstruct "
-                      "frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetSymbol () => error: process is running");
+      }
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetSymbol () => SBSymbol(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(sb_symbol.get()));
+
   return LLDB_RECORD_RESULT(sb_symbol);
 }
 
 SBBlock SBFrame::GetBlock() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBlock, SBFrame, GetBlock);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBBlock sb_block;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -317,23 +241,10 @@ SBBlock SBFrame::GetBlock() const {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process->GetRunLock())) {
       frame = exe_ctx.GetFramePtr();
-      if (frame) {
+      if (frame)
         sb_block.SetPtr(frame->GetSymbolContext(eSymbolContextBlock).block);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetBlock () => error: could not reconstruct "
-                      "frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame(%p)::GetBlock () => error: process is running",
-                    static_cast<void *>(frame));
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetBlock () => SBBlock(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(sb_block.GetPtr()));
   return LLDB_RECORD_RESULT(sb_block);
 }
 
@@ -346,35 +257,21 @@ SBBlock SBFrame::GetFrameBlock() const {
 
   StackFrame *frame = nullptr;
   Target *target = exe_ctx.GetTargetPtr();
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   Process *process = exe_ctx.GetProcessPtr();
   if (target && process) {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process->GetRunLock())) {
       frame = exe_ctx.GetFramePtr();
-      if (frame) {
+      if (frame)
         sb_block.SetPtr(frame->GetFrameBlock());
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetFrameBlock () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetFrameBlock () => error: process is running");
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetFrameBlock () => SBBlock(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(sb_block.GetPtr()));
   return LLDB_RECORD_RESULT(sb_block);
 }
 
 SBLineEntry SBFrame::GetLineEntry() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBLineEntry, SBFrame, GetLineEntry);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBLineEntry sb_line_entry;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -389,20 +286,9 @@ SBLineEntry SBFrame::GetLineEntry() cons
       if (frame) {
         sb_line_entry.SetLineEntry(
             frame->GetSymbolContext(eSymbolContextLineEntry).line_entry);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetLineEntry () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetLineEntry () => error: process is running");
+      }
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetLineEntry () => SBLineEntry(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(sb_line_entry.get()));
   return LLDB_RECORD_RESULT(sb_line_entry);
 }
 
@@ -418,10 +304,6 @@ uint32_t SBFrame::GetFrameID() const {
   if (frame)
     frame_idx = frame->GetFrameIndex();
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBFrame(%p)::GetFrameID () => %u", static_cast<void *>(frame),
-                frame_idx);
   return frame_idx;
 }
 
@@ -440,7 +322,6 @@ lldb::addr_t SBFrame::GetCFA() const {
 addr_t SBFrame::GetPC() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetPC);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   addr_t addr = LLDB_INVALID_ADDRESS;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -455,28 +336,16 @@ addr_t SBFrame::GetPC() const {
       if (frame) {
         addr = frame->GetFrameCodeAddress().GetOpcodeLoadAddress(
             target, AddressClass::eCode);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetPC () => error: could not reconstruct frame "
-                      "object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetPC () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::GetPC () => 0x%" PRIx64,
-                static_cast<void *>(frame), addr);
-
   return addr;
 }
 
 bool SBFrame::SetPC(addr_t new_pc) {
   LLDB_RECORD_METHOD(bool, SBFrame, SetPC, (lldb::addr_t), new_pc);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   bool ret_val = false;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -490,28 +359,16 @@ bool SBFrame::SetPC(addr_t new_pc) {
       frame = exe_ctx.GetFramePtr();
       if (frame) {
         ret_val = frame->GetRegisterContext()->SetPC(new_pc);
-      } else {
-        if (log)
-          log->Printf("SBFrame::SetPC () => error: could not reconstruct frame "
-                      "object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::SetPC () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::SetPC (new_pc=0x%" PRIx64 ") => %i",
-                static_cast<void *>(frame), new_pc, ret_val);
-
   return ret_val;
 }
 
 addr_t SBFrame::GetSP() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetSP);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   addr_t addr = LLDB_INVALID_ADDRESS;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -525,19 +382,9 @@ addr_t SBFrame::GetSP() const {
       frame = exe_ctx.GetFramePtr();
       if (frame) {
         addr = frame->GetRegisterContext()->GetSP();
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetSP () => error: could not reconstruct frame "
-                      "object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetSP () => error: process is running");
+      }
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetSP () => 0x%" PRIx64,
-                static_cast<void *>(frame), addr);
 
   return addr;
 }
@@ -545,7 +392,6 @@ addr_t SBFrame::GetSP() const {
 addr_t SBFrame::GetFP() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::addr_t, SBFrame, GetFP);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   addr_t addr = LLDB_INVALID_ADDRESS;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -557,29 +403,17 @@ addr_t SBFrame::GetFP() const {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process->GetRunLock())) {
       frame = exe_ctx.GetFramePtr();
-      if (frame) {
+      if (frame)
         addr = frame->GetRegisterContext()->GetFP();
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetFP () => error: could not reconstruct frame "
-                      "object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetFP () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::GetFP () => 0x%" PRIx64,
-                static_cast<void *>(frame), addr);
   return addr;
 }
 
 SBAddress SBFrame::GetPCAddress() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBFrame, GetPCAddress);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBAddress sb_addr;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -591,21 +425,10 @@ SBAddress SBFrame::GetPCAddress() const
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process->GetRunLock())) {
       frame = exe_ctx.GetFramePtr();
-      if (frame) {
+      if (frame)
         sb_addr.SetAddress(&frame->GetFrameCodeAddress());
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetPCAddress () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetPCAddress () => error: process is running");
     }
   }
-  if (log)
-    log->Printf("SBFrame(%p)::GetPCAddress () => SBAddress(%p)",
-                static_cast<void *>(frame), static_cast<void *>(sb_addr.get()));
   return LLDB_RECORD_RESULT(sb_addr);
 }
 
@@ -640,11 +463,7 @@ lldb::SBValue SBFrame::GetValueForVariab
                      use_dynamic);
 
   SBValue sb_value;
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (var_path == nullptr || var_path[0] == '\0') {
-    if (log)
-      log->Printf(
-          "SBFrame::GetValueForVariablePath called with empty variable path.");
     return LLDB_RECORD_RESULT(sb_value);
   }
 
@@ -667,15 +486,7 @@ lldb::SBValue SBFrame::GetValueForVariab
                 StackFrame::eExpressionPathOptionsAllowDirectIVarAccess,
             var_sp, error));
         sb_value.SetSP(value_sp, use_dynamic);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetValueForVariablePath () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf(
-            "SBFrame::GetValueForVariablePath () => error: process is running");
+      }
     }
   }
   return LLDB_RECORD_RESULT(sb_value);
@@ -704,13 +515,10 @@ SBValue SBFrame::FindVariable(const char
   LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindVariable,
                      (const char *, lldb::DynamicValueType), name, use_dynamic);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   VariableSP var_sp;
   SBValue sb_value;
 
   if (name == nullptr || name[0] == '\0') {
-    if (log)
-      log->Printf("SBFrame::FindVariable called with empty name");
     return LLDB_RECORD_RESULT(sb_value);
   }
 
@@ -730,22 +538,10 @@ SBValue SBFrame::FindVariable(const char
 
         if (value_sp)
           sb_value.SetSP(value_sp, use_dynamic);
-      } else {
-        if (log)
-          log->Printf("SBFrame::FindVariable () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::FindVariable () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::FindVariable (name=\"%s\") => SBValue(%p)",
-                static_cast<void *>(frame), name,
-                static_cast<void *>(value_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -773,12 +569,9 @@ SBValue SBFrame::FindValue(const char *n
                      (const char *, lldb::ValueType, lldb::DynamicValueType),
                      name, value_type, use_dynamic);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBValue sb_value;
 
   if (name == nullptr || name[0] == '\0') {
-    if (log)
-      log->Printf("SBFrame::FindValue called with empty name.");
     return LLDB_RECORD_RESULT(sb_value);
   }
 
@@ -886,23 +679,10 @@ SBValue SBFrame::FindValue(const char *n
         default:
           break;
         }
-      } else {
-        if (log)
-          log->Printf("SBFrame::FindValue () => error: could not reconstruct "
-                      "frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::FindValue () => error: process is running");
+      }
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::FindVariableInScope (name=\"%s\", value_type=%i) "
-                "=> SBValue(%p)",
-                static_cast<void *>(frame), name, value_type,
-                static_cast<void *>(value_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -932,29 +712,18 @@ bool SBFrame::operator!=(const SBFrame &
 SBThread SBFrame::GetThread() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBFrame, GetThread);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
   ThreadSP thread_sp(exe_ctx.GetThreadSP());
   SBThread sb_thread(thread_sp);
 
-  if (log) {
-    SBStream sstr;
-    sb_thread.GetDescription(sstr);
-    log->Printf("SBFrame(%p)::GetThread () => SBThread(%p): %s",
-                static_cast<void *>(exe_ctx.GetFramePtr()),
-                static_cast<void *>(thread_sp.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_thread);
 }
 
 const char *SBFrame::Disassemble() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, Disassemble);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *disassembly = nullptr;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -968,21 +737,10 @@ const char *SBFrame::Disassemble() const
       frame = exe_ctx.GetFramePtr();
       if (frame) {
         disassembly = frame->Disassemble();
-      } else {
-        if (log)
-          log->Printf("SBFrame::Disassemble () => error: could not reconstruct "
-                      "frame object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::Disassemble () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::Disassemble () => %s", static_cast<void *>(frame),
-                disassembly);
-
   return disassembly;
 }
 
@@ -1044,8 +802,6 @@ SBValueList SBFrame::GetVariables(const
   LLDB_RECORD_METHOD(lldb::SBValueList, SBFrame, GetVariables,
                      (const lldb::SBVariablesOptions &), options);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBValueList value_list;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1063,12 +819,6 @@ SBValueList SBFrame::GetVariables(const
       options.GetIncludeRuntimeSupportValues();
   const lldb::DynamicValueType use_dynamic = options.GetUseDynamic();
 
-  if (log)
-    log->Printf(
-        "SBFrame::GetVariables (arguments=%i, recognized_arguments=%i, "
-        "locals=%i, statics=%i, in_scope_only=%i runtime=%i dynamic=%i)",
-        arguments, recognized_arguments, locals, statics, in_scope_only,
-        include_runtime_support_values, use_dynamic);
 
   std::set<VariableSP> variable_set;
   Process *process = exe_ctx.GetProcessPtr();
@@ -1144,30 +894,16 @@ SBValueList SBFrame::GetVariables(const
             }
           }
         }
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetVariables () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetVariables () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::GetVariables (...) => SBValueList(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(value_list.opaque_ptr()));
-
   return LLDB_RECORD_RESULT(value_list);
 }
 
 SBValueList SBFrame::GetRegisters() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBValueList, SBFrame, GetRegisters);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBValueList value_list;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1188,22 +924,10 @@ SBValueList SBFrame::GetRegisters() {
                 ValueObjectRegisterSet::Create(frame, reg_ctx, set_idx));
           }
         }
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetRegisters () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetRegisters () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::GetRegisters () => SBValueList(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(value_list.opaque_ptr()));
-
   return LLDB_RECORD_RESULT(value_list);
 }
 
@@ -1211,8 +935,6 @@ SBValue SBFrame::FindRegister(const char
   LLDB_RECORD_METHOD(lldb::SBValue, SBFrame, FindRegister, (const char *),
                      name);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBValue result;
   ValueObjectSP value_sp;
   std::unique_lock<std::recursive_mutex> lock;
@@ -1242,22 +964,10 @@ SBValue SBFrame::FindRegister(const char
             }
           }
         }
-      } else {
-        if (log)
-          log->Printf("SBFrame::FindRegister () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
       }
-    } else {
-      if (log)
-        log->Printf("SBFrame::FindRegister () => error: process is running");
     }
   }
 
-  if (log)
-    log->Printf("SBFrame(%p)::FindRegister () => SBValue(%p)",
-                static_cast<void *>(frame),
-                static_cast<void *>(value_sp.get()));
-
   return LLDB_RECORD_RESULT(result);
 }
 
@@ -1265,7 +975,6 @@ bool SBFrame::GetDescription(SBStream &d
   LLDB_RECORD_METHOD(bool, SBFrame, GetDescription, (lldb::SBStream &),
                      description);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   Stream &strm = description.ref();
 
   std::unique_lock<std::recursive_mutex> lock;
@@ -1280,14 +989,7 @@ bool SBFrame::GetDescription(SBStream &d
       frame = exe_ctx.GetFramePtr();
       if (frame) {
         frame->DumpUsingSettingsFormat(&strm);
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetDescription () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetDescription () => error: process is running");
+      }
     }
 
   } else
@@ -1374,8 +1076,6 @@ lldb::SBValue SBFrame::EvaluateExpressio
                      (const char *, const lldb::SBExpressionOptions &), expr,
                      options);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
 #ifndef LLDB_DISABLE_PYTHON
   Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 #endif
@@ -1384,9 +1084,6 @@ lldb::SBValue SBFrame::EvaluateExpressio
   SBValue expr_result;
 
   if (expr == nullptr || expr[0] == '\0') {
-    if (log)
-      log->Printf(
-          "SBFrame::EvaluateExpression called with an empty expression");
     return LLDB_RECORD_RESULT(expr_result);
   }
 
@@ -1395,8 +1092,6 @@ lldb::SBValue SBFrame::EvaluateExpressio
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBFrame()::EvaluateExpression (expr=\"%s\")...", expr);
 
   StackFrame *frame = nullptr;
   Target *target = exe_ctx.GetTargetPtr();
@@ -1421,15 +1116,7 @@ lldb::SBValue SBFrame::EvaluateExpressio
         exe_results = target->EvaluateExpression(expr, frame, expr_value_sp,
                                                  options.ref());
         expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue());
-      } else {
-        if (log)
-          log->Printf("SBFrame::EvaluateExpression () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf(
-            "SBFrame::EvaluateExpression () => error: process is running");
+      }
     }
   }
 
@@ -1438,12 +1125,6 @@ lldb::SBValue SBFrame::EvaluateExpressio
     expr_log->Printf("** [SBFrame::EvaluateExpression] Expression result is "
                      "%s, summary %s **",
                      expr_result.GetValue(), expr_result.GetSummary());
-
-  if (log)
-    log->Printf("SBFrame(%p)::EvaluateExpression (expr=\"%s\") => SBValue(%p) "
-                "(execution result=%d)",
-                static_cast<void *>(frame), expr,
-                static_cast<void *>(expr_value_sp.get()), exe_results);
 #endif
 
   return LLDB_RECORD_RESULT(expr_result);
@@ -1458,7 +1139,6 @@ bool SBFrame::IsInlined() {
 bool SBFrame::IsInlined() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBFrame, IsInlined);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
@@ -1474,14 +1154,7 @@ bool SBFrame::IsInlined() const {
         Block *block = frame->GetSymbolContext(eSymbolContextBlock).block;
         if (block)
           return block->GetContainingInlinedBlock() != nullptr;
-      } else {
-        if (log)
-          log->Printf("SBFrame::IsInlined () => error: could not reconstruct "
-                      "frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::IsInlined () => error: process is running");
+      }
     }
   }
   return false;
@@ -1536,7 +1209,6 @@ lldb::LanguageType SBFrame::GuessLanguag
 const char *SBFrame::GetFunctionName() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBFrame, GetFunctionName);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *name = nullptr;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1571,14 +1243,7 @@ const char *SBFrame::GetFunctionName() c
           if (sc.symbol)
             name = sc.symbol->GetName().GetCString();
         }
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetFunctionName () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf("SBFrame::GetFunctionName() => error: process is running");
+      }
     }
   }
   return name;
@@ -1587,7 +1252,6 @@ const char *SBFrame::GetFunctionName() c
 const char *SBFrame::GetDisplayFunctionName() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBFrame, GetDisplayFunctionName);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *name = nullptr;
 
   std::unique_lock<std::recursive_mutex> lock;
@@ -1623,15 +1287,7 @@ const char *SBFrame::GetDisplayFunctionN
           if (sc.symbol)
             name = sc.symbol->GetDisplayName().GetCString();
         }
-      } else {
-        if (log)
-          log->Printf("SBFrame::GetDisplayFunctionName () => error: could not "
-                      "reconstruct frame object for this SBFrame.");
-      }
-    } else {
-      if (log)
-        log->Printf(
-            "SBFrame::GetDisplayFunctionName() => error: process is running");
+      }
     }
   }
   return name;

Modified: lldb/trunk/source/API/SBFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFunction.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFunction.cpp (original)
+++ lldb/trunk/source/API/SBFunction.cpp Thu Mar  7 14:47:13 2019
@@ -18,7 +18,6 @@
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -58,15 +57,6 @@ const char *SBFunction::GetName() const
   if (m_opaque_ptr)
     cstr = m_opaque_ptr->GetName().AsCString();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (cstr)
-      log->Printf("SBFunction(%p)::GetName () => \"%s\"",
-                  static_cast<void *>(m_opaque_ptr), cstr);
-    else
-      log->Printf("SBFunction(%p)::GetName () => NULL",
-                  static_cast<void *>(m_opaque_ptr));
-  }
   return cstr;
 }
 
@@ -79,15 +69,6 @@ const char *SBFunction::GetDisplayName()
                .GetDisplayDemangledName(m_opaque_ptr->GetLanguage())
                .AsCString();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (cstr)
-      log->Printf("SBFunction(%p)::GetDisplayName () => \"%s\"",
-                  static_cast<void *>(m_opaque_ptr), cstr);
-    else
-      log->Printf("SBFunction(%p)::GetDisplayName () => NULL",
-                  static_cast<void *>(m_opaque_ptr));
-  }
   return cstr;
 }
 
@@ -97,15 +78,6 @@ const char *SBFunction::GetMangledName()
   const char *cstr = NULL;
   if (m_opaque_ptr)
     cstr = m_opaque_ptr->GetMangled().GetMangledName().AsCString();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (cstr)
-      log->Printf("SBFunction(%p)::GetMangledName () => \"%s\"",
-                  static_cast<void *>(m_opaque_ptr), cstr);
-    else
-      log->Printf("SBFunction(%p)::GetMangledName () => NULL",
-                  static_cast<void *>(m_opaque_ptr));
-  }
   return cstr;
 }
 

Modified: lldb/trunk/source/API/SBHostOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBHostOS.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBHostOS.cpp (original)
+++ lldb/trunk/source/API/SBHostOS.cpp Thu Mar  7 14:47:13 2019
@@ -20,7 +20,6 @@
 #include "lldb/Host/HostThread.h"
 #include "lldb/Host/ThreadLauncher.h"
 #include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/Log.h"
 
 #include "Plugins/ExpressionParser/Clang/ClangHost.h"
 #ifndef LLDB_DISABLE_PYTHON
@@ -109,18 +108,6 @@ SBFileSpec SBHostOS::GetUserHomeDirector
 lldb::thread_t SBHostOS::ThreadCreate(const char *name,
                                       lldb::thread_func_t thread_function,
                                       void *thread_arg, SBError *error_ptr) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf(
-        "SBHostOS::ThreadCreate (name=\"%s\", thread_function=%p, "
-        "thread_arg=%p, error_ptr=%p)",
-        name,
-        reinterpret_cast<void *>(reinterpret_cast<intptr_t>(thread_function)),
-        static_cast<void *>(thread_arg), static_cast<void *>(error_ptr));
-
-  // FIXME: You should log the return value?
-
   HostThread thread(ThreadLauncher::LaunchThread(
       name, thread_function, thread_arg, error_ptr ? error_ptr->get() : NULL));
   return thread.Release();

Modified: lldb/trunk/source/API/SBLineEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBLineEntry.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBLineEntry.cpp (original)
+++ lldb/trunk/source/API/SBLineEntry.cpp Thu Mar  7 14:47:13 2019
@@ -12,7 +12,6 @@
 #include "lldb/API/SBStream.h"
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Symbol/LineEntry.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
 
 #include <limits.h>
@@ -59,18 +58,6 @@ SBAddress SBLineEntry::GetStartAddress()
   if (m_opaque_up)
     sb_address.SetAddress(&m_opaque_up->range.GetBaseAddress());
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    StreamString sstr;
-    const Address *addr = sb_address.get();
-    if (addr)
-      addr->Dump(&sstr, NULL, Address::DumpStyleModuleWithFileAddress,
-                 Address::DumpStyleInvalid, 4);
-    log->Printf("SBLineEntry(%p)::GetStartAddress () => SBAddress (%p): %s",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<void *>(sb_address.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_address);
 }
 
@@ -82,17 +69,6 @@ SBAddress SBLineEntry::GetEndAddress() c
     sb_address.SetAddress(&m_opaque_up->range.GetBaseAddress());
     sb_address.OffsetAddress(m_opaque_up->range.GetByteSize());
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    StreamString sstr;
-    const Address *addr = sb_address.get();
-    if (addr)
-      addr->Dump(&sstr, NULL, Address::DumpStyleModuleWithFileAddress,
-                 Address::DumpStyleInvalid, 4);
-    log->Printf("SBLineEntry(%p)::GetEndAddress () => SBAddress (%p): %s",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<void *>(sb_address.get()), sstr.GetData());
-  }
   return LLDB_RECORD_RESULT(sb_address);
 }
 
@@ -105,36 +81,20 @@ bool SBLineEntry::IsValid() const {
 SBFileSpec SBLineEntry::GetFileSpec() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBLineEntry, GetFileSpec);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBFileSpec sb_file_spec;
   if (m_opaque_up.get() && m_opaque_up->file)
     sb_file_spec.SetFileSpec(m_opaque_up->file);
 
-  if (log) {
-    SBStream sstr;
-    sb_file_spec.GetDescription(sstr);
-    log->Printf("SBLineEntry(%p)::GetFileSpec () => SBFileSpec(%p): %s",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<const void *>(sb_file_spec.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_file_spec);
 }
 
 uint32_t SBLineEntry::GetLine() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBLineEntry, GetLine);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t line = 0;
   if (m_opaque_up)
     line = m_opaque_up->line;
 
-  if (log)
-    log->Printf("SBLineEntry(%p)::GetLine () => %u",
-                static_cast<void *>(m_opaque_up.get()), line);
-
   return line;
 }
 

Modified: lldb/trunk/source/API/SBListener.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBListener.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBListener.cpp (original)
+++ lldb/trunk/source/API/SBListener.cpp Thu Mar  7 14:47:13 2019
@@ -15,7 +15,6 @@
 #include "lldb/Core/Debugger.h"
 #include "lldb/Utility/Broadcaster.h"
 #include "lldb/Utility/Listener.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
@@ -28,12 +27,6 @@ SBListener::SBListener() : m_opaque_sp()
 SBListener::SBListener(const char *name)
     : m_opaque_sp(Listener::MakeListener(name)), m_unused_ptr(nullptr) {
   LLDB_RECORD_CONSTRUCTOR(SBListener, (const char *), name);
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBListener::SBListener (name=\"%s\") => SBListener(%p)", name,
-                static_cast<void *>(m_opaque_sp.get()));
 }
 
 SBListener::SBListener(const SBListener &rhs)
@@ -127,36 +120,6 @@ uint32_t SBListener::StartListeningForEv
         m_opaque_sp->StartListeningForEvents(broadcaster.get(), event_mask);
   }
 
-  Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API);
-  if (log) {
-    StreamString sstr_requested;
-    StreamString sstr_acquired;
-
-    Broadcaster *lldb_broadcaster = broadcaster.get();
-    if (lldb_broadcaster) {
-      const bool got_requested_names =
-          lldb_broadcaster->GetEventNames(sstr_requested, event_mask, false);
-      const bool got_acquired_names = lldb_broadcaster->GetEventNames(
-          sstr_acquired, acquired_event_mask, false);
-      log->Printf("SBListener(%p)::StartListeneingForEvents "
-                  "(SBBroadcaster(%p): %s, event_mask=0x%8.8x%s%s%s) => "
-                  "0x%8.8x%s%s%s",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(lldb_broadcaster),
-                  lldb_broadcaster->GetBroadcasterName().GetCString(),
-                  event_mask, got_requested_names ? " (" : "",
-                  sstr_requested.GetData(), got_requested_names ? ")" : "",
-                  acquired_event_mask, got_acquired_names ? " (" : "",
-                  sstr_acquired.GetData(), got_acquired_names ? ")" : "");
-    } else {
-      log->Printf("SBListener(%p)::StartListeneingForEvents "
-                  "(SBBroadcaster(%p), event_mask=0x%8.8x) => 0x%8.8x",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(lldb_broadcaster), event_mask,
-                  acquired_event_mask);
-    }
-  }
-
   return acquired_event_mask;
 }
 
@@ -176,20 +139,6 @@ bool SBListener::WaitForEvent(uint32_t t
   LLDB_RECORD_METHOD(bool, SBListener, WaitForEvent,
                      (uint32_t, lldb::SBEvent &), timeout_secs, event);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (timeout_secs == UINT32_MAX) {
-      log->Printf("SBListener(%p)::WaitForEvent (timeout_secs=INFINITE, "
-                  "SBEvent(%p))...",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(event.get()));
-    } else {
-      log->Printf(
-          "SBListener(%p)::WaitForEvent (timeout_secs=%d, SBEvent(%p))...",
-          static_cast<void *>(m_opaque_sp.get()), timeout_secs,
-          static_cast<void *>(event.get()));
-    }
-  }
   bool success = false;
 
   if (m_opaque_sp) {
@@ -206,19 +155,6 @@ bool SBListener::WaitForEvent(uint32_t t
     }
   }
 
-  if (log) {
-    if (timeout_secs == UINT32_MAX) {
-      log->Printf("SBListener(%p)::WaitForEvent (timeout_secs=INFINITE, "
-                  "SBEvent(%p)) => %i",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(event.get()), success);
-    } else {
-      log->Printf(
-          "SBListener(%p)::WaitForEvent (timeout_secs=%d, SBEvent(%p)) => %i",
-          static_cast<void *>(m_opaque_sp.get()), timeout_secs,
-          static_cast<void *>(event.get()), success);
-    }
-  }
   if (!success)
     event.reset(NULL);
   return success;

Modified: lldb/trunk/source/API/SBMemoryRegionInfoList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBMemoryRegionInfoList.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBMemoryRegionInfoList.cpp (original)
+++ lldb/trunk/source/API/SBMemoryRegionInfoList.cpp Thu Mar  7 14:47:13 2019
@@ -11,7 +11,6 @@
 #include "lldb/API/SBMemoryRegionInfo.h"
 #include "lldb/API/SBStream.h"
 #include "lldb/Target/MemoryRegionInfo.h"
-#include "lldb/Utility/Log.h"
 
 #include <vector>
 
@@ -109,21 +108,7 @@ bool SBMemoryRegionInfoList::GetMemoryRe
   LLDB_RECORD_METHOD(bool, SBMemoryRegionInfoList, GetMemoryRegionAtIndex,
                      (uint32_t, lldb::SBMemoryRegionInfo &), idx, region_info);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  bool result = m_opaque_up->GetMemoryRegionInfoAtIndex(idx, region_info.ref());
-
-  if (log) {
-    SBStream sstr;
-    region_info.GetDescription(sstr);
-    log->Printf("SBMemoryRegionInfoList::GetMemoryRegionAtIndex (this.ap=%p, "
-                "idx=%d) => SBMemoryRegionInfo (this.ap=%p, '%s')",
-                static_cast<void *>(m_opaque_up.get()), idx,
-                static_cast<void *>(region_info.m_opaque_up.get()),
-                sstr.GetData());
-  }
-
-  return result;
+  return m_opaque_up->GetMemoryRegionInfoAtIndex(idx, region_info.ref());
 }
 
 void SBMemoryRegionInfoList::Clear() {

Modified: lldb/trunk/source/API/SBModule.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBModule.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBModule.cpp (original)
+++ lldb/trunk/source/API/SBModule.cpp Thu Mar  7 14:47:13 2019
@@ -25,7 +25,6 @@
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Symbol/VariableList.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;
@@ -94,18 +93,11 @@ void SBModule::Clear() {
 SBFileSpec SBModule::GetFileSpec() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBModule, GetFileSpec);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBFileSpec file_spec;
   ModuleSP module_sp(GetSP());
   if (module_sp)
     file_spec.SetFileSpec(module_sp->GetFileSpec());
 
-  if (log)
-    log->Printf("SBModule(%p)::GetFileSpec () => SBFileSpec(%p)",
-                static_cast<void *>(module_sp.get()),
-                static_cast<const void *>(file_spec.get()));
-
   return LLDB_RECORD_RESULT(file_spec);
 }
 
@@ -113,18 +105,12 @@ lldb::SBFileSpec SBModule::GetPlatformFi
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBFileSpec, SBModule,
                                    GetPlatformFileSpec);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBFileSpec file_spec;
   ModuleSP module_sp(GetSP());
   if (module_sp)
     file_spec.SetFileSpec(module_sp->GetPlatformFileSpec());
 
-  if (log)
-    log->Printf("SBModule(%p)::GetPlatformFileSpec () => SBFileSpec(%p)",
-                static_cast<void *>(module_sp.get()),
-                static_cast<const void *>(file_spec.get()));
-
   return LLDB_RECORD_RESULT(file_spec);
 }
 
@@ -133,7 +119,6 @@ bool SBModule::SetPlatformFileSpec(const
                      (const lldb::SBFileSpec &), platform_file);
 
   bool result = false;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   ModuleSP module_sp(GetSP());
   if (module_sp) {
@@ -141,11 +126,6 @@ bool SBModule::SetPlatformFileSpec(const
     result = true;
   }
 
-  if (log)
-    log->Printf("SBModule(%p)::SetPlatformFileSpec (SBFileSpec(%p (%s)) => %i",
-                static_cast<void *>(module_sp.get()),
-                static_cast<const void *>(platform_file.get()),
-                platform_file->GetPath().c_str(), result);
   return result;
 }
 
@@ -175,30 +155,17 @@ bool SBModule::SetRemoteInstallFileSpec(
 const uint8_t *SBModule::GetUUIDBytes() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const uint8_t *, SBModule, GetUUIDBytes);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   const uint8_t *uuid_bytes = NULL;
   ModuleSP module_sp(GetSP());
   if (module_sp)
     uuid_bytes = module_sp->GetUUID().GetBytes().data();
 
-  if (log) {
-    if (uuid_bytes) {
-      StreamString s;
-      module_sp->GetUUID().Dump(&s);
-      log->Printf("SBModule(%p)::GetUUIDBytes () => %s",
-                  static_cast<void *>(module_sp.get()), s.GetData());
-    } else
-      log->Printf("SBModule(%p)::GetUUIDBytes () => NULL",
-                  static_cast<void *>(module_sp.get()));
-  }
   return uuid_bytes;
 }
 
 const char *SBModule::GetUUIDString() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBModule, GetUUIDString);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   const char *uuid_cstr = NULL;
   ModuleSP module_sp(GetSP());
@@ -211,15 +178,9 @@ const char *SBModule::GetUUIDString() co
   }
 
   if (uuid_cstr && uuid_cstr[0]) {
-    if (log)
-      log->Printf("SBModule(%p)::GetUUIDString () => %s",
-                  static_cast<void *>(module_sp.get()), uuid_cstr);
     return uuid_cstr;
   }
 
-  if (log)
-    log->Printf("SBModule(%p)::GetUUIDString () => NULL",
-                static_cast<void *>(module_sp.get()));
   return NULL;
 }
 

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Thu Mar  7 14:47:13 2019
@@ -25,7 +25,6 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/Args.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/ProcessInfo.h"
 #include "lldb/Utility/State.h"
 #include "lldb/Utility/Stream.h"
@@ -138,19 +137,6 @@ bool SBProcess::RemoteLaunch(char const
                      argv, envp, stdin_path, stdout_path, stderr_path,
                      working_directory, launch_flags, stop_at_entry, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::RemoteLaunch (argv=%p, envp=%p, stdin=%s, "
-                "stdout=%s, stderr=%s, working-dir=%s, launch_flags=0x%x, "
-                "stop_at_entry=%i, &error (%p))...",
-                static_cast<void *>(m_opaque_wp.lock().get()),
-                static_cast<void *>(argv), static_cast<void *>(envp),
-                stdin_path ? stdin_path : "NULL",
-                stdout_path ? stdout_path : "NULL",
-                stderr_path ? stderr_path : "NULL",
-                working_directory ? working_directory : "NULL", launch_flags,
-                stop_at_entry, static_cast<void *>(error.get()));
-
   ProcessSP process_sp(GetSP());
   if (process_sp) {
     std::lock_guard<std::recursive_mutex> guard(
@@ -176,14 +162,6 @@ bool SBProcess::RemoteLaunch(char const
     error.SetErrorString("unable to attach pid");
   }
 
-  if (log) {
-    SBStream sstr;
-    error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::RemoteLaunch (...) => SBError (%p): %s",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(error.get()), sstr.GetData());
-  }
-
   return error.Success();
 }
 
@@ -208,24 +186,12 @@ bool SBProcess::RemoteAttachToProcessWit
     error.SetErrorString("unable to attach pid");
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    SBStream sstr;
-    error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::RemoteAttachToProcessWithID (%" PRIu64
-                ") => SBError (%p): %s",
-                static_cast<void *>(process_sp.get()), pid,
-                static_cast<void *>(error.get()), sstr.GetData());
-  }
-
   return error.Success();
 }
 
 uint32_t SBProcess::GetNumThreads() {
   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcess, GetNumThreads);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t num_threads = 0;
   ProcessSP process_sp(GetSP());
   if (process_sp) {
@@ -237,10 +203,6 @@ uint32_t SBProcess::GetNumThreads() {
     num_threads = process_sp->GetThreadList().GetSize(can_update);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetNumThreads () => %d",
-                static_cast<void *>(process_sp.get()), num_threads);
-
   return num_threads;
 }
 
@@ -248,8 +210,6 @@ SBThread SBProcess::GetSelectedThread()
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBThread, SBProcess,
                                    GetSelectedThread);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBThread sb_thread;
   ThreadSP thread_sp;
   ProcessSP process_sp(GetSP());
@@ -260,11 +220,6 @@ SBThread SBProcess::GetSelectedThread()
     sb_thread.SetThread(thread_sp);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetSelectedThread () => SBThread(%p)",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(thread_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_thread);
 }
 
@@ -273,8 +228,6 @@ SBThread SBProcess::CreateOSPluginThread
   LLDB_RECORD_METHOD(lldb::SBThread, SBProcess, CreateOSPluginThread,
                      (lldb::tid_t, lldb::addr_t), tid, context);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBThread sb_thread;
   ThreadSP thread_sp;
   ProcessSP process_sp(GetSP());
@@ -285,20 +238,12 @@ SBThread SBProcess::CreateOSPluginThread
     sb_thread.SetThread(thread_sp);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::CreateOSPluginThread (tid=0x%" PRIx64
-                ", context=0x%" PRIx64 ") => SBThread(%p)",
-                static_cast<void *>(process_sp.get()), tid, context,
-                static_cast<void *>(thread_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_thread);
 }
 
 SBTarget SBProcess::GetTarget() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBTarget, SBProcess, GetTarget);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBTarget sb_target;
   TargetSP target_sp;
   ProcessSP process_sp(GetSP());
@@ -307,11 +252,6 @@ SBTarget SBProcess::GetTarget() const {
     sb_target.SetSP(target_sp);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetTarget () => SBTarget(%p)",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(target_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_target);
 }
 
@@ -319,8 +259,6 @@ size_t SBProcess::PutSTDIN(const char *s
   LLDB_RECORD_METHOD(size_t, SBProcess, PutSTDIN, (const char *, size_t), src,
                      src_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   size_t ret_val = 0;
   ProcessSP process_sp(GetSP());
   if (process_sp) {
@@ -328,12 +266,6 @@ size_t SBProcess::PutSTDIN(const char *s
     ret_val = process_sp->PutSTDIN(src, src_len, error);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::PutSTDIN (src=\"%s\", src_len=%" PRIu64
-                ") => %" PRIu64,
-                static_cast<void *>(process_sp.get()), src,
-                static_cast<uint64_t>(src_len), static_cast<uint64_t>(ret_val));
-
   return ret_val;
 }
 
@@ -348,14 +280,6 @@ size_t SBProcess::GetSTDOUT(char *dst, s
     bytes_read = process_sp->GetSTDOUT(dst, dst_len, error);
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf(
-        "SBProcess(%p)::GetSTDOUT (dst=\"%.*s\", dst_len=%" PRIu64
-        ") => %" PRIu64,
-        static_cast<void *>(process_sp.get()), static_cast<int>(bytes_read),
-        dst, static_cast<uint64_t>(dst_len), static_cast<uint64_t>(bytes_read));
-
   return bytes_read;
 }
 
@@ -370,14 +294,6 @@ size_t SBProcess::GetSTDERR(char *dst, s
     bytes_read = process_sp->GetSTDERR(dst, dst_len, error);
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf(
-        "SBProcess(%p)::GetSTDERR (dst=\"%.*s\", dst_len=%" PRIu64
-        ") => %" PRIu64,
-        static_cast<void *>(process_sp.get()), static_cast<int>(bytes_read),
-        dst, static_cast<uint64_t>(dst_len), static_cast<uint64_t>(bytes_read));
-
   return bytes_read;
 }
 
@@ -392,14 +308,6 @@ size_t SBProcess::GetAsyncProfileData(ch
     bytes_read = process_sp->GetAsyncProfileData(dst, dst_len, error);
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf(
-        "SBProcess(%p)::GetAsyncProfileData (dst=\"%.*s\", dst_len=%" PRIu64
-        ") => %" PRIu64,
-        static_cast<void *>(process_sp.get()), static_cast<int>(bytes_read),
-        dst, static_cast<uint64_t>(dst_len), static_cast<uint64_t>(bytes_read));
-
   return bytes_read;
 }
 
@@ -408,7 +316,6 @@ lldb::SBTrace SBProcess::StartTrace(SBTr
   LLDB_RECORD_METHOD(lldb::SBTrace, SBProcess, StartTrace,
                      (lldb::SBTraceOptions &, lldb::SBError &), options, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ProcessSP process_sp(GetSP());
   error.Clear();
   SBTrace trace_instance;
@@ -420,7 +327,6 @@ lldb::SBTrace SBProcess::StartTrace(SBTr
   } else {
     uid = process_sp->StartTrace(*(options.m_traceoptions_sp), error.ref());
     trace_instance.SetTraceUID(uid);
-    LLDB_LOG(log, "SBProcess::returned uid - {0}", uid);
   }
   return LLDB_RECORD_RESULT(trace_instance);
 }
@@ -480,7 +386,6 @@ bool SBProcess::SetSelectedThreadByID(ll
   LLDB_RECORD_METHOD(bool, SBProcess, SetSelectedThreadByID, (lldb::tid_t),
                      tid);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   bool ret_val = false;
   ProcessSP process_sp(GetSP());
@@ -490,12 +395,6 @@ bool SBProcess::SetSelectedThreadByID(ll
     ret_val = process_sp->GetThreadList().SetSelectedThreadByID(tid);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::SetSelectedThreadByID (tid=0x%4.4" PRIx64
-                ") => %s",
-                static_cast<void *>(process_sp.get()), tid,
-                (ret_val ? "true" : "false"));
-
   return ret_val;
 }
 
@@ -503,8 +402,6 @@ bool SBProcess::SetSelectedThreadByIndex
   LLDB_RECORD_METHOD(bool, SBProcess, SetSelectedThreadByIndexID, (uint32_t),
                      index_id);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   bool ret_val = false;
   ProcessSP process_sp(GetSP());
   if (process_sp) {
@@ -513,10 +410,6 @@ bool SBProcess::SetSelectedThreadByIndex
     ret_val = process_sp->GetThreadList().SetSelectedThreadByIndexID(index_id);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::SetSelectedThreadByID (tid=0x%x) => %s",
-                static_cast<void *>(process_sp.get()), index_id,
-                (ret_val ? "true" : "false"));
 
   return ret_val;
 }
@@ -525,8 +418,6 @@ SBThread SBProcess::GetThreadAtIndex(siz
   LLDB_RECORD_METHOD(lldb::SBThread, SBProcess, GetThreadAtIndex, (size_t),
                      index);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBThread sb_thread;
   ThreadSP thread_sp;
   ProcessSP process_sp(GetSP());
@@ -539,20 +430,12 @@ SBThread SBProcess::GetThreadAtIndex(siz
     sb_thread.SetThread(thread_sp);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetThreadAtIndex (index=%d) => SBThread(%p)",
-                static_cast<void *>(process_sp.get()),
-                static_cast<uint32_t>(index),
-                static_cast<void *>(thread_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_thread);
 }
 
 uint32_t SBProcess::GetNumQueues() {
   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBProcess, GetNumQueues);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t num_queues = 0;
   ProcessSP process_sp(GetSP());
   if (process_sp) {
@@ -564,10 +447,6 @@ uint32_t SBProcess::GetNumQueues() {
     }
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetNumQueues () => %d",
-                static_cast<void *>(process_sp.get()), num_queues);
-
   return num_queues;
 }
 
@@ -575,8 +454,6 @@ SBQueue SBProcess::GetQueueAtIndex(size_
   LLDB_RECORD_METHOD(lldb::SBQueue, SBProcess, GetQueueAtIndex, (size_t),
                      index);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBQueue sb_queue;
   QueueSP queue_sp;
   ProcessSP process_sp(GetSP());
@@ -590,12 +467,6 @@ SBQueue SBProcess::GetQueueAtIndex(size_
     }
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetQueueAtIndex (index=%d) => SBQueue(%p)",
-                static_cast<void *>(process_sp.get()),
-                static_cast<uint32_t>(index),
-                static_cast<void *>(queue_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_queue);
 }
 
@@ -619,8 +490,6 @@ SBEvent SBProcess::GetStopEventForStopID
   LLDB_RECORD_METHOD(lldb::SBEvent, SBProcess, GetStopEventForStopID,
                      (uint32_t), stop_id);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBEvent sb_event;
   EventSP event_sp;
   ProcessSP process_sp(GetSP());
@@ -631,12 +500,6 @@ SBEvent SBProcess::GetStopEventForStopID
     sb_event.reset(event_sp);
   }
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetStopEventForStopID (stop_id=%" PRIu32
-                ") => SBEvent(%p)",
-                static_cast<void *>(process_sp.get()), stop_id,
-                static_cast<void *>(event_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_event);
 }
 
@@ -651,12 +514,6 @@ StateType SBProcess::GetState() {
     ret_val = process_sp->GetState();
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetState () => %s",
-                static_cast<void *>(process_sp.get()),
-                lldb_private::StateAsCString(ret_val));
-
   return ret_val;
 }
 
@@ -670,11 +527,6 @@ int SBProcess::GetExitStatus() {
         process_sp->GetTarget().GetAPIMutex());
     exit_status = process_sp->GetExitStatus();
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetExitStatus () => %i (0x%8.8x)",
-                static_cast<void *>(process_sp.get()), exit_status,
-                exit_status);
 
   return exit_status;
 }
@@ -689,10 +541,6 @@ const char *SBProcess::GetExitDescriptio
         process_sp->GetTarget().GetAPIMutex());
     exit_desc = process_sp->GetExitDescription();
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetExitDescription () => %s",
-                static_cast<void *>(process_sp.get()), exit_desc);
   return exit_desc;
 }
 
@@ -704,11 +552,6 @@ lldb::pid_t SBProcess::GetProcessID() {
   if (process_sp)
     ret_val = process_sp->GetID();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetProcessID () => %" PRIu64,
-                static_cast<void *>(process_sp.get()), ret_val);
-
   return ret_val;
 }
 
@@ -719,10 +562,6 @@ uint32_t SBProcess::GetUniqueID() {
   ProcessSP process_sp(GetSP());
   if (process_sp)
     ret_val = process_sp->GetUniqueID();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetUniqueID () => %" PRIu32,
-                static_cast<void *>(process_sp.get()), ret_val);
   return ret_val;
 }
 
@@ -734,10 +573,6 @@ ByteOrder SBProcess::GetByteOrder() cons
   if (process_sp)
     byteOrder = process_sp->GetTarget().GetArchitecture().GetByteOrder();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetByteOrder () => %d",
-                static_cast<void *>(process_sp.get()), byteOrder);
 
   return byteOrder;
 }
@@ -750,10 +585,6 @@ uint32_t SBProcess::GetAddressByteSize()
   if (process_sp)
     size = process_sp->GetTarget().GetArchitecture().GetAddressByteSize();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetAddressByteSize () => %d",
-                static_cast<void *>(process_sp.get()), size);
 
   return size;
 }
@@ -761,15 +592,9 @@ uint32_t SBProcess::GetAddressByteSize()
 SBError SBProcess::Continue() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBProcess, Continue);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBError sb_error;
   ProcessSP process_sp(GetSP());
 
-  if (log)
-    log->Printf("SBProcess(%p)::Continue ()...",
-                static_cast<void *>(process_sp.get()));
-
   if (process_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         process_sp->GetTarget().GetAPIMutex());
@@ -781,14 +606,6 @@ SBError SBProcess::Continue() {
   } else
     sb_error.SetErrorString("SBProcess is invalid");
 
-  if (log) {
-    SBStream sstr;
-    sb_error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::Continue () => SBError (%p): %s",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(sb_error.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_error);
 }
 
@@ -804,15 +621,6 @@ SBError SBProcess::Destroy() {
   } else
     sb_error.SetErrorString("SBProcess is invalid");
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    SBStream sstr;
-    sb_error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::Destroy () => SBError (%p): %s",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(sb_error.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_error);
 }
 
@@ -828,15 +636,6 @@ SBError SBProcess::Stop() {
   } else
     sb_error.SetErrorString("SBProcess is invalid");
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    SBStream sstr;
-    sb_error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::Stop () => SBError (%p): %s",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(sb_error.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_error);
 }
 
@@ -852,15 +651,6 @@ SBError SBProcess::Kill() {
   } else
     sb_error.SetErrorString("SBProcess is invalid");
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    SBStream sstr;
-    sb_error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::Kill () => SBError (%p): %s",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(sb_error.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_error);
 }
 
@@ -898,14 +688,7 @@ SBError SBProcess::Signal(int signo) {
     sb_error.SetError(process_sp->Signal(signo));
   } else
     sb_error.SetErrorString("SBProcess is invalid");
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    SBStream sstr;
-    sb_error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::Signal (signo=%i) => SBError (%p): %s",
-                static_cast<void *>(process_sp.get()), signo,
-                static_cast<void *>(sb_error.get()), sstr.GetData());
-  }
+
   return LLDB_RECORD_RESULT(sb_error);
 }
 
@@ -943,13 +726,6 @@ SBThread SBProcess::GetThreadByID(tid_t
     sb_thread.SetThread(thread_sp);
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetThreadByID (tid=0x%4.4" PRIx64
-                ") => SBThread (%p)",
-                static_cast<void *>(process_sp.get()), tid,
-                static_cast<void *>(thread_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_thread);
 }
 
@@ -970,12 +746,6 @@ SBThread SBProcess::GetThreadByIndexID(u
     sb_thread.SetThread(thread_sp);
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBProcess(%p)::GetThreadByID (tid=0x%x) => SBThread (%p)",
-                static_cast<void *>(process_sp.get()), index_id,
-                static_cast<void *>(thread_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_thread);
 }
 
@@ -983,15 +753,8 @@ StateType SBProcess::GetStateFromEvent(c
   LLDB_RECORD_STATIC_METHOD(lldb::StateType, SBProcess, GetStateFromEvent,
                             (const lldb::SBEvent &), event);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   StateType ret_val = Process::ProcessEventData::GetStateFromEvent(event.get());
 
-  if (log)
-    log->Printf("SBProcess::GetStateFromEvent (event.sp=%p) => %s",
-                static_cast<void *>(event.get()),
-                lldb_private::StateAsCString(ret_val));
-
   return ret_val;
 }
 
@@ -999,14 +762,8 @@ bool SBProcess::GetRestartedFromEvent(co
   LLDB_RECORD_STATIC_METHOD(bool, SBProcess, GetRestartedFromEvent,
                             (const lldb::SBEvent &), event);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   bool ret_val = Process::ProcessEventData::GetRestartedFromEvent(event.get());
 
-  if (log)
-    log->Printf("SBProcess::%s (event.sp=%p) => %d", __FUNCTION__,
-                static_cast<void *>(event.get()), ret_val);
-
   return ret_val;
 }
 
@@ -1079,16 +836,11 @@ SBBroadcaster SBProcess::GetBroadcaster(
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBroadcaster, SBProcess,
                                    GetBroadcaster);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   ProcessSP process_sp(GetSP());
 
   SBBroadcaster broadcaster(process_sp.get(), false);
 
-  if (log)
-    log->Printf("SBProcess(%p)::GetBroadcaster () => SBBroadcaster (%p)",
-                static_cast<void *>(process_sp.get()),
-                static_cast<void *>(broadcaster.get()));
 
   return LLDB_RECORD_RESULT(broadcaster);
 }
@@ -1102,18 +854,11 @@ const char *SBProcess::GetBroadcasterCla
 
 size_t SBProcess::ReadMemory(addr_t addr, void *dst, size_t dst_len,
                              SBError &sb_error) {
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   size_t bytes_read = 0;
 
   ProcessSP process_sp(GetSP());
 
-  if (log)
-    log->Printf("SBProcess(%p)::ReadMemory (addr=0x%" PRIx64
-                ", dst=%p, dst_len=%" PRIu64 ", SBError (%p))...",
-                static_cast<void *>(process_sp.get()), addr,
-                static_cast<void *>(dst), static_cast<uint64_t>(dst_len),
-                static_cast<void *>(sb_error.get()));
 
   if (process_sp) {
     Process::StopLocker stop_locker;
@@ -1122,26 +867,12 @@ size_t SBProcess::ReadMemory(addr_t addr
           process_sp->GetTarget().GetAPIMutex());
       bytes_read = process_sp->ReadMemory(addr, dst, dst_len, sb_error.ref());
     } else {
-      if (log)
-        log->Printf("SBProcess(%p)::ReadMemory() => error: process is running",
-                    static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   } else {
     sb_error.SetErrorString("SBProcess is invalid");
   }
 
-  if (log) {
-    SBStream sstr;
-    sb_error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::ReadMemory (addr=0x%" PRIx64
-                ", dst=%p, dst_len=%" PRIu64 ", SBError (%p): %s) => %" PRIu64,
-                static_cast<void *>(process_sp.get()), addr,
-                static_cast<void *>(dst), static_cast<uint64_t>(dst_len),
-                static_cast<void *>(sb_error.get()), sstr.GetData(),
-                static_cast<uint64_t>(bytes_read));
-  }
-
   return bytes_read;
 }
 
@@ -1157,11 +888,6 @@ size_t SBProcess::ReadCStringFromMemory(
       bytes_read = process_sp->ReadCStringFromMemory(addr, (char *)buf, size,
                                                      sb_error.ref());
     } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf("SBProcess(%p)::ReadCStringFromMemory() => error: process "
-                    "is running",
-                    static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   } else {
@@ -1186,11 +912,6 @@ uint64_t SBProcess::ReadUnsignedFromMemo
       value = process_sp->ReadUnsignedIntegerFromMemory(addr, byte_size, 0,
                                                         sb_error.ref());
     } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf("SBProcess(%p)::ReadUnsignedFromMemory() => error: process "
-                    "is running",
-                    static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   } else {
@@ -1213,11 +934,6 @@ lldb::addr_t SBProcess::ReadPointerFromM
           process_sp->GetTarget().GetAPIMutex());
       ptr = process_sp->ReadPointerFromMemory(addr, sb_error.ref());
     } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf("SBProcess(%p)::ReadPointerFromMemory() => error: process "
-                    "is running",
-                    static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   } else {
@@ -1230,17 +946,8 @@ size_t SBProcess::WriteMemory(addr_t add
                               SBError &sb_error) {
   size_t bytes_written = 0;
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   ProcessSP process_sp(GetSP());
 
-  if (log)
-    log->Printf("SBProcess(%p)::WriteMemory (addr=0x%" PRIx64
-                ", src=%p, src_len=%" PRIu64 ", SBError (%p))...",
-                static_cast<void *>(process_sp.get()), addr,
-                static_cast<const void *>(src), static_cast<uint64_t>(src_len),
-                static_cast<void *>(sb_error.get()));
-
   if (process_sp) {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process_sp->GetRunLock())) {
@@ -1249,24 +956,10 @@ size_t SBProcess::WriteMemory(addr_t add
       bytes_written =
           process_sp->WriteMemory(addr, src, src_len, sb_error.ref());
     } else {
-      if (log)
-        log->Printf("SBProcess(%p)::WriteMemory() => error: process is running",
-                    static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   }
 
-  if (log) {
-    SBStream sstr;
-    sb_error.GetDescription(sstr);
-    log->Printf("SBProcess(%p)::WriteMemory (addr=0x%" PRIx64
-                ", src=%p, src_len=%" PRIu64 ", SBError (%p): %s) => %" PRIu64,
-                static_cast<void *>(process_sp.get()), addr,
-                static_cast<const void *>(src), static_cast<uint64_t>(src_len),
-                static_cast<void *>(sb_error.get()), sstr.GetData(),
-                static_cast<uint64_t>(bytes_written));
-  }
-
   return bytes_written;
 }
 
@@ -1301,17 +994,12 @@ SBProcess::GetNumSupportedHardwareWatchp
                            GetNumSupportedHardwareWatchpoints,
                            (lldb::SBError &), sb_error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t num = 0;
   ProcessSP process_sp(GetSP());
   if (process_sp) {
     std::lock_guard<std::recursive_mutex> guard(
         process_sp->GetTarget().GetAPIMutex());
     sb_error.SetError(process_sp->GetWatchpointSupportInfo(num));
-    if (log)
-      log->Printf("SBProcess(%p)::GetNumSupportedHardwareWatchpoints () => %u",
-                  static_cast<void *>(process_sp.get()), num);
   } else {
     sb_error.SetErrorString("SBProcess is invalid");
   }
@@ -1335,33 +1023,19 @@ uint32_t SBProcess::LoadImage(const lldb
       (const lldb::SBFileSpec &, const lldb::SBFileSpec &, lldb::SBError &),
       sb_local_image_spec, sb_remote_image_spec, sb_error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ProcessSP process_sp(GetSP());
   if (process_sp) {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process_sp->GetRunLock())) {
-      if (log)
-        log->Printf("SBProcess(%p)::LoadImage() => calling Platform::LoadImage"
-                    "for: %s",
-                    static_cast<void *>(process_sp.get()),
-                    sb_local_image_spec.GetFilename());
-
       std::lock_guard<std::recursive_mutex> guard(
         process_sp->GetTarget().GetAPIMutex());
       PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
       return platform_sp->LoadImage(process_sp.get(), *sb_local_image_spec,
                                     *sb_remote_image_spec, sb_error.ref());
     } else {
-      if (log)
-        log->Printf("SBProcess(%p)::LoadImage() => error: process is running",
-                    static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
-  } else { 
-    if (log)
-      log->Printf("SBProcess(%p)::LoadImage() => error: called with invalid"
-                    " process",
-                    static_cast<void *>(process_sp.get()));
+  } else {
     sb_error.SetErrorString("process is invalid");
   }
   return LLDB_INVALID_IMAGE_TOKEN;
@@ -1376,17 +1050,10 @@ uint32_t SBProcess::LoadImageUsingPaths(
                       lldb::SBFileSpec &, lldb::SBError &),
                      image_spec, paths, loaded_path, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ProcessSP process_sp(GetSP());
   if (process_sp) {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&process_sp->GetRunLock())) {
-      if (log)
-        log->Printf("SBProcess(%p)::LoadImageUsingPaths() => "
-                    "calling Platform::LoadImageUsingPaths for: %s",
-                    static_cast<void *>(process_sp.get()),
-                    image_spec.GetFilename());
-
       std::lock_guard<std::recursive_mutex> guard(
         process_sp->GetTarget().GetAPIMutex());
       PlatformSP platform_sp = process_sp->GetTarget().GetPlatform();
@@ -1396,30 +1063,19 @@ uint32_t SBProcess::LoadImageUsingPaths(
       for (size_t i = 0; i < num_paths; i++)
         paths_vec.push_back(paths.GetStringAtIndex(i));
       FileSpec loaded_spec;
-      
-      uint32_t token = platform_sp->LoadImageUsingPaths(process_sp.get(),
-                                                        *image_spec, 
-                                                        paths_vec, 
-                                                        error.ref(), 
-                                                        &loaded_spec);
-       if (token != LLDB_INVALID_IMAGE_TOKEN)
-          loaded_path = loaded_spec;
-       return token;
+
+      uint32_t token = platform_sp->LoadImageUsingPaths(
+          process_sp.get(), *image_spec, paths_vec, error.ref(), &loaded_spec);
+      if (token != LLDB_INVALID_IMAGE_TOKEN)
+        loaded_path = loaded_spec;
+      return token;
     } else {
-      if (log)
-        log->Printf("SBProcess(%p)::LoadImageUsingPaths() => error: "
-                    "process is running",
-                    static_cast<void *>(process_sp.get()));
       error.SetErrorString("process is running");
     }
-  } else { 
-    if (log)
-      log->Printf("SBProcess(%p)::LoadImageUsingPaths() => error: "
-                   "called with invalid process",
-                    static_cast<void *>(process_sp.get()));
+  } else {
     error.SetErrorString("process is invalid");
   }
-  
+
   return LLDB_INVALID_IMAGE_TOKEN;
 }
 
@@ -1438,10 +1094,6 @@ lldb::SBError SBProcess::UnloadImage(uin
       sb_error.SetError(
           platform_sp->UnloadImage(process_sp.get(), image_token));
     } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf("SBProcess(%p)::UnloadImage() => error: process is running",
-                    static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   } else
@@ -1462,11 +1114,6 @@ lldb::SBError SBProcess::SendEventData(c
           process_sp->GetTarget().GetAPIMutex());
       sb_error.SetError(process_sp->SendEventData(event_data));
     } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf(
-            "SBProcess(%p)::SendEventData() => error: process is running",
-            static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   } else
@@ -1496,12 +1143,6 @@ const char *SBProcess::GetExtendedBacktr
         runtime->GetExtendedBacktraceTypes();
     if (idx < names.size()) {
       return names[idx].AsCString();
-    } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf("SBProcess(%p)::GetExtendedBacktraceTypeAtIndex() => "
-                    "error: requested extended backtrace name out of bounds",
-                    static_cast<void *>(process_sp.get()));
     }
   }
   return NULL;
@@ -1579,11 +1220,6 @@ SBProcess::GetMemoryRegionInfo(lldb::add
       sb_error.ref() =
           process_sp->GetMemoryRegionInfo(load_addr, sb_region_info.ref());
     } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf(
-            "SBProcess(%p)::GetMemoryRegionInfo() => error: process is running",
-            static_cast<void *>(process_sp.get()));
       sb_error.SetErrorString("process is running");
     }
   } else {
@@ -1605,12 +1241,6 @@ lldb::SBMemoryRegionInfoList SBProcess::
         process_sp->GetTarget().GetAPIMutex());
 
     process_sp->GetMemoryRegions(sb_region_list.ref());
-  } else {
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-    if (log)
-      log->Printf(
-          "SBProcess(%p)::GetMemoryRegionInfo() => error: process is running",
-          static_cast<void *>(process_sp.get()));
   }
 
   return LLDB_RECORD_RESULT(sb_region_list);

Modified: lldb/trunk/source/API/SBQueue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueue.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueue.cpp (original)
+++ lldb/trunk/source/API/SBQueue.cpp Thu Mar  7 14:47:13 2019
@@ -19,7 +19,6 @@
 #include "lldb/Target/Queue.h"
 #include "lldb/Target/QueueItem.h"
 #include "lldb/Target/Thread.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -71,10 +70,6 @@ public:
     if (queue_sp) {
       result = queue_sp->GetID();
     }
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-    if (log)
-      log->Printf("SBQueue(%p)::GetQueueID () => 0x%" PRIx64,
-                  static_cast<const void *>(this), result);
     return result;
   }
 
@@ -84,10 +79,6 @@ public:
     if (queue_sp) {
       result = queue_sp->GetIndexID();
     }
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-    if (log)
-      log->Printf("SBQueueImpl(%p)::GetIndexID () => %d",
-                  static_cast<const void *>(this), result);
     return result;
   }
 
@@ -97,12 +88,6 @@ public:
     if (queue_sp.get()) {
       name = queue_sp->GetName();
     }
-
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-    if (log)
-      log->Printf("SBQueueImpl(%p)::GetName () => %s",
-                  static_cast<const void *>(this), name ? name : "NULL");
-
     return name;
   }
 
@@ -263,20 +248,12 @@ SBQueue::~SBQueue() {}
 bool SBQueue::IsValid() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueue, IsValid);
 
-  bool is_valid = m_opaque_sp->IsValid();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::IsValid() == %s",
-                m_opaque_sp->GetQueueID(), is_valid ? "true" : "false");
-  return is_valid;
+  return m_opaque_sp->IsValid();
 }
 
 void SBQueue::Clear() {
   LLDB_RECORD_METHOD_NO_ARGS(void, SBQueue, Clear);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::Clear()", m_opaque_sp->GetQueueID());
   m_opaque_sp->Clear();
 }
 
@@ -287,45 +264,26 @@ void SBQueue::SetQueue(const QueueSP &qu
 lldb::queue_id_t SBQueue::GetQueueID() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::queue_id_t, SBQueue, GetQueueID);
 
-  lldb::queue_id_t qid = m_opaque_sp->GetQueueID();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetQueueID() == 0x%" PRIx64,
-                m_opaque_sp->GetQueueID(), (uint64_t)qid);
-  return qid;
+  return m_opaque_sp->GetQueueID();
 }
 
 uint32_t SBQueue::GetIndexID() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBQueue, GetIndexID);
 
   uint32_t index_id = m_opaque_sp->GetIndexID();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetIndexID() == 0x%" PRIx32,
-                m_opaque_sp->GetQueueID(), index_id);
   return index_id;
 }
 
 const char *SBQueue::GetName() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBQueue, GetName);
 
-  const char *name = m_opaque_sp->GetName();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetName() == %s",
-                m_opaque_sp->GetQueueID(), name ? name : "");
-  return name;
+  return m_opaque_sp->GetName();
 }
 
 uint32_t SBQueue::GetNumThreads() {
   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumThreads);
 
-  uint32_t numthreads = m_opaque_sp->GetNumThreads();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetNumThreads() == %d",
-                m_opaque_sp->GetQueueID(), numthreads);
-  return numthreads;
+  return m_opaque_sp->GetNumThreads();
 }
 
 SBThread SBQueue::GetThreadAtIndex(uint32_t idx) {
@@ -333,44 +291,26 @@ SBThread SBQueue::GetThreadAtIndex(uint3
                      idx);
 
   SBThread th = m_opaque_sp->GetThreadAtIndex(idx);
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetThreadAtIndex(%d)",
-                m_opaque_sp->GetQueueID(), idx);
   return LLDB_RECORD_RESULT(th);
 }
 
 uint32_t SBQueue::GetNumPendingItems() {
   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumPendingItems);
 
-  uint32_t pending_items = m_opaque_sp->GetNumPendingItems();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetNumPendingItems() == %d",
-                m_opaque_sp->GetQueueID(), pending_items);
-  return pending_items;
+  return m_opaque_sp->GetNumPendingItems();
 }
 
 SBQueueItem SBQueue::GetPendingItemAtIndex(uint32_t idx) {
   LLDB_RECORD_METHOD(lldb::SBQueueItem, SBQueue, GetPendingItemAtIndex,
                      (uint32_t), idx);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetPendingItemAtIndex(%d)",
-                m_opaque_sp->GetQueueID(), idx);
   return LLDB_RECORD_RESULT(m_opaque_sp->GetPendingItemAtIndex(idx));
 }
 
 uint32_t SBQueue::GetNumRunningItems() {
   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBQueue, GetNumRunningItems);
 
-  uint32_t running_items = m_opaque_sp->GetNumRunningItems();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueue(0x%" PRIx64 ")::GetNumRunningItems() == %d",
-                m_opaque_sp->GetQueueID(), running_items);
-  return running_items;
+  return m_opaque_sp->GetNumRunningItems();
 }
 
 SBProcess SBQueue::GetProcess() {

Modified: lldb/trunk/source/API/SBQueueItem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBQueueItem.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBQueueItem.cpp (original)
+++ lldb/trunk/source/API/SBQueueItem.cpp Thu Mar  7 14:47:13 2019
@@ -16,7 +16,6 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/QueueItem.h"
 #include "lldb/Target/Thread.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -42,22 +41,12 @@ SBQueueItem::~SBQueueItem() { m_queue_it
 bool SBQueueItem::IsValid() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBQueueItem, IsValid);
 
-  bool is_valid = m_queue_item_sp.get() != NULL;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueueItem(%p)::IsValid() == %s",
-                static_cast<void *>(m_queue_item_sp.get()),
-                is_valid ? "true" : "false");
-  return is_valid;
+  return m_queue_item_sp.get() != NULL;
 }
 
 void SBQueueItem::Clear() {
   LLDB_RECORD_METHOD_NO_ARGS(void, SBQueueItem, Clear);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBQueueItem(%p)::Clear()",
-                static_cast<void *>(m_queue_item_sp.get()));
   m_queue_item_sp.reset();
 }
 
@@ -72,14 +61,9 @@ lldb::QueueItemKind SBQueueItem::GetKind
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::QueueItemKind, SBQueueItem, GetKind);
 
   QueueItemKind result = eQueueItemKindUnknown;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (m_queue_item_sp) {
     result = m_queue_item_sp->GetKind();
   }
-  if (log)
-    log->Printf("SBQueueItem(%p)::GetKind() == %d",
-                static_cast<void *>(m_queue_item_sp.get()),
-                static_cast<int>(result));
   return result;
 }
 
@@ -95,20 +79,9 @@ SBAddress SBQueueItem::GetAddress() cons
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBAddress, SBQueueItem, GetAddress);
 
   SBAddress result;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (m_queue_item_sp) {
     result.SetAddress(&m_queue_item_sp->GetAddress());
   }
-  if (log) {
-    StreamString sstr;
-    const Address *addr = result.get();
-    if (addr)
-      addr->Dump(&sstr, NULL, Address::DumpStyleModuleWithFileAddress,
-                 Address::DumpStyleInvalid, 4);
-    log->Printf("SBQueueItem(%p)::GetAddress() == SBAddress(%p): %s",
-                static_cast<void *>(m_queue_item_sp.get()),
-                static_cast<void *>(result.get()), sstr.GetData());
-  }
   return LLDB_RECORD_RESULT(result);
 }
 
@@ -125,7 +98,6 @@ SBThread SBQueueItem::GetExtendedBacktra
                      (const char *), type);
 
   SBThread result;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (m_queue_item_sp) {
     ProcessSP process_sp = m_queue_item_sp->GetProcessSP();
     Process::StopLocker stop_locker;
@@ -138,17 +110,6 @@ SBThread SBQueueItem::GetExtendedBacktra
         // retains the object
         process_sp->GetExtendedThreadList().AddThread(thread_sp);
         result.SetThread(thread_sp);
-        if (log) {
-          const char *queue_name = thread_sp->GetQueueName();
-          if (queue_name == NULL)
-            queue_name = "";
-          log->Printf(
-              "SBQueueItem(%p)::GetExtendedBacktraceThread() = new extended "
-              "Thread created (%p) with queue_id 0x%" PRIx64 " queue name '%s'",
-              static_cast<void *>(m_queue_item_sp.get()),
-              static_cast<void *>(thread_sp.get()),
-              static_cast<uint64_t>(thread_sp->GetQueueID()), queue_name);
-        }
       }
     }
   }

Modified: lldb/trunk/source/API/SBSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSection.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSection.cpp (original)
+++ lldb/trunk/source/API/SBSection.cpp Thu Mar  7 14:47:13 2019
@@ -15,7 +15,6 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/API/SBSymbol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbol.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbol.cpp (original)
+++ lldb/trunk/source/API/SBSymbol.cpp Thu Mar  7 14:47:13 2019
@@ -14,7 +14,6 @@
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -57,10 +56,6 @@ const char *SBSymbol::GetName() const {
   if (m_opaque_ptr)
     name = m_opaque_ptr->GetName().AsCString();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBSymbol(%p)::GetName () => \"%s\"",
-                static_cast<void *>(m_opaque_ptr), name ? name : "");
   return name;
 }
 
@@ -73,10 +68,6 @@ const char *SBSymbol::GetDisplayName() c
                .GetDisplayDemangledName(m_opaque_ptr->GetLanguage())
                .AsCString();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBSymbol(%p)::GetDisplayName () => \"%s\"",
-                static_cast<void *>(m_opaque_ptr), name ? name : "");
   return name;
 }
 
@@ -86,11 +77,6 @@ const char *SBSymbol::GetMangledName() c
   const char *name = NULL;
   if (m_opaque_ptr)
     name = m_opaque_ptr->GetMangled().GetMangledName().AsCString();
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBSymbol(%p)::GetMangledName () => \"%s\"",
-                static_cast<void *>(m_opaque_ptr), name ? name : "");
-
   return name;
 }
 

Modified: lldb/trunk/source/API/SBSymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBSymbolContext.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBSymbolContext.cpp (original)
+++ lldb/trunk/source/API/SBSymbolContext.cpp Thu Mar  7 14:47:13 2019
@@ -14,7 +14,6 @@
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Utility/Log.h"
 
 using namespace lldb;
 using namespace lldb_private;
@@ -66,8 +65,6 @@ bool SBSymbolContext::IsValid() const {
 SBModule SBSymbolContext::GetModule() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBModule, SBSymbolContext, GetModule);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBModule sb_module;
   ModuleSP module_sp;
   if (m_opaque_up) {
@@ -75,14 +72,6 @@ SBModule SBSymbolContext::GetModule() {
     sb_module.SetSP(module_sp);
   }
 
-  if (log) {
-    SBStream sstr;
-    sb_module.GetDescription(sstr);
-    log->Printf("SBSymbolContext(%p)::GetModule () => SBModule(%p): %s",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<void *>(module_sp.get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_module);
 }
 
@@ -97,8 +86,6 @@ SBCompileUnit SBSymbolContext::GetCompil
 SBFunction SBSymbolContext::GetFunction() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBFunction, SBSymbolContext, GetFunction);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   Function *function = NULL;
 
   if (m_opaque_up)
@@ -106,11 +93,6 @@ SBFunction SBSymbolContext::GetFunction(
 
   SBFunction sb_function(function);
 
-  if (log)
-    log->Printf("SBSymbolContext(%p)::GetFunction () => SBFunction(%p)",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<void *>(function));
-
   return LLDB_RECORD_RESULT(sb_function);
 }
 
@@ -123,26 +105,16 @@ SBBlock SBSymbolContext::GetBlock() {
 SBLineEntry SBSymbolContext::GetLineEntry() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBLineEntry, SBSymbolContext, GetLineEntry);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBLineEntry sb_line_entry;
   if (m_opaque_up)
     sb_line_entry.SetLineEntry(m_opaque_up->line_entry);
 
-  if (log) {
-    log->Printf("SBSymbolContext(%p)::GetLineEntry () => SBLineEntry(%p)",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<void *>(sb_line_entry.get()));
-  }
-
   return LLDB_RECORD_RESULT(sb_line_entry);
 }
 
 SBSymbol SBSymbolContext::GetSymbol() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBSymbol, SBSymbolContext, GetSymbol);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   Symbol *symbol = NULL;
 
   if (m_opaque_up)
@@ -150,11 +122,6 @@ SBSymbol SBSymbolContext::GetSymbol() {
 
   SBSymbol sb_symbol(symbol);
 
-  if (log)
-    log->Printf("SBSymbolContext(%p)::GetSymbol () => SBSymbol(%p)",
-                static_cast<void *>(m_opaque_up.get()),
-                static_cast<void *>(symbol));
-
   return LLDB_RECORD_RESULT(sb_symbol);
 }
 

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Thu Mar  7 14:47:13 2019
@@ -61,7 +61,6 @@
 #include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Args.h"
 #include "lldb/Utility/FileSpec.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/ProcessInfo.h"
 #include "lldb/Utility/RegularExpression.h"
 
@@ -186,12 +185,6 @@ SBProcess SBTarget::GetProcess() {
     sb_process.SetSP(process_sp);
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBTarget(%p)::GetProcess () => SBProcess(%p)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<void *>(process_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -332,23 +325,10 @@ SBProcess SBTarget::Launch(SBListener &l
                      listener, argv, envp, stdin_path, stdout_path, stderr_path,
                      working_directory, launch_flags, stop_at_entry, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBProcess sb_process;
   ProcessSP process_sp;
   TargetSP target_sp(GetSP());
 
-  if (log)
-    log->Printf("SBTarget(%p)::Launch (argv=%p, envp=%p, stdin=%s, stdout=%s, "
-                "stderr=%s, working-dir=%s, launch_flags=0x%x, "
-                "stop_at_entry=%i, &error (%p))...",
-                static_cast<void *>(target_sp.get()), static_cast<void *>(argv),
-                static_cast<void *>(envp), stdin_path ? stdin_path : "NULL",
-                stdout_path ? stdout_path : "NULL",
-                stderr_path ? stderr_path : "NULL",
-                working_directory ? working_directory : "NULL", launch_flags,
-                stop_at_entry, static_cast<void *>(error.get()));
-
   if (target_sp) {
     std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
 
@@ -408,13 +388,6 @@ SBProcess SBTarget::Launch(SBListener &l
     error.SetErrorString("SBTarget is invalid");
   }
 
-  log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API);
-  if (log)
-    log->Printf("SBTarget(%p)::Launch (...) => SBProcess(%p), SBError(%s)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<void *>(sb_process.GetSP().get()),
-                error.GetCString());
-
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -423,15 +396,10 @@ SBProcess SBTarget::Launch(SBLaunchInfo
                      (lldb::SBLaunchInfo &, lldb::SBError &), sb_launch_info,
                      error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBProcess sb_process;
   TargetSP target_sp(GetSP());
 
-  if (log)
-    log->Printf("SBTarget(%p)::Launch (launch_info, error)...",
-                static_cast<void *>(target_sp.get()));
-
   if (target_sp) {
     std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
     StateType state = eStateInvalid;
@@ -469,12 +437,6 @@ SBProcess SBTarget::Launch(SBLaunchInfo
     error.SetErrorString("SBTarget is invalid");
   }
 
-  log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API);
-  if (log)
-    log->Printf("SBTarget(%p)::Launch (...) => SBProcess(%p)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<void *>(sb_process.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -483,15 +445,9 @@ lldb::SBProcess SBTarget::Attach(SBAttac
                      (lldb::SBAttachInfo &, lldb::SBError &), sb_attach_info,
                      error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBProcess sb_process;
   TargetSP target_sp(GetSP());
 
-  if (log)
-    log->Printf("SBTarget(%p)::Attach (sb_attach_info, error)...",
-                static_cast<void *>(target_sp.get()));
-
   if (target_sp) {
     ProcessAttachInfo &attach_info = sb_attach_info.ref();
     if (attach_info.ProcessIDIsValid() && !attach_info.UserIDIsValid()) {
@@ -505,11 +461,6 @@ lldb::SBProcess SBTarget::Attach(SBAttac
         } else {
           error.ref().SetErrorStringWithFormat(
               "no process found with process ID %" PRIu64, attach_pid);
-          if (log) {
-            log->Printf("SBTarget(%p)::Attach (...) => error %s",
-                        static_cast<void *>(target_sp.get()),
-                        error.GetCString());
-          }
           return LLDB_RECORD_RESULT(sb_process);
         }
       }
@@ -521,11 +472,6 @@ lldb::SBProcess SBTarget::Attach(SBAttac
     error.SetErrorString("SBTarget is invalid");
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::Attach (...) => SBProcess(%p)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<void *>(sb_process.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -538,15 +484,9 @@ lldb::SBProcess SBTarget::AttachToProces
                      (lldb::SBListener &, lldb::pid_t, lldb::SBError &),
                      listener, pid, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBProcess sb_process;
   TargetSP target_sp(GetSP());
 
-  if (log)
-    log->Printf("SBTarget(%p)::%s (listener, pid=%" PRId64 ", error)...",
-                static_cast<void *>(target_sp.get()), __FUNCTION__, pid);
-
   if (target_sp) {
     ProcessAttachInfo attach_info;
     attach_info.SetProcessID(pid);
@@ -563,10 +503,6 @@ lldb::SBProcess SBTarget::AttachToProces
   } else
     error.SetErrorString("SBTarget is invalid");
 
-  if (log)
-    log->Printf("SBTarget(%p)::%s (...) => SBProcess(%p)",
-                static_cast<void *>(target_sp.get()), __FUNCTION__,
-                static_cast<void *>(sb_process.GetSP().get()));
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -580,16 +516,9 @@ lldb::SBProcess SBTarget::AttachToProces
                      (lldb::SBListener &, const char *, bool, lldb::SBError &),
                      listener, name, wait_for, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBProcess sb_process;
   TargetSP target_sp(GetSP());
 
-  if (log)
-    log->Printf("SBTarget(%p)::%s (listener, name=%s, wait_for=%s, error)...",
-                static_cast<void *>(target_sp.get()), __FUNCTION__, name,
-                wait_for ? "true" : "false");
-
   if (name && target_sp) {
     ProcessAttachInfo attach_info;
     attach_info.GetExecutableFile().SetFile(name, FileSpec::Style::native);
@@ -603,10 +532,6 @@ lldb::SBProcess SBTarget::AttachToProces
   } else
     error.SetErrorString("SBTarget is invalid");
 
-  if (log)
-    log->Printf("SBTarget(%p)::%s (...) => SBProcess(%p)",
-                static_cast<void *>(target_sp.get()), __FUNCTION__,
-                static_cast<void *>(sb_process.GetSP().get()));
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -618,17 +543,10 @@ lldb::SBProcess SBTarget::ConnectRemote(
       (lldb::SBListener &, const char *, const char *, lldb::SBError &),
       listener, url, plugin_name, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBProcess sb_process;
   ProcessSP process_sp;
   TargetSP target_sp(GetSP());
 
-  if (log)
-    log->Printf("SBTarget(%p)::ConnectRemote (listener, url=%s, "
-                "plugin_name=%s, error)...",
-                static_cast<void *>(target_sp.get()), url, plugin_name);
-
   if (target_sp) {
     std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
     if (listener.IsValid())
@@ -648,10 +566,6 @@ lldb::SBProcess SBTarget::ConnectRemote(
     error.SetErrorString("SBTarget is invalid");
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::ConnectRemote (...) => SBProcess(%p)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<void *>(process_sp.get()));
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -666,13 +580,6 @@ SBFileSpec SBTarget::GetExecutable() {
       exe_file_spec.SetFileSpec(exe_module->GetFileSpec());
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    log->Printf("SBTarget(%p)::GetExecutable () => SBFileSpec(%p)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<const void *>(exe_file_spec.get()));
-  }
-
   return LLDB_RECORD_RESULT(exe_file_spec);
 }
 
@@ -837,8 +744,6 @@ SBBreakpoint SBTarget::BreakpointCreateB
                       lldb::addr_t, lldb::SBFileSpecList &),
                      sb_file_spec, line, column, offset, sb_module_list);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp && line != 0) {
@@ -858,17 +763,6 @@ SBBreakpoint SBTarget::BreakpointCreateB
         skip_prologue, internal, hardware, move_to_nearest_code);
   }
 
-  if (log) {
-    SBStream sstr;
-    sb_bp.GetDescription(sstr);
-    char path[PATH_MAX];
-    sb_file_spec->GetPath(path, sizeof(path));
-    log->Printf("SBTarget(%p)::BreakpointCreateByLocation ( %s:%u ) => "
-                "SBBreakpoint(%p): %s",
-                static_cast<void *>(target_sp.get()), path, line,
-                static_cast<void *>(sb_bp.GetSP().get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -877,8 +771,6 @@ SBBreakpoint SBTarget::BreakpointCreateB
   LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByName,
                      (const char *, const char *), symbol_name, module_name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp.get()) {
@@ -901,12 +793,6 @@ SBBreakpoint SBTarget::BreakpointCreateB
     }
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\", "
-                "module=\"%s\") => SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()), symbol_name, module_name,
-                static_cast<void *>(sb_bp.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -949,8 +835,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
                      symbol_name, name_type_mask, symbol_language, module_list,
                      comp_unit_list);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp && symbol_name && symbol_name[0]) {
@@ -964,12 +848,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
                                         skip_prologue, internal, hardware);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointCreateByName (symbol=\"%s\", "
-                "name_type: %d) => SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()), symbol_name,
-                name_type_mask, static_cast<void *>(sb_bp.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -1014,8 +892,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
                      symbol_names, num_names, name_type_mask, symbol_language,
                      offset, module_list, comp_unit_list);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp && num_names > 0) {
@@ -1029,24 +905,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
         symbol_language, offset, skip_prologue, internal, hardware);
   }
 
-  if (log) {
-    log->Printf("SBTarget(%p)::BreakpointCreateByName (symbols={",
-                static_cast<void *>(target_sp.get()));
-    for (uint32_t i = 0; i < num_names; i++) {
-      char sep;
-      if (i < num_names - 1)
-        sep = ',';
-      else
-        sep = '}';
-      if (symbol_names[i] != NULL)
-        log->Printf("\"%s\"%c ", symbol_names[i], sep);
-      else
-        log->Printf("\"<NULL>\"%c ", sep);
-    }
-    log->Printf("name_type: %d) => SBBreakpoint(%p)", name_type_mask,
-                static_cast<void *>(sb_bp.GetSP().get()));
-  }
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -1088,7 +946,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
        const lldb::SBFileSpecList &),
       symbol_name_regex, symbol_language, module_list, comp_unit_list);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
@@ -1104,12 +961,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
         skip_prologue, internal, hardware);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointCreateByRegex (symbol_regex=\"%s\") "
-                "=> SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()), symbol_name_regex,
-                static_cast<void *>(sb_bp.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -1117,8 +968,6 @@ SBBreakpoint SBTarget::BreakpointCreateB
   LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateByAddress,
                      (lldb::addr_t), address);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp) {
@@ -1127,13 +976,6 @@ SBBreakpoint SBTarget::BreakpointCreateB
     sb_bp = target_sp->CreateBreakpoint(address, false, hardware);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointCreateByAddress (address=%" PRIu64
-                ") => SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<uint64_t>(address),
-                static_cast<void *>(sb_bp.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -1141,15 +983,9 @@ SBBreakpoint SBTarget::BreakpointCreateB
   LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, BreakpointCreateBySBAddress,
                      (lldb::SBAddress &), sb_address);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (!sb_address.IsValid()) {
-    if (log)
-      log->Printf("SBTarget(%p)::BreakpointCreateBySBAddress called with "
-                  "invalid address",
-                  static_cast<void *>(target_sp.get()));
     return LLDB_RECORD_RESULT(sb_bp);
   }
 
@@ -1159,15 +995,6 @@ SBBreakpoint SBTarget::BreakpointCreateB
     sb_bp = target_sp->CreateBreakpoint(sb_address.ref(), false, hardware);
   }
 
-  if (log) {
-    SBStream s;
-    sb_address.GetDescription(s);
-    log->Printf("SBTarget(%p)::BreakpointCreateBySBAddress (address=%s) => "
-                "SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()), s.GetData(),
-                static_cast<void *>(sb_bp.GetSP().get()));
-  }
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -1218,8 +1045,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
                       const lldb::SBFileSpecList &, const lldb::SBStringList &),
                      source_regex, module_list, source_file_list, func_names);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp && source_regex && source_regex[0]) {
@@ -1237,12 +1062,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
         false, hardware, move_to_nearest_code);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointCreateByRegex (source_regex=\"%s\") "
-                "=> SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()), source_regex,
-                static_cast<void *>(sb_bp.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -1253,8 +1072,6 @@ SBTarget::BreakpointCreateForException(l
                      (lldb::LanguageType, bool, bool), language, catch_bp,
                      throw_bp);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp) {
@@ -1264,14 +1081,6 @@ SBTarget::BreakpointCreateForException(l
                                                   hardware);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointCreateForException (Language: %s, catch: "
-                "%s throw: %s) => SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()),
-                Language::GetNameForLanguageType(language),
-                catch_bp ? "on" : "off", throw_bp ? "on" : "off",
-                static_cast<void *>(sb_bp.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_bp);
 }
 
@@ -1285,14 +1094,12 @@ lldb::SBBreakpoint SBTarget::BreakpointC
        const lldb::SBFileSpecList &, bool),
       class_name, extra_args, module_list, file_list, request_hardware);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_bp;
   TargetSP target_sp(GetSP());
   if (target_sp) {
     std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
     Status error;
-    
+
     StructuredData::ObjectSP obj_sp = extra_args.m_impl_up->GetObjectSP();
     sb_bp =
         target_sp->CreateScriptedBreakpoint(class_name,
@@ -1303,12 +1110,6 @@ lldb::SBBreakpoint SBTarget::BreakpointC
                                             obj_sp,
                                             &error);
   }
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointCreateFromScript (class name: %s) "
-                " => SBBreakpoint(%p)",
-                static_cast<void *>(target_sp.get()),
-                class_name,
-                static_cast<void *>(sb_bp.GetSP().get()));
 
   return LLDB_RECORD_RESULT(sb_bp);
 }
@@ -1341,8 +1142,6 @@ bool SBTarget::BreakpointDelete(break_id
   LLDB_RECORD_METHOD(bool, SBTarget, BreakpointDelete, (lldb::break_id_t),
                      bp_id);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   bool result = false;
   TargetSP target_sp(GetSP());
   if (target_sp) {
@@ -1350,11 +1149,6 @@ bool SBTarget::BreakpointDelete(break_id
     result = target_sp->RemoveBreakpointByID(bp_id);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::BreakpointDelete (bp_id=%d) => %i",
-                static_cast<void *>(target_sp.get()),
-                static_cast<uint32_t>(bp_id), result);
-
   return result;
 }
 
@@ -1362,8 +1156,6 @@ SBBreakpoint SBTarget::FindBreakpointByI
   LLDB_RECORD_METHOD(lldb::SBBreakpoint, SBTarget, FindBreakpointByID,
                      (lldb::break_id_t), bp_id);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBBreakpoint sb_breakpoint;
   TargetSP target_sp(GetSP());
   if (target_sp && bp_id != LLDB_INVALID_BREAK_ID) {
@@ -1371,12 +1163,6 @@ SBBreakpoint SBTarget::FindBreakpointByI
     sb_breakpoint = target_sp->GetBreakpointByID(bp_id);
   }
 
-  if (log)
-    log->Printf(
-        "SBTarget(%p)::FindBreakpointByID (bp_id=%d) => SBBreakpoint(%p)",
-        static_cast<void *>(target_sp.get()), static_cast<uint32_t>(bp_id),
-        static_cast<void *>(sb_breakpoint.GetSP().get()));
-
   return LLDB_RECORD_RESULT(sb_breakpoint);
 }
 
@@ -1576,7 +1362,6 @@ bool SBTarget::DeleteWatchpoint(watch_id
   LLDB_RECORD_METHOD(bool, SBTarget, DeleteWatchpoint, (lldb::watch_id_t),
                      wp_id);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   bool result = false;
   TargetSP target_sp(GetSP());
@@ -1587,11 +1372,6 @@ bool SBTarget::DeleteWatchpoint(watch_id
     result = target_sp->RemoveWatchpointByID(wp_id);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::WatchpointDelete (wp_id=%d) => %i",
-                static_cast<void *>(target_sp.get()),
-                static_cast<uint32_t>(wp_id), result);
-
   return result;
 }
 
@@ -1599,7 +1379,6 @@ SBWatchpoint SBTarget::FindWatchpointByI
   LLDB_RECORD_METHOD(lldb::SBWatchpoint, SBTarget, FindWatchpointByID,
                      (lldb::watch_id_t), wp_id);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   SBWatchpoint sb_watchpoint;
   lldb::WatchpointSP watchpoint_sp;
@@ -1612,12 +1391,6 @@ SBWatchpoint SBTarget::FindWatchpointByI
     sb_watchpoint.SetSP(watchpoint_sp);
   }
 
-  if (log)
-    log->Printf(
-        "SBTarget(%p)::FindWatchpointByID (bp_id=%d) => SBWatchpoint(%p)",
-        static_cast<void *>(target_sp.get()), static_cast<uint32_t>(wp_id),
-        static_cast<void *>(watchpoint_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_watchpoint);
 }
 
@@ -1628,8 +1401,6 @@ lldb::SBWatchpoint SBTarget::WatchAddres
                      (lldb::addr_t, size_t, bool, bool, lldb::SBError &), addr,
                      size, read, write, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBWatchpoint sb_watchpoint;
   lldb::WatchpointSP watchpoint_sp;
   TargetSP target_sp(GetSP());
@@ -1657,13 +1428,6 @@ lldb::SBWatchpoint SBTarget::WatchAddres
     sb_watchpoint.SetSP(watchpoint_sp);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::WatchAddress (addr=0x%" PRIx64
-                ", 0x%u) => SBWatchpoint(%p)",
-                static_cast<void *>(target_sp.get()), addr,
-                static_cast<uint32_t>(size),
-                static_cast<void *>(watchpoint_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_watchpoint);
 }
 
@@ -1712,16 +1476,6 @@ SBValue SBTarget::CreateValueFromAddress
                                                              exe_ctx, ast_type);
   }
   sb_value.SetSP(new_value_sp);
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (new_value_sp)
-      log->Printf("SBTarget(%p)::CreateValueFromAddress => \"%s\"",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  new_value_sp->GetName().AsCString());
-    else
-      log->Printf("SBTarget(%p)::CreateValueFromAddress => NULL",
-                  static_cast<void *>(m_opaque_sp.get()));
-  }
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -1742,16 +1496,6 @@ lldb::SBValue SBTarget::CreateValueFromD
                                                           exe_ctx, ast_type);
   }
   sb_value.SetSP(new_value_sp);
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (new_value_sp)
-      log->Printf("SBTarget(%p)::CreateValueFromData => \"%s\"",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  new_value_sp->GetName().AsCString());
-    else
-      log->Printf("SBTarget(%p)::CreateValueFromData => NULL",
-                  static_cast<void *>(m_opaque_sp.get()));
-  }
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -1769,16 +1513,6 @@ lldb::SBValue SBTarget::CreateValueFromE
         ValueObject::CreateValueObjectFromExpression(name, expr, exe_ctx);
   }
   sb_value.SetSP(new_value_sp);
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (new_value_sp)
-      log->Printf("SBTarget(%p)::CreateValueFromExpression => \"%s\"",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  new_value_sp->GetName().AsCString());
-    else
-      log->Printf("SBTarget(%p)::CreateValueFromExpression => NULL",
-                  static_cast<void *>(m_opaque_sp.get()));
-  }
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -1812,11 +1546,6 @@ void SBTarget::AppendImageSearchPath(con
   if (!csTo)
     return error.SetErrorString("<to> path can't be empty");
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBTarget(%p)::%s: '%s' -> '%s'",
-                static_cast<void *>(target_sp.get()),  __FUNCTION__,
-                from, to);
   target_sp->GetImageSearchPathList().Append(csFrom, csTo, true);
 }
 
@@ -1884,8 +1613,6 @@ bool SBTarget::AddModule(lldb::SBModule
 uint32_t SBTarget::GetNumModules() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBTarget, GetNumModules);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t num = 0;
   TargetSP target_sp(GetSP());
   if (target_sp) {
@@ -1893,22 +1620,12 @@ uint32_t SBTarget::GetNumModules() const
     num = target_sp->GetImages().GetSize();
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::GetNumModules () => %d",
-                static_cast<void *>(target_sp.get()), num);
-
   return num;
 }
 
 void SBTarget::Clear() {
   LLDB_RECORD_METHOD_NO_ARGS(void, SBTarget, Clear);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log)
-    log->Printf("SBTarget(%p)::Clear ()",
-                static_cast<void *>(m_opaque_sp.get()));
-
   m_opaque_sp.reset();
 }
 
@@ -1997,8 +1714,6 @@ SBModule SBTarget::GetModuleAtIndex(uint
   LLDB_RECORD_METHOD(lldb::SBModule, SBTarget, GetModuleAtIndex, (uint32_t),
                      idx);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBModule sb_module;
   ModuleSP module_sp;
   TargetSP target_sp(GetSP());
@@ -2008,11 +1723,6 @@ SBModule SBTarget::GetModuleAtIndex(uint
     sb_module.SetSP(module_sp);
   }
 
-  if (log)
-    log->Printf("SBTarget(%p)::GetModuleAtIndex (idx=%d) => SBModule(%p)",
-                static_cast<void *>(target_sp.get()), idx,
-                static_cast<void *>(module_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_module);
 }
 
@@ -2029,15 +1739,10 @@ SBBroadcaster SBTarget::GetBroadcaster()
   LLDB_RECORD_METHOD_CONST_NO_ARGS(lldb::SBBroadcaster, SBTarget,
                                    GetBroadcaster);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   TargetSP target_sp(GetSP());
   SBBroadcaster broadcaster(target_sp.get(), false);
 
-  if (log)
-    log->Printf("SBTarget(%p)::GetBroadcaster () => SBBroadcaster(%p)",
-                static_cast<void *>(target_sp.get()),
-                static_cast<void *>(broadcaster.get()));
 
   return LLDB_RECORD_RESULT(broadcaster);
 }
@@ -2622,7 +2327,6 @@ lldb::SBValue SBTarget::EvaluateExpressi
                      (const char *, const lldb::SBExpressionOptions &), expr,
                      options);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 #if !defined(LLDB_DISABLE_PYTHON)
   Log *expr_log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_EXPRESSIONS));
 #endif
@@ -2633,17 +2337,12 @@ lldb::SBValue SBTarget::EvaluateExpressi
   StackFrame *frame = NULL;
   if (target_sp) {
     if (expr == NULL || expr[0] == '\0') {
-      if (log)
-        log->Printf(
-            "SBTarget::EvaluateExpression called with an empty expression");
       return LLDB_RECORD_RESULT(expr_result);
     }
 
     std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
     ExecutionContext exe_ctx(m_opaque_sp.get());
 
-    if (log)
-      log->Printf("SBTarget()::EvaluateExpression (expr=\"%s\")...", expr);
 
     frame = exe_ctx.GetFramePtr();
     Target *target = exe_ctx.GetTargetPtr();
@@ -2663,10 +2362,6 @@ lldb::SBValue SBTarget::EvaluateExpressi
           target->EvaluateExpression(expr, frame, expr_value_sp, options.ref());
 
       expr_result.SetSP(expr_value_sp, options.GetFetchDynamicValue());
-    } else {
-      if (log)
-        log->Printf("SBTarget::EvaluateExpression () => error: could not "
-                    "reconstruct frame object for this SBTarget.");
     }
   }
 #ifndef LLDB_DISABLE_PYTHON
@@ -2674,12 +2369,6 @@ lldb::SBValue SBTarget::EvaluateExpressi
     expr_log->Printf("** [SBTarget::EvaluateExpression] Expression result is "
                      "%s, summary %s **",
                      expr_result.GetValue(), expr_result.GetSummary());
-
-  if (log)
-    log->Printf("SBTarget(%p)::EvaluateExpression (expr=\"%s\") => SBValue(%p) "
-                "(execution result=%d)",
-                static_cast<void *>(frame), expr,
-                static_cast<void *>(expr_value_sp.get()), exe_results);
 #endif
 
   return LLDB_RECORD_RESULT(expr_result);

Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Thu Mar  7 14:47:13 2019
@@ -100,7 +100,6 @@ lldb::SBQueue SBThread::GetQueue() const
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (exe_ctx.HasThreadScope()) {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
@@ -108,18 +107,9 @@ lldb::SBQueue SBThread::GetQueue() const
       if (queue_sp) {
         sb_queue.SetQueue(queue_sp);
       }
-    } else {
-      if (log)
-        log->Printf("SBThread(%p)::GetQueue() => error: process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetQueue () => SBQueue(%p)",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                static_cast<void *>(queue_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_queue);
 }
 
@@ -149,8 +139,6 @@ void SBThread::Clear() {
 StopReason SBThread::GetStopReason() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::StopReason, SBThread, GetStopReason);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   StopReason reason = eStopReasonInvalid;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -159,19 +147,9 @@ StopReason SBThread::GetStopReason() {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
       return exe_ctx.GetThreadPtr()->GetStopReason();
-    } else {
-      if (log)
-        log->Printf(
-            "SBThread(%p)::GetStopReason() => error: process is running",
-            static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetStopReason () => %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                Thread::StopReasonAsCString(reason));
-
   return reason;
 }
 
@@ -219,12 +197,6 @@ size_t SBThread::GetStopReasonDataCount(
           return 1;
         }
       }
-    } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf("SBThread(%p)::GetStopReasonDataCount() => error: process "
-                    "is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
   return 0;
@@ -287,12 +259,6 @@ uint64_t SBThread::GetStopReasonDataAtIn
           return stop_info_sp->GetValue();
         }
       }
-    } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf("SBThread(%p)::GetStopReasonDataAtIndex() => error: "
-                    "process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
   return 0;
@@ -350,8 +316,6 @@ size_t SBThread::GetStopDescription(char
   LLDB_RECORD_METHOD(size_t, SBThread, GetStopDescription, (char *, size_t),
                      dst, dst_len);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
@@ -363,10 +327,6 @@ size_t SBThread::GetStopDescription(char
       if (stop_info_sp) {
         const char *stop_desc = stop_info_sp->GetDescription();
         if (stop_desc) {
-          if (log)
-            log->Printf(
-                "SBThread(%p)::GetStopDescription (dst, dst_len) => \"%s\"",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), stop_desc);
           if (dst)
             return ::snprintf(dst, dst_len, "%s", stop_desc);
           else {
@@ -431,11 +391,6 @@ size_t SBThread::GetStopDescription(char
           }
 
           if (stop_desc && stop_desc[0]) {
-            if (log)
-              log->Printf(
-                  "SBThread(%p)::GetStopDescription (dst, dst_len) => '%s'",
-                  static_cast<void *>(exe_ctx.GetThreadPtr()), stop_desc);
-
             if (dst)
               return ::snprintf(dst, dst_len, "%s", stop_desc) +
                      1; // Include the NULL byte
@@ -447,12 +402,6 @@ size_t SBThread::GetStopDescription(char
           }
         }
       }
-    } else {
-      Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-      if (log)
-        log->Printf(
-            "SBThread(%p)::GetStopDescription() => error: process is running",
-            static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
   if (dst)
@@ -463,7 +412,6 @@ size_t SBThread::GetStopDescription(char
 SBValue SBThread::GetStopReturnValue() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBValue, SBThread, GetStopReturnValue);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ValueObjectSP return_valobj_sp;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -475,20 +423,9 @@ SBValue SBThread::GetStopReturnValue() {
       if (stop_info_sp) {
         return_valobj_sp = StopInfo::GetReturnValueObject(stop_info_sp);
       }
-    } else {
-      if (log)
-        log->Printf(
-            "SBThread(%p)::GetStopReturnValue() => error: process is running",
-            static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetStopReturnValue () => %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                return_valobj_sp.get() ? return_valobj_sp->GetValueAsCString()
-                                       : "<no return value>");
-
   return LLDB_RECORD_RESULT(SBValue(return_valobj_sp));
 }
 
@@ -517,7 +454,6 @@ uint32_t SBThread::GetIndexID() const {
 const char *SBThread::GetName() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(const char *, SBThread, GetName);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *name = NULL;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -526,18 +462,9 @@ const char *SBThread::GetName() const {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
       name = exe_ctx.GetThreadPtr()->GetName();
-    } else {
-      if (log)
-        log->Printf("SBThread(%p)::GetName() => error: process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetName () => %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                name ? name : "NULL");
-
   return name;
 }
 
@@ -548,23 +475,13 @@ const char *SBThread::GetQueueName() con
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (exe_ctx.HasThreadScope()) {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
       name = exe_ctx.GetThreadPtr()->GetQueueName();
-    } else {
-      if (log)
-        log->Printf("SBThread(%p)::GetQueueName() => error: process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetQueueName () => %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                name ? name : "NULL");
-
   return name;
 }
 
@@ -575,22 +492,13 @@ lldb::queue_id_t SBThread::GetQueueID()
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (exe_ctx.HasThreadScope()) {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
       id = exe_ctx.GetThreadPtr()->GetQueueID();
-    } else {
-      if (log)
-        log->Printf("SBThread(%p)::GetQueueID() => error: process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetQueueID () => 0x%" PRIx64,
-                static_cast<void *>(exe_ctx.GetThreadPtr()), id);
-
   return id;
 }
 
@@ -598,7 +506,6 @@ bool SBThread::GetInfoItemByPathAsString
   LLDB_RECORD_METHOD(bool, SBThread, GetInfoItemByPathAsString,
                      (const char *, lldb::SBStream &), path, strm);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   bool success = false;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -637,18 +544,9 @@ bool SBThread::GetInfoItemByPathAsString
           }
         }
       }
-    } else {
-      if (log)
-        log->Printf("SBThread(%p)::GetInfoItemByPathAsString() => error: "
-                    "process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetInfoItemByPathAsString (\"%s\") => \"%s\"",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), path, strm.GetData());
-
   return success;
 }
 
@@ -698,16 +596,9 @@ void SBThread::StepOver(lldb::RunMode st
   LLDB_RECORD_METHOD(void, SBThread, StepOver, (lldb::RunMode, lldb::SBError &),
                      stop_other_threads, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBThread(%p)::StepOver (stop_other_threads='%s')",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                Thread::RunModeAsCString(stop_other_threads));
-
   if (!exe_ctx.HasThreadScope()) {
     error.SetErrorString("this SBThread object is invalid");
     return;
@@ -756,18 +647,10 @@ void SBThread::StepInto(const char *targ
                      (const char *, uint32_t, lldb::SBError &, lldb::RunMode),
                      target_name, end_line, error, stop_other_threads);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf(
-        "SBThread(%p)::StepInto (target_name='%s', stop_other_threads='%s')",
-        static_cast<void *>(exe_ctx.GetThreadPtr()),
-        target_name ? target_name : "<NULL>",
-        Thread::RunModeAsCString(stop_other_threads));
-
   if (!exe_ctx.HasThreadScope()) {
     error.SetErrorString("this SBThread object is invalid");
     return;
@@ -819,15 +702,9 @@ void SBThread::StepOut() {
 void SBThread::StepOut(SBError &error) {
   LLDB_RECORD_METHOD(void, SBThread, StepOut, (lldb::SBError &), error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBThread(%p)::StepOut ()",
-                static_cast<void *>(exe_ctx.GetThreadPtr()));
-
   if (!exe_ctx.HasThreadScope()) {
     error.SetErrorString("this SBThread object is invalid");
     return;
@@ -862,28 +739,16 @@ void SBThread::StepOutOfFrame(SBFrame &s
   LLDB_RECORD_METHOD(void, SBThread, StepOutOfFrame,
                      (lldb::SBFrame &, lldb::SBError &), sb_frame, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
   if (!sb_frame.IsValid()) {
-    if (log)
-      log->Printf(
-          "SBThread(%p)::StepOutOfFrame passed an invalid frame, returning.",
-          static_cast<void *>(exe_ctx.GetThreadPtr()));
     error.SetErrorString("passed invalid SBFrame object");
     return;
   }
 
   StackFrameSP frame_sp(sb_frame.GetFrameSP());
-  if (log) {
-    SBStream frame_desc_strm;
-    sb_frame.GetDescription(frame_desc_strm);
-    log->Printf("SBThread(%p)::StepOutOfFrame (frame = SBFrame(%p): %s)",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                static_cast<void *>(frame_sp.get()), frame_desc_strm.GetData());
-  }
 
   if (!exe_ctx.HasThreadScope()) {
     error.SetErrorString("this SBThread object is invalid");
@@ -894,10 +759,6 @@ void SBThread::StepOutOfFrame(SBFrame &s
   bool stop_other_threads = false;
   Thread *thread = exe_ctx.GetThreadPtr();
   if (sb_frame.GetThread().GetThreadID() != thread->GetID()) {
-    log->Printf("SBThread(%p)::StepOutOfFrame passed a frame from another "
-                "thread (0x%" PRIx64 " vrs. 0x%" PRIx64 ", returning.",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                sb_frame.GetThread().GetThreadID(), thread->GetID());
     error.SetErrorString("passed a frame from another thread");
     return;
   }
@@ -924,15 +785,9 @@ void SBThread::StepInstruction(bool step
   LLDB_RECORD_METHOD(void, SBThread, StepInstruction, (bool, lldb::SBError &),
                      step_over, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBThread(%p)::StepInstruction (step_over=%i)",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), step_over);
-
   if (!exe_ctx.HasThreadScope()) {
     error.SetErrorString("this SBThread object is invalid");
     return;
@@ -960,15 +815,9 @@ void SBThread::RunToAddress(lldb::addr_t
   LLDB_RECORD_METHOD(void, SBThread, RunToAddress,
                      (lldb::addr_t, lldb::SBError &), addr, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBThread(%p)::RunToAddress (addr=0x%" PRIx64 ")",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), addr);
-
   if (!exe_ctx.HasThreadScope()) {
     error.SetErrorString("this SBThread object is invalid");
     return;
@@ -998,7 +847,6 @@ SBError SBThread::StepOverUntil(lldb::SB
                      sb_file_spec, line);
 
   SBError sb_error;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   char path[PATH_MAX];
 
   std::unique_lock<std::recursive_mutex> lock;
@@ -1006,17 +854,6 @@ SBError SBThread::StepOverUntil(lldb::SB
 
   StackFrameSP frame_sp(sb_frame.GetFrameSP());
 
-  if (log) {
-    SBStream frame_desc_strm;
-    sb_frame.GetDescription(frame_desc_strm);
-    sb_file_spec->GetPath(path, sizeof(path));
-    log->Printf("SBThread(%p)::StepOverUntil (frame = SBFrame(%p): %s, "
-                "file+line = %s:%u)",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                static_cast<void *>(frame_sp.get()), frame_desc_strm.GetData(),
-                path, line);
-  }
-
   if (exe_ctx.HasThreadScope()) {
     Target *target = exe_ctx.GetTargetPtr();
     Thread *thread = exe_ctx.GetThreadPtr();
@@ -1135,17 +972,11 @@ SBError SBThread::StepUsingScriptedThrea
                      (const char *, bool), script_class_name,
                      resume_immediately);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBError error;
 
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log) {
-    log->Printf("SBThread(%p)::StepUsingScriptedThreadPlan: class name: %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), script_class_name);
-  }
-
   if (!exe_ctx.HasThreadScope()) {
     error.SetErrorString("this SBThread object is invalid");
     return LLDB_RECORD_RESULT(error);
@@ -1176,17 +1007,11 @@ SBError SBThread::JumpToLine(lldb::SBFil
   LLDB_RECORD_METHOD(lldb::SBError, SBThread, JumpToLine,
                      (lldb::SBFileSpec &, uint32_t), file_spec, line);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBError sb_error;
 
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBThread(%p)::JumpToLine (file+line = %s:%u)",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                file_spec->GetPath().c_str(), line);
-
   if (!exe_ctx.HasThreadScope()) {
     sb_error.SetErrorString("this SBThread object is invalid");
     return LLDB_RECORD_RESULT(sb_error);
@@ -1205,16 +1030,9 @@ SBError SBThread::ReturnFromFrame(SBFram
 
   SBError sb_error;
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBThread(%p)::ReturnFromFrame (frame=%d)",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                frame.GetFrameID());
-
   if (exe_ctx.HasThreadScope()) {
     Thread *thread = exe_ctx.GetThreadPtr();
     sb_error.SetError(
@@ -1230,15 +1048,9 @@ SBError SBThread::UnwindInnermostExpress
 
   SBError sb_error;
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
-  if (log)
-    log->Printf("SBThread(%p)::UnwindExpressionEvaluation",
-                static_cast<void *>(exe_ctx.GetThreadPtr()));
-
   if (exe_ctx.HasThreadScope()) {
     Thread *thread = exe_ctx.GetThreadPtr();
     sb_error.SetError(thread->UnwindInnermostExpression());
@@ -1259,7 +1071,6 @@ bool SBThread::Suspend() {
 bool SBThread::Suspend(SBError &error) {
   LLDB_RECORD_METHOD(bool, SBThread, Suspend, (lldb::SBError &), error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
@@ -1271,15 +1082,9 @@ bool SBThread::Suspend(SBError &error) {
       result = true;
     } else {
       error.SetErrorString("process is running");
-      if (log)
-        log->Printf("SBThread(%p)::Suspend() => error: process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   } else
     error.SetErrorString("this SBThread object is invalid");
-  if (log)
-    log->Printf("SBThread(%p)::Suspend() => %i",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), result);
   return result;
 }
 
@@ -1293,7 +1098,6 @@ bool SBThread::Resume() {
 bool SBThread::Resume(SBError &error) {
   LLDB_RECORD_METHOD(bool, SBThread, Resume, (lldb::SBError &), error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
 
@@ -1306,15 +1110,9 @@ bool SBThread::Resume(SBError &error) {
       result = true;
     } else {
       error.SetErrorString("process is running");
-      if (log)
-        log->Printf("SBThread(%p)::Resume() => error: process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   } else
     error.SetErrorString("this SBThread object is invalid");
-  if (log)
-    log->Printf("SBThread(%p)::Resume() => %i",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), result);
   return result;
 }
 
@@ -1353,24 +1151,12 @@ SBProcess SBThread::GetProcess() {
     sb_process.SetSP(exe_ctx.GetProcessSP());
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    SBStream frame_desc_strm;
-    sb_process.GetDescription(frame_desc_strm);
-    log->Printf("SBThread(%p)::GetProcess () => SBProcess(%p): %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                static_cast<void *>(sb_process.GetSP().get()),
-                frame_desc_strm.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_process);
 }
 
 uint32_t SBThread::GetNumFrames() {
   LLDB_RECORD_METHOD_NO_ARGS(uint32_t, SBThread, GetNumFrames);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   uint32_t num_frames = 0;
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
@@ -1379,25 +1165,15 @@ uint32_t SBThread::GetNumFrames() {
     Process::StopLocker stop_locker;
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
       num_frames = exe_ctx.GetThreadPtr()->GetStackFrameCount();
-    } else {
-      if (log)
-        log->Printf("SBThread(%p)::GetNumFrames() => error: process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log)
-    log->Printf("SBThread(%p)::GetNumFrames () => %u",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), num_frames);
-
   return num_frames;
 }
 
 SBFrame SBThread::GetFrameAtIndex(uint32_t idx) {
   LLDB_RECORD_METHOD(lldb::SBFrame, SBThread, GetFrameAtIndex, (uint32_t), idx);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBFrame sb_frame;
   StackFrameSP frame_sp;
   std::unique_lock<std::recursive_mutex> lock;
@@ -1408,30 +1184,15 @@ SBFrame SBThread::GetFrameAtIndex(uint32
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
       frame_sp = exe_ctx.GetThreadPtr()->GetStackFrameAtIndex(idx);
       sb_frame.SetFrameSP(frame_sp);
-    } else {
-      if (log)
-        log->Printf(
-            "SBThread(%p)::GetFrameAtIndex() => error: process is running",
-            static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log) {
-    SBStream frame_desc_strm;
-    sb_frame.GetDescription(frame_desc_strm);
-    log->Printf("SBThread(%p)::GetFrameAtIndex (idx=%d) => SBFrame(%p): %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), idx,
-                static_cast<void *>(frame_sp.get()), frame_desc_strm.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_frame);
 }
 
 lldb::SBFrame SBThread::GetSelectedFrame() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBFrame, SBThread, GetSelectedFrame);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBFrame sb_frame;
   StackFrameSP frame_sp;
   std::unique_lock<std::recursive_mutex> lock;
@@ -1442,22 +1203,9 @@ lldb::SBFrame SBThread::GetSelectedFrame
     if (stop_locker.TryLock(&exe_ctx.GetProcessPtr()->GetRunLock())) {
       frame_sp = exe_ctx.GetThreadPtr()->GetSelectedFrame();
       sb_frame.SetFrameSP(frame_sp);
-    } else {
-      if (log)
-        log->Printf(
-            "SBThread(%p)::GetSelectedFrame() => error: process is running",
-            static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log) {
-    SBStream frame_desc_strm;
-    sb_frame.GetDescription(frame_desc_strm);
-    log->Printf("SBThread(%p)::GetSelectedFrame () => SBFrame(%p): %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()),
-                static_cast<void *>(frame_sp.get()), frame_desc_strm.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_frame);
 }
 
@@ -1465,8 +1213,6 @@ lldb::SBFrame SBThread::SetSelectedFrame
   LLDB_RECORD_METHOD(lldb::SBFrame, SBThread, SetSelectedFrame, (uint32_t),
                      idx);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   SBFrame sb_frame;
   StackFrameSP frame_sp;
   std::unique_lock<std::recursive_mutex> lock;
@@ -1481,21 +1227,9 @@ lldb::SBFrame SBThread::SetSelectedFrame
         thread->SetSelectedFrame(frame_sp.get());
         sb_frame.SetFrameSP(frame_sp);
       }
-    } else {
-      if (log)
-        log->Printf(
-            "SBThread(%p)::SetSelectedFrame() => error: process is running",
-            static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log) {
-    SBStream frame_desc_strm;
-    sb_frame.GetDescription(frame_desc_strm);
-    log->Printf("SBThread(%p)::SetSelectedFrame (idx=%u) => SBFrame(%p): %s",
-                static_cast<void *>(exe_ctx.GetThreadPtr()), idx,
-                static_cast<void *>(frame_sp.get()), frame_desc_strm.GetData());
-  }
   return LLDB_RECORD_RESULT(sb_frame);
 }
 
@@ -1587,7 +1321,6 @@ SBThread SBThread::GetExtendedBacktraceT
   LLDB_RECORD_METHOD(lldb::SBThread, SBThread, GetExtendedBacktraceThread,
                      (const char *), type);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   std::unique_lock<std::recursive_mutex> lock;
   ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
   SBThread sb_origin_thread;
@@ -1609,34 +1342,13 @@ SBThread SBThread::GetExtendedBacktraceT
               // pointer retains the object.
               process->GetExtendedThreadList().AddThread(new_thread_sp);
               sb_origin_thread.SetThread(new_thread_sp);
-              if (log) {
-                const char *queue_name = new_thread_sp->GetQueueName();
-                if (queue_name == NULL)
-                  queue_name = "";
-                log->Printf("SBThread(%p)::GetExtendedBacktraceThread() => new "
-                            "extended Thread "
-                            "created (%p) with queue_id 0x%" PRIx64
-                            " queue name '%s'",
-                            static_cast<void *>(exe_ctx.GetThreadPtr()),
-                            static_cast<void *>(new_thread_sp.get()),
-                            new_thread_sp->GetQueueID(), queue_name);
-              }
             }
           }
         }
       }
-    } else {
-      if (log)
-        log->Printf("SBThread(%p)::GetExtendedBacktraceThread() => error: "
-                    "process is running",
-                    static_cast<void *>(exe_ctx.GetThreadPtr()));
     }
   }
 
-  if (log && !sb_origin_thread.IsValid())
-    log->Printf("SBThread(%p)::GetExtendedBacktraceThread() is not returning a "
-                "Valid thread",
-                static_cast<void *>(exe_ctx.GetThreadPtr()));
   return LLDB_RECORD_RESULT(sb_origin_thread);
 }
 

Modified: lldb/trunk/source/API/SBTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTrace.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTrace.cpp (original)
+++ lldb/trunk/source/API/SBTrace.cpp Thu Mar  7 14:47:13 2019
@@ -8,7 +8,6 @@
 
 #include "SBReproducerPrivate.h"
 #include "lldb/Target/Process.h"
-#include "lldb/Utility/Log.h"
 
 #include "lldb/API/SBTrace.h"
 #include "lldb/API/SBTraceOptions.h"
@@ -28,7 +27,6 @@ lldb::ProcessSP SBTrace::GetSP() const {
 size_t SBTrace::GetTraceData(SBError &error, void *buf, size_t size,
                              size_t offset, lldb::tid_t thread_id) {
   ProcessSP process_sp(GetSP());
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   llvm::MutableArrayRef<uint8_t> buffer(static_cast<uint8_t *>(buf), size);
   error.Clear();
 
@@ -37,7 +35,6 @@ size_t SBTrace::GetTraceData(SBError &er
   } else {
     error.SetError(
         process_sp->GetData(GetTraceUID(), thread_id, buffer, offset));
-    LLDB_LOG(log, "SBTrace::bytes_read - {0}", buffer.size());
   }
   return buffer.size();
 }
@@ -45,17 +42,14 @@ size_t SBTrace::GetTraceData(SBError &er
 size_t SBTrace::GetMetaData(SBError &error, void *buf, size_t size,
                             size_t offset, lldb::tid_t thread_id) {
   ProcessSP process_sp(GetSP());
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   llvm::MutableArrayRef<uint8_t> buffer(static_cast<uint8_t *>(buf), size);
   error.Clear();
 
   if (!process_sp) {
     error.SetErrorString("invalid process");
   } else {
-
     error.SetError(
         process_sp->GetMetaData(GetTraceUID(), thread_id, buffer, offset));
-    LLDB_LOG(log, "SBTrace::bytes_read - {0}", buffer.size());
   }
   return buffer.size();
 }

Modified: lldb/trunk/source/API/SBType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBType.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBType.cpp (original)
+++ lldb/trunk/source/API/SBType.cpp Thu Mar  7 14:47:13 2019
@@ -16,7 +16,6 @@
 #include "lldb/Symbol/Type.h"
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Utility/ConstString.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 
 #include "llvm/ADT/APSInt.h"

Modified: lldb/trunk/source/API/SBUnixSignals.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBUnixSignals.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBUnixSignals.cpp (original)
+++ lldb/trunk/source/API/SBUnixSignals.cpp Thu Mar  7 14:47:13 2019
@@ -11,7 +11,6 @@
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/UnixSignals.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/lldb-defines.h"
 
 #include "lldb/API/SBUnixSignals.h"
@@ -98,14 +97,8 @@ bool SBUnixSignals::SetShouldSuppress(in
   LLDB_RECORD_METHOD(bool, SBUnixSignals, SetShouldSuppress, (int32_t, bool),
                      signo, value);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   auto signals_sp = GetSP();
 
-  if (log) {
-    log->Printf("SBUnixSignals(%p)::SetShouldSuppress (signo=%d, value=%d)",
-                static_cast<void *>(signals_sp.get()), signo, value);
-  }
-
   if (signals_sp)
     return signals_sp->SetShouldSuppress(signo, value);
 
@@ -126,14 +119,8 @@ bool SBUnixSignals::SetShouldStop(int32_
   LLDB_RECORD_METHOD(bool, SBUnixSignals, SetShouldStop, (int32_t, bool), signo,
                      value);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   auto signals_sp = GetSP();
 
-  if (log) {
-    log->Printf("SBUnixSignals(%p)::SetShouldStop (signo=%d, value=%d)",
-                static_cast<void *>(signals_sp.get()), signo, value);
-  }
-
   if (signals_sp)
     return signals_sp->SetShouldStop(signo, value);
 
@@ -154,14 +141,8 @@ bool SBUnixSignals::SetShouldNotify(int3
   LLDB_RECORD_METHOD(bool, SBUnixSignals, SetShouldNotify, (int32_t, bool),
                      signo, value);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   auto signals_sp = GetSP();
 
-  if (log) {
-    log->Printf("SBUnixSignals(%p)::SetShouldNotify (signo=%d, value=%d)",
-                static_cast<void *>(signals_sp.get()), signo, value);
-  }
-
   if (signals_sp)
     return signals_sp->SetShouldNotify(signo, value);
 

Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Thu Mar  7 14:47:13 2019
@@ -36,7 +36,6 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/DataExtractor.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Scalar.h"
 #include "lldb/Utility/Stream.h"
 
@@ -109,7 +108,6 @@ public:
   lldb::ValueObjectSP GetSP(Process::StopLocker &stop_locker,
                             std::unique_lock<std::recursive_mutex> &lock,
                             Status &error) {
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
     if (!m_valobj_sp) {
       error.SetErrorString("invalid value object");
       return m_valobj_sp;
@@ -128,9 +126,6 @@ public:
       // We don't allow people to play around with ValueObject if the process
       // is running. If you want to look at values, pause the process, then
       // look.
-      if (log)
-        log->Printf("SBValue(%p)::GetSP() => error: process is running",
-                    static_cast<void *>(value_sp.get()));
       error.SetErrorString("process must be stopped.");
       return ValueObjectSP();
     }
@@ -297,23 +292,12 @@ const char *SBValue::GetName() {
   if (value_sp)
     name = value_sp->GetName().GetCString();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (name)
-      log->Printf("SBValue(%p)::GetName () => \"%s\"",
-                  static_cast<void *>(value_sp.get()), name);
-    else
-      log->Printf("SBValue(%p)::GetName () => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
-
   return name;
 }
 
 const char *SBValue::GetTypeName() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetTypeName);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *name = NULL;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -321,22 +305,12 @@ const char *SBValue::GetTypeName() {
     name = value_sp->GetQualifiedTypeName().GetCString();
   }
 
-  if (log) {
-    if (name)
-      log->Printf("SBValue(%p)::GetTypeName () => \"%s\"",
-                  static_cast<void *>(value_sp.get()), name);
-    else
-      log->Printf("SBValue(%p)::GetTypeName () => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
-
   return name;
 }
 
 const char *SBValue::GetDisplayTypeName() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetDisplayTypeName);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *name = NULL;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -344,22 +318,12 @@ const char *SBValue::GetDisplayTypeName(
     name = value_sp->GetDisplayTypeName().GetCString();
   }
 
-  if (log) {
-    if (name)
-      log->Printf("SBValue(%p)::GetTypeName () => \"%s\"",
-                  static_cast<void *>(value_sp.get()), name);
-    else
-      log->Printf("SBValue(%p)::GetTypeName () => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
-
   return name;
 }
 
 size_t SBValue::GetByteSize() {
   LLDB_RECORD_METHOD_NO_ARGS(size_t, SBValue, GetByteSize);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   size_t result = 0;
 
   ValueLocker locker;
@@ -368,11 +332,6 @@ size_t SBValue::GetByteSize() {
     result = value_sp->GetByteSize();
   }
 
-  if (log)
-    log->Printf("SBValue(%p)::GetByteSize () => %" PRIu64,
-                static_cast<void *>(value_sp.get()),
-                static_cast<uint64_t>(result));
-
   return result;
 }
 
@@ -387,33 +346,18 @@ bool SBValue::IsInScope() {
     result = value_sp->IsInScope();
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBValue(%p)::IsInScope () => %i",
-                static_cast<void *>(value_sp.get()), result);
-
   return result;
 }
 
 const char *SBValue::GetValue() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetValue);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   const char *cstr = NULL;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp) {
     cstr = value_sp->GetValueAsCString();
   }
-  if (log) {
-    if (cstr)
-      log->Printf("SBValue(%p)::GetValue() => \"%s\"",
-                  static_cast<void *>(value_sp.get()), cstr);
-    else
-      log->Printf("SBValue(%p)::GetValue() => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
 
   return cstr;
 }
@@ -427,76 +371,25 @@ ValueType SBValue::GetValueType() {
   if (value_sp)
     result = value_sp->GetValueType();
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    switch (result) {
-    case eValueTypeInvalid:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeInvalid",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeVariableGlobal:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeVariableGlobal",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeVariableStatic:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeVariableStatic",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeVariableArgument:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeVariableArgument",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeVariableLocal:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeVariableLocal",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeRegister:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeRegister",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeRegisterSet:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeRegisterSet",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeConstResult:
-      log->Printf("SBValue(%p)::GetValueType () => eValueTypeConstResult",
-                  static_cast<void *>(value_sp.get()));
-      break;
-    case eValueTypeVariableThreadLocal:
-      log->Printf(
-          "SBValue(%p)::GetValueType () => eValueTypeVariableThreadLocal",
-          static_cast<void *>(value_sp.get()));
-      break;
-    }
-  }
   return result;
 }
 
 const char *SBValue::GetObjectDescription() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetObjectDescription);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *cstr = NULL;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp) {
     cstr = value_sp->GetObjectDescription();
   }
-  if (log) {
-    if (cstr)
-      log->Printf("SBValue(%p)::GetObjectDescription() => \"%s\"",
-                  static_cast<void *>(value_sp.get()), cstr);
-    else
-      log->Printf("SBValue(%p)::GetObjectDescription() => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
+
   return cstr;
 }
 
 const char *SBValue::GetTypeValidatorResult() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetTypeValidatorResult);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *cstr = NULL;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -509,21 +402,13 @@ const char *SBValue::GetTypeValidatorRes
         cstr = validation.second.c_str();
     }
   }
-  if (log) {
-    if (cstr)
-      log->Printf("SBValue(%p)::GetTypeValidatorResult() => \"%s\"",
-                  static_cast<void *>(value_sp.get()), cstr);
-    else
-      log->Printf("SBValue(%p)::GetTypeValidatorResult() => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
+
   return cstr;
 }
 
 SBType SBValue::GetType() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBType, SBValue, GetType);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   SBType sb_type;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -532,22 +417,13 @@ SBType SBValue::GetType() {
     type_sp = std::make_shared<TypeImpl>(value_sp->GetTypeImpl());
     sb_type.SetSP(type_sp);
   }
-  if (log) {
-    if (type_sp)
-      log->Printf("SBValue(%p)::GetType => SBType(%p)",
-                  static_cast<void *>(value_sp.get()),
-                  static_cast<void *>(type_sp.get()));
-    else
-      log->Printf("SBValue(%p)::GetType => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
+
   return LLDB_RECORD_RESULT(sb_type);
 }
 
 bool SBValue::GetValueDidChange() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBValue, GetValueDidChange);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   bool result = false;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -555,9 +431,6 @@ bool SBValue::GetValueDidChange() {
     if (value_sp->UpdateValueIfNeeded(false))
       result = value_sp->GetValueDidChange();
   }
-  if (log)
-    log->Printf("SBValue(%p)::GetValueDidChange() => %i",
-                static_cast<void *>(value_sp.get()), result);
 
   return result;
 }
@@ -565,21 +438,13 @@ bool SBValue::GetValueDidChange() {
 const char *SBValue::GetSummary() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetSummary);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *cstr = NULL;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp) {
     cstr = value_sp->GetSummaryAsCString();
   }
-  if (log) {
-    if (cstr)
-      log->Printf("SBValue(%p)::GetSummary() => \"%s\"",
-                  static_cast<void *>(value_sp.get()), cstr);
-    else
-      log->Printf("SBValue(%p)::GetSummary() => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
+
   return cstr;
 }
 
@@ -589,7 +454,6 @@ const char *SBValue::GetSummary(lldb::SB
                      (lldb::SBStream &, lldb::SBTypeSummaryOptions &), stream,
                      options);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp) {
@@ -598,35 +462,18 @@ const char *SBValue::GetSummary(lldb::SB
       stream.Printf("%s", buffer.c_str());
   }
   const char *cstr = stream.GetData();
-  if (log) {
-    if (cstr)
-      log->Printf("SBValue(%p)::GetSummary() => \"%s\"",
-                  static_cast<void *>(value_sp.get()), cstr);
-    else
-      log->Printf("SBValue(%p)::GetSummary() => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
   return cstr;
 }
 
 const char *SBValue::GetLocation() {
   LLDB_RECORD_METHOD_NO_ARGS(const char *, SBValue, GetLocation);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   const char *cstr = NULL;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp) {
     cstr = value_sp->GetLocationAsCString();
   }
-  if (log) {
-    if (cstr)
-      log->Printf("SBValue(%p)::GetLocation() => \"%s\"",
-                  static_cast<void *>(value_sp.get()), cstr);
-    else
-      log->Printf("SBValue(%p)::GetLocation() => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
   return cstr;
 }
 
@@ -646,17 +493,12 @@ bool SBValue::SetValueFromCString(const
   bool success = false;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   if (value_sp) {
     success = value_sp->SetValueFromCString(value_str, error.ref());
   } else
     error.SetErrorStringWithFormat("Could not get value: %s",
                                    locker.GetError().AsCString());
 
-  if (log)
-    log->Printf("SBValue(%p)::SetValueFromCString(\"%s\") => %i",
-                static_cast<void *>(value_sp.get()), value_str, success);
-
   return success;
 }
 
@@ -752,16 +594,6 @@ lldb::SBValue SBValue::CreateChildAtOffs
                      GetPreferDynamicValue(), GetPreferSyntheticValue(), name);
     }
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (new_value_sp)
-      log->Printf("SBValue(%p)::CreateChildAtOffset => \"%s\"",
-                  static_cast<void *>(value_sp.get()),
-                  new_value_sp->GetName().AsCString());
-    else
-      log->Printf("SBValue(%p)::CreateChildAtOffset => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -796,7 +628,6 @@ lldb::SBValue SBValue::CreateValueFromEx
                      (const char *, const char *, lldb::SBExpressionOptions &),
                      name, expression, options);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   lldb::SBValue sb_value;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -809,17 +640,6 @@ lldb::SBValue SBValue::CreateValueFromEx
       new_value_sp->SetName(ConstString(name));
   }
   sb_value.SetSP(new_value_sp);
-  if (log) {
-    if (new_value_sp)
-      log->Printf("SBValue(%p)::CreateValueFromExpression(name=\"%s\", "
-                  "expression=\"%s\") => SBValue (%p)",
-                  static_cast<void *>(value_sp.get()), name, expression,
-                  static_cast<void *>(new_value_sp.get()));
-    else
-      log->Printf("SBValue(%p)::CreateValueFromExpression(name=\"%s\", "
-                  "expression=\"%s\") => NULL",
-                  static_cast<void *>(value_sp.get()), name, expression);
-  }
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -842,16 +662,6 @@ lldb::SBValue SBValue::CreateValueFromAd
                                                              exe_ctx, ast_type);
   }
   sb_value.SetSP(new_value_sp);
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (new_value_sp)
-      log->Printf("SBValue(%p)::CreateValueFromAddress => \"%s\"",
-                  static_cast<void *>(value_sp.get()),
-                  new_value_sp->GetName().AsCString());
-    else
-      log->Printf("SBValue(%p)::CreateValueFromAddress => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -873,16 +683,6 @@ lldb::SBValue SBValue::CreateValueFromDa
     new_value_sp->SetAddressTypeOfChildren(eAddressTypeLoad);
   }
   sb_value.SetSP(new_value_sp);
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (new_value_sp)
-      log->Printf("SBValue(%p)::CreateValueFromData => \"%s\"",
-                  static_cast<void *>(value_sp.get()),
-                  new_value_sp->GetName().AsCString());
-    else
-      log->Printf("SBValue(%p)::CreateValueFromData => NULL",
-                  static_cast<void *>(value_sp.get()));
-  }
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -910,7 +710,6 @@ SBValue SBValue::GetChildAtIndex(uint32_
                      can_create_synthetic);
 
   lldb::ValueObjectSP child_sp;
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -924,10 +723,6 @@ SBValue SBValue::GetChildAtIndex(uint32_
 
   SBValue sb_value;
   sb_value.SetSP(child_sp, use_dynamic, GetPreferSyntheticValue());
-  if (log)
-    log->Printf("SBValue(%p)::GetChildAtIndex (%u) => SBValue(%p)",
-                static_cast<void *>(value_sp.get()), idx,
-                static_cast<void *>(value_sp.get()));
 
   return LLDB_RECORD_RESULT(sb_value);
 }
@@ -942,16 +737,6 @@ uint32_t SBValue::GetIndexOfChildWithNam
   if (value_sp) {
     idx = value_sp->GetIndexOfChildWithName(ConstString(name));
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (idx == UINT32_MAX)
-      log->Printf(
-          "SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => NOT FOUND",
-          static_cast<void *>(value_sp.get()), name);
-    else
-      log->Printf("SBValue(%p)::GetIndexOfChildWithName (name=\"%s\") => %u",
-                  static_cast<void *>(value_sp.get()), name, idx);
-  }
   return idx;
 }
 
@@ -979,8 +764,6 @@ SBValue::GetChildMemberWithName(const ch
   lldb::ValueObjectSP child_sp;
   const ConstString str_name(name);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp) {
@@ -990,12 +773,6 @@ SBValue::GetChildMemberWithName(const ch
   SBValue sb_value;
   sb_value.SetSP(child_sp, use_dynamic_value, GetPreferSyntheticValue());
 
-  if (log)
-    log->Printf(
-        "SBValue(%p)::GetChildMemberWithName (name=\"%s\") => SBValue(%p)",
-        static_cast<void *>(value_sp.get()), name,
-        static_cast<void *>(value_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -1113,7 +890,6 @@ lldb::SBValue SBValue::GetValueForExpres
   LLDB_RECORD_METHOD(lldb::SBValue, SBValue, GetValueForExpressionPath,
                      (const char *), expr_path);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   lldb::ValueObjectSP child_sp;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -1125,12 +901,6 @@ lldb::SBValue SBValue::GetValueForExpres
   SBValue sb_value;
   sb_value.SetSP(child_sp, GetPreferDynamicValue(), GetPreferSyntheticValue());
 
-  if (log)
-    log->Printf("SBValue(%p)::GetValueForExpressionPath (expr_path=\"%s\") => "
-                "SBValue(%p)",
-                static_cast<void *>(value_sp.get()), expr_path,
-                static_cast<void *>(value_sp.get()));
-
   return LLDB_RECORD_RESULT(sb_value);
 }
 
@@ -1202,32 +972,24 @@ uint64_t SBValue::GetValueAsUnsigned(uin
 bool SBValue::MightHaveChildren() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBValue, MightHaveChildren);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   bool has_children = false;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp)
     has_children = value_sp->MightHaveChildren();
 
-  if (log)
-    log->Printf("SBValue(%p)::MightHaveChildren() => %i",
-                static_cast<void *>(value_sp.get()), has_children);
   return has_children;
 }
 
 bool SBValue::IsRuntimeSupportValue() {
   LLDB_RECORD_METHOD_NO_ARGS(bool, SBValue, IsRuntimeSupportValue);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   bool is_support = false;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp)
     is_support = value_sp->IsRuntimeSupportValue();
 
-  if (log)
-    log->Printf("SBValue(%p)::IsRuntimeSupportValue() => %i",
-                static_cast<void *>(value_sp.get()), is_support);
   return is_support;
 }
 
@@ -1242,16 +1004,11 @@ uint32_t SBValue::GetNumChildren(uint32_
 
   uint32_t num_children = 0;
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (value_sp)
     num_children = value_sp->GetNumChildren(max);
 
-  if (log)
-    log->Printf("SBValue(%p)::GetNumChildren (%u) => %u",
-                static_cast<void *>(value_sp.get()), max, num_children);
-
   return num_children;
 }
 
@@ -1265,11 +1022,6 @@ SBValue SBValue::Dereference() {
     Status error;
     sb_value = value_sp->Dereference(error);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBValue(%p)::Dereference () => SBValue(%p)",
-                static_cast<void *>(value_sp.get()),
-                static_cast<void *>(value_sp.get()));
 
   return LLDB_RECORD_RESULT(sb_value);
 }
@@ -1300,16 +1052,7 @@ lldb::SBTarget SBValue::GetTarget() {
     target_sp = m_opaque_sp->GetTargetSP();
     sb_target.SetSP(target_sp);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (target_sp.get() == NULL)
-      log->Printf("SBValue(%p)::GetTarget () => NULL",
-                  static_cast<void *>(m_opaque_sp.get()));
-    else
-      log->Printf("SBValue(%p)::GetTarget () => %p",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(target_sp.get()));
-  }
+
   return LLDB_RECORD_RESULT(sb_target);
 }
 
@@ -1322,16 +1065,7 @@ lldb::SBProcess SBValue::GetProcess() {
     process_sp = m_opaque_sp->GetProcessSP();
     sb_process.SetSP(process_sp);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (process_sp.get() == NULL)
-      log->Printf("SBValue(%p)::GetProcess () => NULL",
-                  static_cast<void *>(m_opaque_sp.get()));
-    else
-      log->Printf("SBValue(%p)::GetProcess () => %p",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(process_sp.get()));
-  }
+
   return LLDB_RECORD_RESULT(sb_process);
 }
 
@@ -1344,16 +1078,7 @@ lldb::SBThread SBValue::GetThread() {
     thread_sp = m_opaque_sp->GetThreadSP();
     sb_thread.SetThread(thread_sp);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (thread_sp.get() == NULL)
-      log->Printf("SBValue(%p)::GetThread () => NULL",
-                  static_cast<void *>(m_opaque_sp.get()));
-    else
-      log->Printf("SBValue(%p)::GetThread () => %p",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(thread_sp.get()));
-  }
+
   return LLDB_RECORD_RESULT(sb_thread);
 }
 
@@ -1366,16 +1091,7 @@ lldb::SBFrame SBValue::GetFrame() {
     frame_sp = m_opaque_sp->GetFrameSP();
     sb_frame.SetFrameSP(frame_sp);
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log) {
-    if (frame_sp.get() == NULL)
-      log->Printf("SBValue(%p)::GetFrame () => NULL",
-                  static_cast<void *>(m_opaque_sp.get()));
-    else
-      log->Printf("SBValue(%p)::GetFrame () => %p",
-                  static_cast<void *>(m_opaque_sp.get()),
-                  static_cast<void *>(frame_sp.get()));
-  }
+
   return LLDB_RECORD_RESULT(sb_frame);
 }
 
@@ -1514,29 +1230,20 @@ lldb::SBValue SBValue::EvaluateExpressio
       (const char *, const lldb::SBExpressionOptions &, const char *), expr,
       options, name);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   if (!expr || expr[0] == '\0') {
-    LLDB_LOG(log,
-             "SBValue::EvaluateExpression called with an empty expression");
     return LLDB_RECORD_RESULT(SBValue());
   }
 
-  LLDB_LOG(log, "SBValue()::EvaluateExpression (expr=\"{0}\")...", expr);
 
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   if (!value_sp) {
-    LLDB_LOG(log, "SBValue::EvaluateExpression () => error: could not "
-                  "reconstruct value object for this SBValue");
     return LLDB_RECORD_RESULT(SBValue());
   }
 
   lldb::TargetSP target_sp = value_sp->GetTargetSP();
   if (!target_sp) {
-    LLDB_LOG(
-        log,
-        "SBValue::EvaluateExpression () => error: could not retrieve target");
     return LLDB_RECORD_RESULT(SBValue());
   }
 
@@ -1545,24 +1252,16 @@ lldb::SBValue SBValue::EvaluateExpressio
 
   StackFrame *frame = exe_ctx.GetFramePtr();
   if (!frame) {
-    LLDB_LOG(log, "SBValue::EvaluateExpression () => error: could not retrieve "
-                  "current stack frame");
     return LLDB_RECORD_RESULT(SBValue());
   }
 
   ValueObjectSP res_val_sp;
-  ExpressionResults expr_res = target_sp->EvaluateExpression(
-      expr, frame, res_val_sp, options.ref(), nullptr, value_sp.get());
+  target_sp->EvaluateExpression(expr, frame, res_val_sp, options.ref(), nullptr,
+                                value_sp.get());
 
   if (name)
     res_val_sp->SetName(ConstString(name));
 
-  LLDB_LOG(log,
-           "SBValue(Name=\"{0}\")::EvaluateExpression (expr=\"{1}\") => "
-           "SBValue(Success={2}) (execution result={3})",
-           value_sp->GetName(), expr, res_val_sp->GetError().Success(),
-           expr_res);
-
   SBValue result;
   result.SetSP(res_val_sp, options.GetFetchDynamicValue());
   return LLDB_RECORD_RESULT(result);
@@ -1614,11 +1313,6 @@ lldb::SBValue SBValue::AddressOf() {
     sb_value.SetSP(value_sp->AddressOf(error), GetPreferDynamicValue(),
                    GetPreferSyntheticValue());
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBValue(%p)::AddressOf () => SBValue(%p)",
-                static_cast<void *>(value_sp.get()),
-                static_cast<void *>(value_sp.get()));
 
   return LLDB_RECORD_RESULT(sb_value);
 }
@@ -1649,10 +1343,6 @@ lldb::addr_t SBValue::GetLoadAddress() {
         value = LLDB_INVALID_ADDRESS;
     }
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBValue(%p)::GetLoadAddress () => (%" PRIu64 ")",
-                static_cast<void *>(value_sp.get()), value);
 
   return value;
 }
@@ -1682,13 +1372,7 @@ lldb::SBAddress SBValue::GetAddress() {
       }
     }
   }
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBValue(%p)::GetAddress () => (%s,%" PRIu64 ")",
-                static_cast<void *>(value_sp.get()),
-                (addr.GetSection() ? addr.GetSection()->GetName().GetCString()
-                                   : "NULL"),
-                addr.GetOffset());
+
   return LLDB_RECORD_RESULT(SBAddress(new Address(addr)));
 }
 
@@ -1696,7 +1380,6 @@ lldb::SBData SBValue::GetPointeeData(uin
   LLDB_RECORD_METHOD(lldb::SBData, SBValue, GetPointeeData,
                      (uint32_t, uint32_t), item_idx, item_count);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   lldb::SBData sb_data;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -1709,10 +1392,6 @@ lldb::SBData SBValue::GetPointeeData(uin
         *sb_data = data_sp;
     }
   }
-  if (log)
-    log->Printf("SBValue(%p)::GetPointeeData (%d, %d) => SBData(%p)",
-                static_cast<void *>(value_sp.get()), item_idx, item_count,
-                static_cast<void *>(sb_data.get()));
 
   return LLDB_RECORD_RESULT(sb_data);
 }
@@ -1720,7 +1399,6 @@ lldb::SBData SBValue::GetPointeeData(uin
 lldb::SBData SBValue::GetData() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::SBData, SBValue, GetData);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   lldb::SBData sb_data;
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
@@ -1731,10 +1409,6 @@ lldb::SBData SBValue::GetData() {
     if (error.Success())
       *sb_data = data_sp;
   }
-  if (log)
-    log->Printf("SBValue(%p)::GetData () => SBData(%p)",
-                static_cast<void *>(value_sp.get()),
-                static_cast<void *>(sb_data.get()));
 
   return LLDB_RECORD_RESULT(sb_data);
 }
@@ -1743,7 +1417,6 @@ bool SBValue::SetData(lldb::SBData &data
   LLDB_RECORD_METHOD(bool, SBValue, SetData, (lldb::SBData &, lldb::SBError &),
                      data, error);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
   ValueLocker locker;
   lldb::ValueObjectSP value_sp(GetSP(locker));
   bool ret = true;
@@ -1752,10 +1425,6 @@ bool SBValue::SetData(lldb::SBData &data
     DataExtractor *data_extractor = data.get();
 
     if (!data_extractor) {
-      if (log)
-        log->Printf("SBValue(%p)::SetData() => error: no data to set",
-                    static_cast<void *>(value_sp.get()));
-
       error.SetErrorString("No data to set");
       ret = false;
     } else {
@@ -1776,10 +1445,6 @@ bool SBValue::SetData(lldb::SBData &data
     ret = false;
   }
 
-  if (log)
-    log->Printf("SBValue(%p)::SetData (%p) => %s",
-                static_cast<void *>(value_sp.get()),
-                static_cast<void *>(data.get()), ret ? "true" : "false");
   return ret;
 }
 
@@ -1850,19 +1515,9 @@ lldb::SBWatchpoint SBValue::Watch(bool r
       }
     }
   } else if (target_sp) {
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-    if (log)
-      log->Printf("SBValue(%p)::Watch() => error getting SBValue: %s",
-                  static_cast<void *>(value_sp.get()),
-                  locker.GetError().AsCString());
-
     error.SetErrorStringWithFormat("could not get SBValue: %s",
                                    locker.GetError().AsCString());
   } else {
-    Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-    if (log)
-      log->Printf("SBValue(%p)::Watch() => error getting SBValue: no target",
-                  static_cast<void *>(value_sp.get()));
     error.SetErrorString("could not set watchpoint, a target is required");
   }
 

Modified: lldb/trunk/source/API/SBValueList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValueList.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValueList.cpp (original)
+++ lldb/trunk/source/API/SBValueList.cpp Thu Mar  7 14:47:13 2019
@@ -11,7 +11,6 @@
 #include "lldb/API/SBStream.h"
 #include "lldb/API/SBValue.h"
 #include "lldb/Core/ValueObjectList.h"
-#include "lldb/Utility/Log.h"
 
 #include <vector>
 
@@ -75,30 +74,13 @@ SBValueList::SBValueList() : m_opaque_up
 SBValueList::SBValueList(const SBValueList &rhs) : m_opaque_up() {
   LLDB_RECORD_CONSTRUCTOR(SBValueList, (const lldb::SBValueList &), rhs);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   if (rhs.IsValid())
     m_opaque_up.reset(new ValueListImpl(*rhs));
-
-  if (log) {
-    log->Printf(
-        "SBValueList::SBValueList (rhs.ap=%p) => this.ap = %p",
-        static_cast<void *>(rhs.IsValid() ? rhs.m_opaque_up.get() : NULL),
-        static_cast<void *>(m_opaque_up.get()));
-  }
 }
 
 SBValueList::SBValueList(const ValueListImpl *lldb_object_ptr) : m_opaque_up() {
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
   if (lldb_object_ptr)
     m_opaque_up.reset(new ValueListImpl(*lldb_object_ptr));
-
-  if (log) {
-    log->Printf("SBValueList::SBValueList (lldb_object_ptr=%p) => this.ap = %p",
-                static_cast<const void *>(lldb_object_ptr),
-                static_cast<void *>(m_opaque_up.get()));
-  }
 }
 
 SBValueList::~SBValueList() {}
@@ -167,44 +149,21 @@ SBValue SBValueList::GetValueAtIndex(uin
   LLDB_RECORD_METHOD_CONST(lldb::SBValue, SBValueList, GetValueAtIndex,
                            (uint32_t), idx);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  // if (log)
-  //    log->Printf ("SBValueList::GetValueAtIndex (uint32_t idx) idx = %d",
-  //    idx);
 
   SBValue sb_value;
   if (m_opaque_up)
     sb_value = m_opaque_up->GetValueAtIndex(idx);
 
-  if (log) {
-    SBStream sstr;
-    sb_value.GetDescription(sstr);
-    log->Printf("SBValueList::GetValueAtIndex (this.ap=%p, idx=%d) => SBValue "
-                "(this.sp = %p, '%s')",
-                static_cast<void *>(m_opaque_up.get()), idx,
-                static_cast<void *>(sb_value.GetSP().get()), sstr.GetData());
-  }
-
   return LLDB_RECORD_RESULT(sb_value);
 }
 
 uint32_t SBValueList::GetSize() const {
   LLDB_RECORD_METHOD_CONST_NO_ARGS(uint32_t, SBValueList, GetSize);
 
-  Log *log(GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  // if (log)
-  //    log->Printf ("SBValueList::GetSize ()");
-
   uint32_t size = 0;
   if (m_opaque_up)
     size = m_opaque_up->GetSize();
 
-  if (log)
-    log->Printf("SBValueList::GetSize (this.ap=%p) => %d",
-                static_cast<void *>(m_opaque_up.get()), size);
-
   return size;
 }
 

Modified: lldb/trunk/source/API/SBWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBWatchpoint.cpp?rev=355649&r1=355648&r2=355649&view=diff
==============================================================================
--- lldb/trunk/source/API/SBWatchpoint.cpp (original)
+++ lldb/trunk/source/API/SBWatchpoint.cpp Thu Mar  7 14:47:13 2019
@@ -19,7 +19,6 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
-#include "lldb/Utility/Log.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/lldb-defines.h"
 #include "lldb/lldb-types.h"
@@ -32,14 +31,6 @@ SBWatchpoint::SBWatchpoint() { LLDB_RECO
 SBWatchpoint::SBWatchpoint(const lldb::WatchpointSP &wp_sp)
     : m_opaque_wp(wp_sp) {
   LLDB_RECORD_CONSTRUCTOR(SBWatchpoint, (const lldb::WatchpointSP &), wp_sp);
-
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-
-  if (log) {
-    SBStream sstr;
-    GetDescription(sstr, lldb::eDescriptionLevelBrief);
-    LLDB_LOG(log, "watchpoint = {0} ({1})", wp_sp.get(), sstr.GetData());
-  }
 }
 
 SBWatchpoint::SBWatchpoint(const SBWatchpoint &rhs)
@@ -60,22 +51,12 @@ SBWatchpoint::~SBWatchpoint() {}
 watch_id_t SBWatchpoint::GetID() {
   LLDB_RECORD_METHOD_NO_ARGS(lldb::watch_id_t, SBWatchpoint, GetID);
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
 
   watch_id_t watch_id = LLDB_INVALID_WATCH_ID;
   lldb::WatchpointSP watchpoint_sp(GetSP());
   if (watchpoint_sp)
     watch_id = watchpoint_sp->GetID();
 
-  if (log) {
-    if (watch_id == LLDB_INVALID_WATCH_ID)
-      log->Printf("SBWatchpoint(%p)::GetID () => LLDB_INVALID_WATCH_ID",
-                  static_cast<void *>(watchpoint_sp.get()));
-    else
-      log->Printf("SBWatchpoint(%p)::GetID () => %u",
-                  static_cast<void *>(watchpoint_sp.get()), watch_id);
-  }
-
   return watch_id;
 }
 
@@ -184,11 +165,6 @@ uint32_t SBWatchpoint::GetHitCount() {
     count = watchpoint_sp->GetHitCount();
   }
 
-  Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
-  if (log)
-    log->Printf("SBWatchpoint(%p)::GetHitCount () => %u",
-                static_cast<void *>(watchpoint_sp.get()), count);
-
   return count;
 }
 




More information about the lldb-commits mailing list