Cleaned up the API logging a lot more to reduce redundant information and 
keep the file size a bit smaller.

Exposed SBValue::GetExpressionPath() so SBValue users can get an expression
path for their values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117851 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/API/SBFunction.cpp b/source/API/SBFunction.cpp
index 2efd37c..34f879a 100644
--- a/source/API/SBFunction.cpp
+++ b/source/API/SBFunction.cpp
@@ -30,16 +30,6 @@
 SBFunction::SBFunction (lldb_private::Function *lldb_object_ptr) :
     m_opaque_ptr (lldb_object_ptr)
 {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
-
-    if (log)
-    {
-        SBStream sstr;
-        GetDescription (sstr);
-        log->Printf ("SBFunction::SBFunction (lldb_object_ptr=%p) => this.obj = %p ('%s')", lldb_object_ptr, 
-                     m_opaque_ptr, sstr.GetData());
-                     
-    }
 }
 
 SBFunction::~SBFunction ()
@@ -56,30 +46,36 @@
 const char *
 SBFunction::GetName() const
 {
-    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
-
-    //if (log)
-    //    log->Printf ("SBFunction::GetName ()"); 
-
+    const char *cstr = NULL;
     if (m_opaque_ptr)
-    {
-        if (log)
-            log->Printf ("SBFunction::GetName (this.obj=%p) => '%s'", m_opaque_ptr,
-                         m_opaque_ptr->GetMangled().GetName().AsCString());
-        return m_opaque_ptr->GetMangled().GetName().AsCString();
-    }
+        cstr = m_opaque_ptr->GetMangled().GetName().AsCString();
 
+    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
     if (log)
-        log->Printf ("SBFunction::GetName (this.obj=%p) => NULL", m_opaque_ptr);
-    return NULL;
+    {
+        if (cstr)
+            log->Printf ("SBFunction(%p)::GetName () => \"%s\"", m_opaque_ptr, cstr);
+        else
+            log->Printf ("SBFunction(%p)::GetName () => NULL", m_opaque_ptr);
+    }
+    return cstr;
 }
 
 const char *
 SBFunction::GetMangledName () const
 {
+    const char *cstr = NULL;
     if (m_opaque_ptr)
-        return m_opaque_ptr->GetMangled().GetMangledName().AsCString();
-    return NULL;
+        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\"", m_opaque_ptr, cstr);
+        else
+            log->Printf ("SBFunction(%p)::GetMangledName () => NULL", m_opaque_ptr);
+    }
+    return cstr;
 }
 
 bool