[Lldb-commits] [lldb] r117641 - in /lldb/trunk: include/lldb/API/ include/lldb/Symbol/ lldb.xcodeproj/ source/API/ source/Core/ source/Plugins/SymbolFile/DWARF/ source/Symbol/ source/Target/

Greg Clayton gclayton at apple.com
Thu Oct 28 21:59:35 PDT 2010


Author: gclayton
Date: Thu Oct 28 23:59:35 2010
New Revision: 117641

URL: http://llvm.org/viewvc/llvm-project?rev=117641&view=rev
Log:
Modified the lldb_private::TypeList to use a std::multimap for quicker lookup
by type ID (the most common type of type lookup).

Changed the API logging a bit to always show the objects in the OBJECT(POINTER)
format so it will be easy to locate all instances of an object or references
to it when looking at logs.


Modified:
    lldb/trunk/include/lldb/API/SBFileSpec.h
    lldb/trunk/include/lldb/API/SBListener.h
    lldb/trunk/include/lldb/Symbol/TypeList.h
    lldb/trunk/lldb.xcodeproj/project.pbxproj
    lldb/trunk/source/API/SBBroadcaster.cpp
    lldb/trunk/source/API/SBCommandInterpreter.cpp
    lldb/trunk/source/API/SBDebugger.cpp
    lldb/trunk/source/API/SBEvent.cpp
    lldb/trunk/source/API/SBFileSpec.cpp
    lldb/trunk/source/API/SBListener.cpp
    lldb/trunk/source/API/SBProcess.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/API/SBThread.cpp
    lldb/trunk/source/API/SBValue.cpp
    lldb/trunk/source/API/SBValueList.cpp
    lldb/trunk/source/Core/ValueObject.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Symbol/TypeList.cpp
    lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/include/lldb/API/SBFileSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBFileSpec.h?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBFileSpec.h (original)
+++ lldb/trunk/include/lldb/API/SBFileSpec.h Thu Oct 28 23:59:35 2010
@@ -54,9 +54,6 @@
     ResolvePath (const char *src_path, char *dst_path, size_t dst_len);
 
     bool
-    GetDescription (lldb::SBStream &description);
-
-    bool
     GetDescription (lldb::SBStream &description) const;
 
 private:

Modified: lldb/trunk/include/lldb/API/SBListener.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBListener.h?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBListener.h (original)
+++ lldb/trunk/include/lldb/API/SBListener.h Thu Oct 28 23:59:35 2010
@@ -17,11 +17,6 @@
 class SBListener
 {
 public:
-    friend class SBBroadcaster;
-    friend class SBCommandInterpreter;
-    friend class SBDebugger;
-    friend class SBTarget;
-
     SBListener (const char *name);
 
     SBListener (lldb_private::Listener &listener);
@@ -91,6 +86,10 @@
     HandleBroadcastEvent (const lldb::SBEvent &event);
 
 private:
+    friend class SBBroadcaster;
+    friend class SBCommandInterpreter;
+    friend class SBDebugger;
+    friend class SBTarget;
 
 #ifndef SWIG
 

Modified: lldb/trunk/include/lldb/Symbol/TypeList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/TypeList.h?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/TypeList.h (original)
+++ lldb/trunk/include/lldb/Symbol/TypeList.h Thu Oct 28 23:59:35 2010
@@ -13,7 +13,7 @@
 #include "lldb/lldb-private.h"
 #include "lldb/Symbol/ClangASTContext.h"
 #include "lldb/Symbol/Type.h"
-#include <vector>
+#include <map>
 
 namespace lldb_private {
 
@@ -40,8 +40,11 @@
     TypeList
     FindTypes(const ConstString &name);
 
-    lldb::TypeSP
-    InsertUnique(lldb::TypeSP& type);
+    void
+    Insert (lldb::TypeSP& type);
+
+    bool
+    InsertUnique (lldb::TypeSP& type);
 
     uint32_t
     GetSize() const;
@@ -70,7 +73,7 @@
     CreateClangRValueReferenceType (Type *type);
 
 private:
-    typedef std::vector<lldb::TypeSP> collection;
+    typedef std::multimap<lldb::user_id_t, lldb::TypeSP> collection;
     typedef collection::iterator iterator;
     typedef collection::const_iterator const_iterator;
     ClangASTContext m_ast; ///< The type abtract syntax tree.

Modified: lldb/trunk/lldb.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lldb.xcodeproj/project.pbxproj?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/lldb.xcodeproj/project.pbxproj (original)
+++ lldb/trunk/lldb.xcodeproj/project.pbxproj Thu Oct 28 23:59:35 2010
@@ -2501,6 +2501,7 @@
 			isa = PBXProject;
 			buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "lldb" */;
 			compatibilityVersion = "Xcode 3.1";
+			developmentRegion = English;
 			hasScannedForEncodings = 1;
 			knownRegions = (
 				en,

Modified: lldb/trunk/source/API/SBBroadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBroadcaster.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBroadcaster.cpp (original)
+++ lldb/trunk/source/API/SBBroadcaster.cpp Thu Oct 28 23:59:35 2010
@@ -26,7 +26,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
 
     if (log)
-        log->Printf ("SBBroadcastetr::SBBroadcaster () => this = %p", this);
+        log->Printf ("SBBroadcastetr::SBBroadcaster () => SBBroadcaster(%p)", this);
 }
 
 
@@ -37,8 +37,8 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
 
     if (log)
-        log->Printf ("SBBroadcaster::SBBroadcaster (name='%s') => this = %p (m_opaque = %p)",
-                     name, this, m_opaque);
+        log->Printf ("SBBroadcaster::SBBroadcaster (name='%s') => SBBroadcaster(%p)",
+                     name, m_opaque);
 }
 
 SBBroadcaster::SBBroadcaster (lldb_private::Broadcaster *broadcaster, bool owns) :
@@ -48,8 +48,8 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE);
 
     if (log)
-        log->Printf ("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns='%s') "
-                     " => this = %p (m_opaque = %p)", broadcaster, (owns ? "true" : "false"), this, m_opaque);
+        log->Printf ("SBBroadcaster::SBBroadcaster (broadcaster=%p, bool owns=%i) "
+                     " => SBBroadcaster(%p)", broadcaster, owns, m_opaque);
 }
 
 SBBroadcaster::~SBBroadcaster()
@@ -63,7 +63,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBBroadcaster::BroadcastEventByType (%d, %s)", event_type, (unique ? "true" : "false"));
+        log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (event_type=0x%8.8x, unique=%i)", m_opaque, event_type, unique);
 
     if (m_opaque == NULL)
         return;
@@ -77,6 +77,11 @@
 void
 SBBroadcaster::BroadcastEvent (const SBEvent &event, bool unique)
 {
+    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+
+    if (log)
+        log->Printf ("SBBroadcaster(%p)::BroadcastEventByType (SBEvent(%p), unique=%i)", m_opaque, event.get(), unique);
+
     if (m_opaque == NULL)
         return;
 
@@ -90,6 +95,9 @@
 void
 SBBroadcaster::AddInitialEventsToListener (const SBListener &listener, uint32_t requested_events)
 {
+    Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
+    if (log)
+        log->Printf ("SBBroadcaster(%p)::AddInitialEventsToListener (SBListener(%p), event_mask=0x%8.8x)", m_opaque, listener.get(), requested_events);
     if (m_opaque)
         m_opaque->AddInitialEventsToListener (listener.get(), requested_events);
 }

Modified: lldb/trunk/source/API/SBCommandInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandInterpreter.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandInterpreter.cpp (original)
+++ lldb/trunk/source/API/SBCommandInterpreter.cpp Thu Oct 28 23:59:35 2010
@@ -93,7 +93,7 @@
     {
         SBStream sstr;
         result.GetDescription (sstr);
-        log->Printf ("SBCommandInterpreter::HandleCommand (...'%s'...) => SBCommandReturnObject: '%s'", 
+        log->Printf ("SBCommandInterpreter::HandleCommand ('%s') => SBCommandReturnObject: '%s'", 
                      command_line, sstr.GetData());
     }
 

Modified: lldb/trunk/source/API/SBDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBDebugger.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBDebugger.cpp (original)
+++ lldb/trunk/source/API/SBDebugger.cpp Thu Oct 28 23:59:35 2010
@@ -57,7 +57,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBDebugger::Clear ()");
+        log->Printf ("SBDebugger(%p)::Clear ()", m_opaque_sp.get());
 
     m_opaque_sp.reset();
 }
@@ -67,9 +67,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBDebugger::Create ()");
-
     SBDebugger debugger;
     debugger.reset(Debugger::CreateInstance());
 
@@ -77,7 +74,7 @@
     {
         SBStream sstr;
         debugger.GetDescription (sstr);
-        log->Printf ("SBDebugger::Create () => SBDebugger (this.sp = %p, '%s')", debugger.m_opaque_sp.get(), sstr.GetData());
+        log->Printf ("SBDebugger::Create () => SBDebugger(%p): %s", debugger.m_opaque_sp.get(), sstr.GetData());
     }
 
     return debugger;
@@ -121,7 +118,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBDebugger::SetInputFileHandle (this.sp=%p, fh=%p, transfer_ownership='%s')", m_opaque_sp.get(),
+        log->Printf ("SBDebugger(%p)::SetInputFileHandle (fh=%p, transfer_ownership='%s')", m_opaque_sp.get(),
                      fh, (transfer_ownership ? "true" : "false"));
 
     if (m_opaque_sp)
@@ -135,7 +132,7 @@
 
 
     if (log)
-        log->Printf ("SBDebugger::SetOutputFileHandle (this.sp=%p, fh=%p, transfer_ownership='%s')", m_opaque_sp.get(),
+        log->Printf ("SBDebugger(%p)::SetOutputFileHandle (fh=%p, transfer_ownership='%s')", m_opaque_sp.get(),
                      fh, (transfer_ownership ? "true" : "false"));
 
     if (m_opaque_sp)
@@ -149,7 +146,7 @@
 
 
     if (log)
-        log->Printf ("SBDebugger::SetErrorFileHandle (this.sp=%p, fh=%p, transfer_ownership='%s')", m_opaque_sp.get(),
+        log->Printf ("SBDebugger(%p)::SetErrorFileHandle (fh=%p, transfer_ownership='%s')", m_opaque_sp.get(),
                      fh, (transfer_ownership ? "true" : "false"));
 
     if (m_opaque_sp)
@@ -190,7 +187,7 @@
         sb_interpreter.reset (&m_opaque_sp->GetCommandInterpreter());
 
     if (log)
-        log->Printf ("SBDebugger::GetCommandInterpreter (this.sp=%p) => SBCommandInterpreter (this.obj=%p)", 
+        log->Printf ("SBDebugger(%p)::GetCommandInterpreter () => SBCommandInterpreter(%p)", 
                      m_opaque_sp.get(), sb_interpreter.get());
 
     return sb_interpreter;
@@ -238,7 +235,7 @@
         sb_listener.reset(&m_opaque_sp->GetListener(), false);
 
     if (log)
-        log->Printf ("SBDebugger::GetListener (this.sp=%p) => SBListener (this.obj=%p)", m_opaque_sp.get(),
+        log->Printf ("SBDebugger(%p)::GetListener () => SBListener(%p)", m_opaque_sp.get(),
                      sb_listener.get());
 
     return sb_listener;
@@ -464,10 +461,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBDebugger::CreateTargetWithFileAndArch (this.sp=%p, filename='%s', arcname='%s')", 
-    //                 m_opaque_sp.get() filename, archname);
-
     SBTarget target;
     if (m_opaque_sp)
     {
@@ -510,8 +503,8 @@
     {
         SBStream sstr;
         target.GetDescription (sstr, lldb::eDescriptionLevelFull);
-        log->Printf ("SBDebugger::CreateTargetWithFileAndArch (this.sp=%p, filename='%s', arcname='%s') "
-                     "=> SBTarget: this.sp=%p, '%s'", m_opaque_sp.get(), filename, archname, target.get(),
+        log->Printf ("SBDebugger(%p)::CreateTargetWithFileAndArch (filename='%s', arcname='%s') "
+                     "=> SBTarget(%p): %s", m_opaque_sp.get(), filename, archname, target.get(),
                      sstr.GetData());
     }
 
@@ -609,9 +602,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBDebugger::GetSelectedTarget ()");
-
     SBTarget sb_target;
     if (m_opaque_sp)
         sb_target.reset(m_opaque_sp->GetTargetList().GetSelectedTarget ());
@@ -620,7 +610,7 @@
     {
         SBStream sstr;
         sb_target.GetDescription (sstr, lldb::eDescriptionLevelBrief);
-        log->Printf ("SBDebugger::GetSelectedTarget (this.sp=%p) => SBTarget: this.sp=%p, '%s'", m_opaque_sp.get(),
+        log->Printf ("SBDebugger(%p)::GetSelectedTarget () => SBTarget(%p): %s", m_opaque_sp.get(),
                      sb_target.get(), sstr.GetData());
     }
 
@@ -633,7 +623,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBDebugger::DispatchInput (this.sp=%p, baton=%p, data='%s', size_t=%d)", m_opaque_sp.get(),
+        log->Printf ("SBDebugger(%p)::DispatchInput (baton=%p, data='%s', size_t=%d)", m_opaque_sp.get(),
                      baton, (const char *) data, (uint32_t) data_len);
 
     if (m_opaque_sp)
@@ -646,7 +636,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBDebugger::PushInputReader (this.sp=%p, reader=%p)", m_opaque_sp.get(), &reader);
+        log->Printf ("SBDebugger(%p)::PushInputReader (SBInputReader(%p))", m_opaque_sp.get(), &reader);
 
     if (m_opaque_sp && reader.IsValid())
     {
@@ -753,7 +743,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
     
     if (log)
-        log->Printf ("SBDebugger::GetPrompt (this.sp=%p) => '%s'", m_opaque_sp.get(), 
+        log->Printf ("SBDebugger(%p)::GetPrompt () => '%s'", m_opaque_sp.get(), 
                      (m_opaque_sp ? m_opaque_sp->GetPrompt() : ""));
 
     if (m_opaque_sp)

Modified: lldb/trunk/source/API/SBEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBEvent.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBEvent.cpp (original)
+++ lldb/trunk/source/API/SBEvent.cpp Thu Oct 28 23:59:35 2010
@@ -37,8 +37,11 @@
 
     if (log)
     {
-        log->Printf ("SBEvent::SBEvent (event_type=%d, cstr='%s', cstr_len=%d)  => this.sp = %p", event_type,
-                     cstr, cstr_len, m_opaque);
+        log->Printf ("SBEvent::SBEvent (event_type=0x%8.8x, cstr='%s', cstr_len=%d) => SBEvent(%p)", 
+                     event_type,
+                     cstr, 
+                     cstr_len, 
+                     m_opaque);
     }
 }
 
@@ -49,7 +52,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBEvent::SBEvent (event_sp=%p) => this.sp = %p", event_sp.get(), m_opaque);
+        log->Printf ("SBEvent::SBEvent (event_sp=%p) => SBEvent(%p)", event_sp.get(), m_opaque);
 }
 
 SBEvent::~SBEvent()
@@ -70,16 +73,13 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBEvent::GetType ()");
-
     const Event *lldb_event = get();
     uint32_t event_type = 0;
     if (lldb_event)
         event_type = lldb_event->GetType();
 
     if (log)
-        log->Printf ("SBEvent::GetType (this.sp=%p) => %d", m_opaque, event_type);
+        log->Printf ("SBEvent(%p)::GetType () => 0x%8.8x", get(), event_type);
 
     return event_type;
 }
@@ -111,17 +111,16 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    if (log)
-        log->Printf ("SBEvent::BroadcasterMatchesRef (broacaster) broadcaster = %p", &broadcaster);
-
     Event *lldb_event = get();
     bool success = false;
     if (lldb_event)
         success = lldb_event->BroadcasterIs (broadcaster.get());
 
     if (log)
-        log->Printf ("SBEvent::BroadcasterMathesRef (this.sp=%p, broadcaster.obj=%p) => %s", m_opaque, 
-                     broadcaster.get(), (success ? "true" : "false"));
+        log->Printf ("SBEvent(%p)::BroadcasterMathesRef (broadcaster.ptr=%p) => %s", 
+                     get(),
+                     broadcaster.get(),
+                     success ? "true" : "false");
 
     return success;
 }
@@ -182,7 +181,8 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("GetCStringFromEvent (event.sp=%p) => %s", event.m_opaque, 
+        log->Printf ("SBEvent(%p)::GetCStringFromEvent () => '%s'", 
+                     event.get(), 
                      reinterpret_cast<const char *>(EventDataBytes::GetBytesFromEvent (event.get())));
 
     return reinterpret_cast<const char *>(EventDataBytes::GetBytesFromEvent (event.get()));
@@ -192,7 +192,7 @@
 bool
 SBEvent::GetDescription (SBStream &description)
 {
-    if (m_opaque)
+    if (get())
     {
         description.ref();
         m_opaque->Dump (description.get());
@@ -206,7 +206,7 @@
 bool
 SBEvent::GetDescription (SBStream &description) const
 {
-    if (m_opaque)
+    if (get())
     {
         description.ref();
         m_opaque->Dump (description.get());

Modified: lldb/trunk/source/API/SBFileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBFileSpec.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBFileSpec.cpp (original)
+++ lldb/trunk/source/API/SBFileSpec.cpp Thu Oct 28 23:59:35 2010
@@ -34,7 +34,7 @@
     {
         SBStream sstr;
         GetDescription (sstr);
-        log->Printf ("SBFileSpec::SBFileSpec (const SBFileSpec rhs.ap=%p) => this.ap = %p ('%s')",
+        log->Printf ("SBFileSpec::SBFileSpec (const SBFileSpec rhs.ap=%p) => SBFileSpec(%p) ('%s')",
                      rhs.m_opaque_ap.get(), m_opaque_ap.get(), sstr.GetData());
     }
 }
@@ -51,8 +51,8 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBFileSpec::SBFileSpec (path='%s', resolve='%s') => this.ap = %p", path, 
-                     (resolve ? "true" : "false"), m_opaque_ap.get());
+        log->Printf ("SBFileSpec::SBFileSpec (path='%s', resolve=%i) => SBFileSpec(%p)", path, 
+                     resolve, m_opaque_ap.get());
 }
 
 SBFileSpec::~SBFileSpec ()
@@ -81,15 +81,12 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBFileSpec::Exists (this.ap=%p)", m_opaque_ap.get());
-
     bool result = false;
     if (m_opaque_ap.get())
         result = m_opaque_ap->Exists();
 
     if (log)
-        log->Printf ("SBFileSpec::Exists (this.ap=%p) => %s", m_opaque_ap.get(), (result ? "true" : "false"));
+        log->Printf ("SBFileSpec(%p)::Exists () => %s", m_opaque_ap.get(), (result ? "true" : "false"));
 
     return result;
 }
@@ -113,20 +110,17 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBFileSpec::GetFilename (this.ap=%p)", m_opaque_ap.get());
-
     if (m_opaque_ap.get())
     {
         if (log)
-            log->Printf ("SBFileSpec::GetFilename (this.ap=%p) => %s", m_opaque_ap.get(), 
+            log->Printf ("SBFileSpec(%p)::GetFilename () => %s", m_opaque_ap.get(), 
                          m_opaque_ap->GetFilename().AsCString());
 
         return m_opaque_ap->GetFilename().AsCString();
     }
 
     if (log)
-        log->Printf ("SBFileSpec::GetFilename (this.ap=%p) => NULL", m_opaque_ap.get());
+        log->Printf ("SBFileSpec(%p)::GetFilename () => NULL", m_opaque_ap.get());
 
     return NULL;
 }
@@ -144,21 +138,18 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBFileSpec::GetPath (dst_path, dst_len)");
-
     uint32_t result;
     if (m_opaque_ap.get())
     {
         result = m_opaque_ap->GetPath (dst_path, dst_len);
         if (log)
-            log->Printf ("SBFileSpec::GetPath (this.ap=%p, dst_path, dst_len) => dst_path='%s', dst_len='%d', "
+            log->Printf ("SBFileSpec(%p)::GetPath (dst_path, dst_len) => dst_path='%s', dst_len='%d', "
                          "result='%d'", m_opaque_ap.get(), dst_path, (uint32_t) dst_len, result);
         return result;
     }
 
     if (log)
-        log->Printf ("SBFileSpec::GetPath (this.ap=%p, dst_path, dst_len) => NULL (0)", m_opaque_ap.get());
+        log->Printf ("SBFileSpec(%p)::GetPath (dst_path, dst_len) => NULL (0)", m_opaque_ap.get());
 
     if (dst_path && dst_len)
         *dst_path = '\0';
@@ -202,26 +193,6 @@
 }
 
 bool
-SBFileSpec::GetDescription (SBStream &description)
-{
-    if (m_opaque_ap.get())
-    {
-        const char *filename = GetFilename();
-        const char *dir_name = GetDirectory();
-        if (!filename && !dir_name)
-            description.Printf ("No value");
-        else if (!dir_name)
-            description.Printf ("%s", filename);
-        else
-            description.Printf ("%s/%s", dir_name, filename);
-    }
-    else
-        description.Printf ("No value");
-    
-    return true;
-}
-
-bool
 SBFileSpec::GetDescription (SBStream &description) const
 {
     if (m_opaque_ap.get())

Modified: lldb/trunk/source/API/SBListener.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBListener.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBListener.cpp (original)
+++ lldb/trunk/source/API/SBListener.cpp Thu Oct 28 23:59:35 2010
@@ -87,12 +87,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //{
-    //    log->Printf ("SBListener::StartListeningForEvents (const SBBroadcaster &broadcaster, uint32_t event_mask)"
-    //                 " &broadcaster = %p, event_mask = %d", &broadcaster, event_mask);
-    //}
-
     uint32_t ret_value = 0;
     if (m_opaque_ptr && broadcaster.IsValid())
     {
@@ -100,7 +94,7 @@
     }
     
     if (log)
-        log->Printf ("SBListener::StartListeneingForEvents (this.obj=%p, broadcaster.obj=%p, event_mask=%d) => %d", 
+        log->Printf ("SBListener(%p)::StartListeneingForEvents (SBBroadcaster(%p), event_mask=0x%8.8x) => %d", 
                      m_opaque_ptr, broadcaster.get(), event_mask, ret_value);
 
     return ret_value;
@@ -142,7 +136,7 @@
             event.reset (event_sp);
             Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
             if (log)
-                log->Printf ("SBListener::WaitForEvent (this.obj=%p, num_seconds=%d, event.sp=%p) => 'true'",
+                log->Printf ("SBListener(%p)::WaitForEvent (num_seconds=%d, SBEvent(%p)) => 1",
                              m_opaque_ptr, num_seconds, event.get());
             return true;
         }
@@ -150,7 +144,7 @@
 
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
     if (log)
-        log->Printf ("SBListener::WaitForEvent (this.obj=%p, num_seconds=%d, event.sp=%p) => 'false'",
+        log->Printf ("SBListener(%p)::WaitForEvent (num_seconds=%d, SBEvent(%p)) => 0",
                      m_opaque_ptr, num_seconds, event.get());
 
     event.reset (NULL);

Modified: lldb/trunk/source/API/SBProcess.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBProcess.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBProcess.cpp (original)
+++ lldb/trunk/source/API/SBProcess.cpp Thu Oct 28 23:59:35 2010
@@ -56,7 +56,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBProcess::SBProcess (rhs.sp=%p) => this.sp = %p", rhs.m_opaque_sp.get(), m_opaque_sp.get());
+        log->Printf ("SBProcess::SBProcess(%p)", rhs.m_opaque_sp.get());
 }
 
 
@@ -66,7 +66,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBProcess::SBProcess (process_sp=%p) => this.sp = %p", process_sp.get(), m_opaque_sp.get());
+        log->Printf ("SBProcess::SBProcess(%p)", process_sp.get());
 }
 
 //----------------------------------------------------------------------
@@ -101,9 +101,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetNumThreads ()");
-
     uint32_t num_threads = 0;
     if (m_opaque_sp)
     {
@@ -112,7 +109,7 @@
     }
 
     if (log)
-        log->Printf ("SBProcess::GetNumThreads (this.sp=%p) => %d", m_opaque_sp.get(), num_threads);
+        log->Printf ("SBProcess(%p)::GetNumThreads () => %d", m_opaque_sp.get(), num_threads);
 
     return num_threads;
 }
@@ -122,19 +119,13 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetSelectedThread ()");
-
     SBThread sb_thread;
     if (m_opaque_sp)
         sb_thread.SetThread (m_opaque_sp->GetThreadList().GetSelectedThread());
 
     if (log)
     {
-        SBStream sstr;
-        sb_thread.GetDescription (sstr);
-        log->Printf ("SBProcess::GetSelectedThread (this.sp=%p) => SBThread : this = %p, '%s'", m_opaque_sp.get(),
-                     &sb_thread, sstr.GetData());
+        log->Printf ("SBProcess(%p)::GetSelectedThread () => SBThread(%p)", m_opaque_sp.get(), sb_thread.GetLLDBObjectPtr());
     }
 
     return sb_thread;
@@ -145,16 +136,12 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetTarget ()");
-
     SBTarget sb_target;
     if (m_opaque_sp)
         sb_target = m_opaque_sp->GetTarget().GetSP();
     
     if (log)
-        log->Printf ("SBProcess::GetTarget (this.sp=%p) => SBTarget (this.sp = %p)", m_opaque_sp.get(),
-                     sb_target.get());
+        log->Printf ("SBProcess(%p)::GetTarget () => SBTarget(%p)", m_opaque_sp.get(), sb_target.get());
 
     return sb_target;
 }
@@ -165,9 +152,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::PutSTDIN (%s, %d)", src, src_len);
-
     size_t ret_val = 0;
     if (m_opaque_sp != NULL)
     {
@@ -176,8 +160,11 @@
     }
     
     if (log)
-        log->Printf ("SBProcess::PutSTDIN (this.sp=%p, src='%s', src_len=%d) => %d", m_opaque_sp.get(), src, 
-                     (uint32_t) src_len, ret_val);
+        log->Printf ("SBProcess(%p)::PutSTDIN (src='%s', src_len=%d) => %d", 
+                     m_opaque_sp.get(), 
+                     src, 
+                     (uint32_t) src_len, 
+                     ret_val);
 
     return ret_val;
 }
@@ -187,9 +174,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetSTDOUT (char *dst, size_t dst_Len)");
-
     size_t ret_val = 0;
     if (m_opaque_sp != NULL)
     {
@@ -198,8 +182,12 @@
     }
     
     if (log)
-        log->Printf ("SBProcess::GetSTDOUT (this.sp=%p, dst='%s', dst_len=%d) => %d", m_opaque_sp.get(), dst,
-                     (uint32_t) dst_len, (uint32_t) ret_val);
+        log->Printf ("SBProcess(%p)::GetSTDOUT (dst='%.*s', dst_len=%d) => %d", 
+                     m_opaque_sp.get(), 
+                     (uint32_t) dst_len, 
+                     dst,
+                     (uint32_t) dst_len, 
+                     (uint32_t) ret_val);
 
     return ret_val;
 }
@@ -209,9 +197,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetSTDERR (char *dst, size_t dst_len)");
-
     size_t ret_val = 0;
     if (m_opaque_sp != NULL)
     {
@@ -220,8 +205,12 @@
     }
 
     if (log)
-        log->Printf ("SBProcess::GetSTDERR (this.sp=%p, dst='%s', dst_len=%d) => %d", m_opaque_sp.get(), dst,
-                     (uint32_t) dst_len, (uint32_t) ret_val);
+        log->Printf ("SBProcess(%p)::GetSTDERR (dst='%.*s', dst_len=%d) => %d",
+                     m_opaque_sp.get(), 
+                     (uint32_t) dst_len, 
+                     dst,
+                     (uint32_t) dst_len, 
+                     (uint32_t) ret_val);
 
     return ret_val;
 }
@@ -277,16 +266,13 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::SetSelectedThreadByID (%d)", tid);
-
     bool ret_val = false;
     if (m_opaque_sp != NULL)
         ret_val = m_opaque_sp->GetThreadList().SetSelectedThreadByID (tid);
 
     if (log)
-        log->Printf ("SBProcess::SetSelectedThreadByID (this.sp=%p, tid=%d) => '%s'", m_opaque_sp.get(),
-                     tid, (ret_val ? "true" : "false"));
+        log->Printf ("SBProcess(%p)::SetSelectedThreadByID (tid=%d) => '%s'", 
+                     m_opaque_sp.get(), tid, (ret_val ? "true" : "false"));
 
     return ret_val;
 }
@@ -296,19 +282,14 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetThreadAtIndex (%d)");
-
     SBThread thread;
     if (m_opaque_sp)
         thread.SetThread (m_opaque_sp->GetThreadList().GetThreadAtIndex(index));
 
     if (log)
     {
-        SBStream sstr;
-        thread.GetDescription (sstr);
-        log->Printf ("SBProcess::GetThreadAtIndex (this.sp=%p, index=%d) => SBThread : this.sp = %p, '%s'", 
-                     m_opaque_sp.get(), (uint32_t) index, thread.GetLLDBObjectPtr(), sstr.GetData());
+        log->Printf ("SBProcess(%p)::GetThreadAtIndex (index=%d) => SBThread(%p)",
+                     m_opaque_sp.get(), (uint32_t) index, thread.GetLLDBObjectPtr());
     }
 
     return thread;
@@ -319,15 +300,13 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetState ()");
-
     StateType ret_val = eStateInvalid;
     if (m_opaque_sp != NULL)
         ret_val = m_opaque_sp->GetState();
 
     if (log)
-        log->Printf ("SBProcess::GetState (this.sp=%p) => '%s'", m_opaque_sp.get(),
+        log->Printf ("SBProcess(%p)::GetState () => '%s'", 
+                     m_opaque_sp.get(),
                      lldb_private::StateAsCString (ret_val));
 
     return ret_val;
@@ -357,15 +336,12 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetProcessID ()");
-
     lldb::pid_t ret_val = LLDB_INVALID_PROCESS_ID;
     if (m_opaque_sp)
         ret_val = m_opaque_sp->GetID();
 
     if (log)
-        log->Printf ("SBProcess::GetProcessID (this.sp=%p) => %d", m_opaque_sp.get(), ret_val);
+        log->Printf ("SBProcess(%p)::GetProcessID () => %d", m_opaque_sp.get(), ret_val);
 
     return ret_val;
 }
@@ -375,15 +351,12 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetAddressByteSize()");
-
     uint32_t size = 0;
     if (m_opaque_sp)
         size =  m_opaque_sp->GetAddressByteSize();
 
     if (log)
-        log->Printf ("SBProcess::GetAddressByteSize (this.sp=%p) => %d", m_opaque_sp.get(), size);
+        log->Printf ("SBProcess(%p)::GetAddressByteSize () => %d", m_opaque_sp.get(), size);
 
     return size;
 }
@@ -414,9 +387,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
     
-    //if (log)
-    //    log->Printf ("SBProcess::Continue ()");
-
     SBError sb_error;
     if (IsValid())
     {
@@ -435,8 +405,7 @@
     {
         SBStream sstr;
         sb_error.GetDescription (sstr);
-        log->Printf ("SBProcess::Continue (this.sp=%p) => SBError (this.ap = %p, '%s')", m_opaque_sp.get(), 
-                     sb_error.get(), sstr.GetData());
+        log->Printf ("SBProcess(%p)::Continue () => SBError (%p): %s", m_opaque_sp.get(), sb_error.get(), sstr.GetData());
     }
 
     return sb_error;
@@ -461,9 +430,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::Stop ()");
-
     SBError sb_error;
     if (IsValid())
         sb_error.SetError (m_opaque_sp->Halt());
@@ -474,7 +440,9 @@
     {
         SBStream sstr;
         sb_error.GetDescription (sstr);
-        log->Printf ("SBProcess::Stop (this.sp=%p) => SBError (this.ap = %p, '%s')", m_opaque_sp.get(), sb_error.get(),
+        log->Printf ("SBProcess(%p)::Stop () => SBError (%p): %s", 
+                     m_opaque_sp.get(), 
+                     sb_error.get(),
                      sstr.GetData());
     }
 
@@ -486,9 +454,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::Kill ()");
-
     SBError sb_error;
     if (m_opaque_sp)
         sb_error.SetError (m_opaque_sp->Destroy());
@@ -499,7 +464,9 @@
     {
         SBStream sstr;
         sb_error.GetDescription (sstr);
-        log->Printf ("SBProcess::Kill (this.sp=%p) => SBError (this.ap = %p,'%s')", m_opaque_sp.get(), sb_error.get(),
+        log->Printf ("SBProcess(%p)::Kill () => SBError (%p): %s", 
+                     m_opaque_sp.get(), 
+                     sb_error.get(),
                      sstr.GetData());
     }
 
@@ -574,13 +541,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //{
-    //    SBStream sstr;
-    //    event.GetDescription (sstr);
-    //    log->Printf ("SBProcess::GetStateFromEvent (%s)", sstr.GetData());
-    //}
-    
     StateType ret_val = Process::ProcessEventData::GetStateFromEvent (event.get());
     
     if (log)
@@ -609,13 +569,10 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::GetBroadcaster ()");
-
     SBBroadcaster broadcaster(m_opaque_sp.get(), false);
 
     if (log)
-        log->Printf ("SBProcess::GetBroadcaster (this.sp=%p) => SBBroadcaster (this.obj = %p)",  m_opaque_sp.get(),
+        log->Printf ("SBProcess(%p)::GetBroadcaster () => SBBroadcaster (%p)",  m_opaque_sp.get(),
                      broadcaster.get());
 
     return broadcaster;
@@ -632,9 +589,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBProcess::ReadMemory (%p, %p, %d, sb_error)", addr, dst, dst_len);
-
     size_t bytes_read = 0;
 
     if (IsValid())
@@ -649,8 +603,18 @@
     }
 
     if (log)
-        log->Printf ("SBProcess::ReadMemory (this.sp=%p, addr=%p, dst=%p, dst_len=%d, sb_error.ap=%p) => %d", 
-                     m_opaque_sp.get(), addr, dst, (uint32_t) dst_len, sb_error.get(), (uint32_t) bytes_read);
+    {
+        SBStream sstr;
+        sb_error.GetDescription (sstr);
+        log->Printf ("SBProcess(%p)::ReadMemory (addr=%llx, dst=%p, dst_len=%d, SBError (%p): %s) => %d", 
+                     m_opaque_sp.get(), 
+                     addr, 
+                     dst, 
+                     (uint32_t) dst_len, 
+                     sb_error.get(), 
+                     sstr.GetData(),
+                     (uint32_t) bytes_read);
+    }
 
     return bytes_read;
 }

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Thu Oct 28 23:59:35 2010
@@ -60,8 +60,12 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
     
     if (log)
-        log->Printf ("SBTarget::SBTarget (rhs.sp=%p) => this.sp = %p",
-                     rhs.m_opaque_sp.get(), m_opaque_sp.get());
+    {
+        SBStream sstr;
+        GetDescription (sstr, lldb::eDescriptionLevelBrief);
+        log->Printf ("SBTarget::SBTarget (rhs.sp=%p) => SBTarget(%p): %s",
+                     rhs.m_opaque_sp.get(), m_opaque_sp.get(), sstr.GetData());
+    }
 }
 
 SBTarget::SBTarget(const TargetSP& target_sp) :
@@ -73,7 +77,7 @@
     {
         SBStream sstr;
         GetDescription (sstr, lldb::eDescriptionLevelBrief);
-        log->Printf ("SBTarget::SBTarget (target_sp=%p) => this.sp = %p ('%s')",
+        log->Printf ("SBTarget::SBTarget (target_sp=%p) => SBTarget(%p): '%s'",
                      target_sp.get(), m_opaque_sp.get(), sstr.GetData());
     }
 }
@@ -84,16 +88,13 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBTarget::Assign (this.sp=%p, rhs.sp=%p)", m_opaque_sp.get(), rhs.m_opaque_sp.get());
+        log->Printf ("SBTarget(%p)::Assign (rhs.sp=%p)", m_opaque_sp.get(), rhs.m_opaque_sp.get());
 
     if (this != &rhs)
     {
         m_opaque_sp = rhs.m_opaque_sp;
     }
 
-    //if (log)
-    //    log->Printf ("SBTarget::Assign => SBTarget (this = %p, m_opaque_sp.get() = %p)", this, m_opaque_sp.get());
-
     return *this;
 }
 
@@ -116,9 +117,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::GetProcess ()");
-
     SBProcess sb_process;
     if (m_opaque_sp)
         sb_process.SetProcess (m_opaque_sp->GetProcessSP());
@@ -127,7 +125,7 @@
     {
         SBStream sstr;
         sb_process.GetDescription (sstr);
-        log->Printf ("SBTarget::GetProcess (this.sp=%p) => SBProcess : this.sp = %p, '%s'", m_opaque_sp.get(), 
+        log->Printf ("SBTarget(%p)::GetProcess () => SBProcess(%p): %s", m_opaque_sp.get(), 
                      sb_process.get(), sstr.GetData());
     }
 
@@ -150,9 +148,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::CreateProcess ()");
-
     SBProcess sb_process;
 
     if (m_opaque_sp)
@@ -162,7 +157,7 @@
     {
         SBStream sstr;
         sb_process.GetDescription (sstr);
-        log->Printf ("SBTarget::CreateProcess (this.sp=%p) => SBProcess this.sp = %p, '%s'", m_opaque_sp.get(),
+        log->Printf ("SBTarget(%p)::CreateProcess () => SBProcess(%p): %s", m_opaque_sp.get(),
                      sb_process.get(), sstr.GetData());
     }
 
@@ -183,9 +178,8 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBTarget::LaunchProcess (this.sp=%p, argv=%p, envp=%p, tty='%s', launch_flags=%d, "
-                     "stop_at_entry='%s')",
-                     m_opaque_sp.get(), argv, envp, tty, launch_flags, (stop_at_entry ? "true" : "false"));
+        log->Printf ("SBTarget(%p)::LaunchProcess (argv=%p, envp=%p, tty='%s', launch_flags=%d, stop_at_entry=%i)",
+                     m_opaque_sp.get(), argv, envp, tty, launch_flags, stop_at_entry);
 
     SBError sb_error;    
     SBProcess sb_process = Launch (argv, envp, tty, launch_flags, stop_at_entry, sb_error);
@@ -194,8 +188,8 @@
     {
         SBStream sstr;
         sb_process.GetDescription (sstr);
-        log->Printf ("SBTarget::LaunchProcess (this.sp=%p, ...) => SBProcess : this.sp = %p, '%s'", m_opaque_sp.get(),
-                     sb_process.get(), sstr.GetData());
+        log->Printf ("SBTarget(%p)::LaunchProcess (...) => SBProcess(%p): %s", 
+                     m_opaque_sp.get(), sb_process.get(), sstr.GetData());
     }
 
     return sb_process;
@@ -215,11 +209,10 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBTarget::Launch (this.sp=%p, argv=%p, envp=%p, tty='%s', launch_flags=%d, stop_at_entry=%s, "
-                     "error.ap=%p)",
-                     m_opaque_sp.get(), argv, envp, tty, launch_flags, (stop_at_entry ? "true" : "false"), 
-                     error.get());
-
+    {
+        log->Printf ("SBTarget(%p)::Launch (argv=%p, envp=%p, tty='%s', launch_flags=%d, stop_at_entry=%i, &error (%p))...",
+                     m_opaque_sp.get(), argv, envp, tty, launch_flags, stop_at_entry, error.get());
+    }
     SBProcess sb_process;
     if (m_opaque_sp)
     {
@@ -274,8 +267,8 @@
     {
         SBStream sstr;
         sb_process.GetDescription (sstr);
-        log->Printf ("SBTarget::Launch (this.sp=%p, ...) => SBProceess : this.sp = %p, '%s'", m_opaque_sp.get(), 
-                     sb_process.get(), sstr.GetData());
+        log->Printf ("SBTarget(%p)::Launch (...) => SBProceess(%p): %s", 
+                     m_opaque_sp.get(), sb_process.get(), sstr.GetData());
     }
 
     return sb_process;
@@ -366,9 +359,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::GetExecutable ()");
-
     SBFileSpec exe_file_spec;
     if (m_opaque_sp)
     {
@@ -383,11 +373,11 @@
         {
             SBStream sstr;
             exe_file_spec.GetDescription (sstr);
-            log->Printf ("SBTarget::GetExecutable (this.sp=%p) => SBFileSpec (this.ap = %p, '%s')", m_opaque_sp.get(),
+            log->Printf ("SBTarget(%p)::GetExecutable () => SBFileSpec(%p): %s", m_opaque_sp.get(),
                          exe_file_spec.get(), sstr.GetData());
         }
         else
-            log->Printf ("SBTarget::GetExecutable (this.sp=%p) => SBFileSpec (this.ap = %p, 'Unable to find valid file')",
+            log->Printf ("SBTarget(%p)::GetExecutable () => SBFileSpec (%p): Unable to find valid file",
                          m_opaque_sp.get(), exe_file_spec.get());
     }
 
@@ -439,10 +429,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //   log->Printf ("SBTarget::BreakpointCreateByLocation (const char *file, uint32_t line) file = '%s', line = %d", 
-    //                 file, line);
-
     SBBreakpoint sb_bp;
     if (file != NULL && line != 0)
         sb_bp = BreakpointCreateByLocation (SBFileSpec (file), line);
@@ -451,8 +437,7 @@
     {
         SBStream sstr;
         sb_bp.GetDescription (sstr);
-        log->Printf("SBTarget::BreakpointCreateByLocation (this.sp=%p, file='%s', line=%d) => "
-                    "SBBreakpoint : this.sp = %p, '%s'", m_opaque_sp.get(), file, line, sb_bp.get(), sstr.GetData());
+        log->Printf("SBTarget(%p)::BreakpointCreateByLocation (file='%s', line=%d) => SBBreakpoint(%p): %s", m_opaque_sp.get(), file, line, sb_bp.get(), sstr.GetData());
     }
 
     return sb_bp;
@@ -463,10 +448,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::BreakpointCreateByLocation (const SBFileSpec &sb_file_spec, uint32_t line) "
-    //                 "sb_file_spec (%p), line = %d)", &sb_file_spec, line);
-
     SBBreakpoint sb_bp;
     if (m_opaque_sp.get() && line != 0)
         *sb_bp = m_opaque_sp->CreateBreakpoint (NULL, *sb_file_spec, line, true, false);
@@ -475,8 +456,8 @@
     {
         SBStream sstr;
         sb_bp.GetDescription (sstr);
-        log->Printf ("SBTarget::BreakpointCreateByLocation (this.sp=%p, sb_file_spec.ap=%p, line=%d) => "
-                     "SBBreakpoint : this.sp = %p, '%s'", m_opaque_sp.get(), sb_file_spec.get(), line, sb_bp.get(), 
+        log->Printf ("SBTarget(%p)::BreakpointCreateByLocation (sb_file_spec.ap=%p, line=%d) => "
+                     "SBBreakpoint(%p): %s", m_opaque_sp.get(), sb_file_spec.get(), line, sb_bp.get(), 
                      sstr.GetData());
     }
 
@@ -488,10 +469,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::BreakpointCreateByName (const char *symbol_name, const char *module_name) "
-    //                 "symbol_name = %s, module_name = %s)", symbol_name, module_name);
-
     SBBreakpoint sb_bp;
     if (m_opaque_sp.get() && symbol_name && symbol_name[0])
     {
@@ -510,8 +487,8 @@
     {
         SBStream sstr;
         sb_bp.GetDescription (sstr);
-        log->Printf ("SBTarget::BreakpointCreateByName (this.sp=%p, symbol_name='%s', module_name='%s') => "
-                     "SBBreakpoint : this.sp = %p, '%s'", m_opaque_sp.get(), symbol_name, module_name, sb_bp.get(), 
+        log->Printf ("SBTarget(%p)::BreakpointCreateByName (symbol_name='%s', module_name='%s') => "
+                     "SBBreakpoint(%p): %s", m_opaque_sp.get(), symbol_name, module_name, sb_bp.get(), 
                      sstr.GetData());
     }
 
@@ -523,10 +500,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::BreakpointCreateByRegex (const char *symbol_name_regex, const char *module_name) "
-    //                 "symbol_name_regex = %s, module_name = %s)", symbol_name_regex, module_name);
-
     SBBreakpoint sb_bp;
     if (m_opaque_sp.get() && symbol_name_regex && symbol_name_regex[0])
     {
@@ -548,8 +521,8 @@
     {
         SBStream sstr;
         sb_bp.GetDescription (sstr);
-        log->Printf ("SBTarget::BreakpointCreateByRegex (this.sp=%p, symbol_name_regex='%s', module_name='%s') "
-                     "=> SBBreakpoint : this.sp = %p, '%s'", m_opaque_sp.get(), symbol_name_regex, module_name,
+        log->Printf ("SBTarget(%p)::BreakpointCreateByRegex (symbol_name_regex='%s', module_name='%s') "
+                     "=> SBBreakpoint(%p): %s", m_opaque_sp.get(), symbol_name_regex, module_name,
                      sb_bp.get(), sstr.GetData());
     }
 
@@ -563,9 +536,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::BreakpointCreateByAddress (addr_t address) address = %p", address);
-
     SBBreakpoint sb_bp;
     if (m_opaque_sp.get())
         *sb_bp = m_opaque_sp->CreateBreakpoint (address, false);
@@ -574,8 +544,8 @@
     {
         SBStream sstr;
         sb_bp.GetDescription (sstr);
-        log->Printf ("SBTarget::BreakpointCreateByAddress (this.sp=%p, address=%p) => "
-                     "SBBreakpoint : this.sp = %p, '%s')", m_opaque_sp.get(), address, sb_bp.get(), sstr.GetData());
+        log->Printf ("SBTarget(%p)::BreakpointCreateByAddress (%p, address=%p) => "
+                     "SBBreakpoint(%p): %s", m_opaque_sp.get(), address, sb_bp.get(), sstr.GetData());
     }
 
     return sb_bp;
@@ -586,9 +556,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::FindBreakpointByID (break_id_t bp_id) bp_id = %d", bp_id);
-
     SBBreakpoint sb_breakpoint;
     if (m_opaque_sp && bp_id != LLDB_INVALID_BREAK_ID)
         *sb_breakpoint = m_opaque_sp->GetBreakpointByID (bp_id);
@@ -597,7 +564,7 @@
     {
         SBStream sstr;
         sb_breakpoint.GetDescription (sstr);
-        log->Printf ("SBTarget::FindBreakpointByID (this.sp=%p, bp_id=%d) => SBBreakpoint : this.sp = %p, '%s'", 
+        log->Printf ("SBTarget(%p)::FindBreakpointByID (bp_id=%d) => SBBreakpoint(%p): %s", 
                      m_opaque_sp.get(), (uint32_t) bp_id, sb_breakpoint.get(), sstr.GetData());
     }
 
@@ -626,21 +593,13 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::BreakpointDelete (break_id_t bp_id) bp_id = %d", bp_id);
-
     bool result = false;
     if (m_opaque_sp)
         result = m_opaque_sp->RemoveBreakpointByID (bp_id);
 
     if (log)
     {
-        if (result)
-            log->Printf ("SBTarget::BreakpointDelete (this.sp=%p, bp_id=%d) => 'true'", m_opaque_sp.get(),
-                         (uint32_t) bp_id);
-        else
-            log->Printf ("SBTarget::BreakpointDelete (this.sp=%p, bp_id=%d) => 'false'", m_opaque_sp.get(), 
-                         (uint32_t) bp_id);
+        log->Printf ("SBTarget(%p)::BreakpointDelete (bp_id=%d) => %i", m_opaque_sp.get(), (uint32_t) bp_id, result);
     }
 
     return result;
@@ -685,15 +644,12 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::GetNumModules ()");
-
     uint32_t num = 0;
     if (m_opaque_sp)
         num =  m_opaque_sp->GetImages().GetSize();
 
     if (log)
-        log->Printf ("SBTarget::GetNumModules (this.sp=%p) => %d", m_opaque_sp.get(), num);
+        log->Printf ("SBTarget(%p)::GetNumModules () => %d", m_opaque_sp.get(), num);
 
     return num;
 }
@@ -704,7 +660,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBTarget::Clear (this.sp=%p)", m_opaque_sp.get());
+        log->Printf ("SBTarget(%p)::Clear ()", m_opaque_sp.get());
 
     m_opaque_sp.reset();
 }
@@ -724,9 +680,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::GetModuleAtIndex (uint32_t idx) idx = %d", idx);
-
     SBModule sb_module;
     if (m_opaque_sp)
         sb_module.SetModule(m_opaque_sp->GetImages().GetModuleAtIndex(idx));
@@ -735,7 +688,7 @@
     {
         SBStream sstr;
         sb_module.GetDescription (sstr);
-        log->Printf ("SBTarget::GetModuleAtIndex (this.sp=%p, idx=%d) => SBModule: this = %p, '%s'", 
+        log->Printf ("SBTarget(%p)::GetModuleAtIndex (idx=%d) => SBModule(%p): %s", 
                      m_opaque_sp.get(), idx, sb_module.get(), sstr.GetData());
     }
 
@@ -748,13 +701,10 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBTarget::GetBroadcaster ()");
-
     SBBroadcaster broadcaster(m_opaque_sp.get(), false);
     
     if (log)
-        log->Printf ("SBTarget::GetBroadcaster (this.sp=%p) => SBBroadcaster (this.obj = %p)", 
+        log->Printf ("SBTarget(%p)::GetBroadcaster () => SBBroadcaster(%p)", 
                      m_opaque_sp.get(), broadcaster.get());
 
     return broadcaster;

Modified: lldb/trunk/source/API/SBThread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBThread.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBThread.cpp (original)
+++ lldb/trunk/source/API/SBThread.cpp Thu Oct 28 23:59:35 2010
@@ -55,7 +55,7 @@
     {
         SBStream sstr;
         GetDescription (sstr);
-        log->Printf ("SBThread::SBThread (lldb_object_sp=%p) => this.sp = %p (%s)",
+        log->Printf ("SBThread::SBThread (lldb_object_sp=%p) => SBThread(%p) :%s",
                      lldb_object_sp.get(), m_opaque_sp.get(), sstr.GetData());
     }
 }
@@ -67,7 +67,7 @@
     m_opaque_sp = rhs.m_opaque_sp;
 
     if (log)
-        log->Printf ("SBThread::SBThread (rhs.sp=%p) => this.sp = %p",
+        log->Printf ("SBThread::SBThread (rhs.sp=%p) => SBThread(%p)",
                      rhs.m_opaque_sp.get(), m_opaque_sp.get());
 
 }
@@ -97,9 +97,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBThread::GetStopReason ()");
-
     StopReason reason = eStopReasonInvalid;
     if (m_opaque_sp)
     {
@@ -109,7 +106,7 @@
     }
 
     if (log)
-        log->Printf ("SBThread::GetStopReason (this.sp=%p) => '%s'", m_opaque_sp.get(), 
+        log->Printf ("SBThread(%p)::GetStopReason () => '%s'", m_opaque_sp.get(), 
                      Thread::StopReasonAsCString (reason));
 
     return reason;
@@ -120,9 +117,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBThread::GetStopDescription (char *dst, size_t dst_len)");
-
     if (m_opaque_sp)
     {
         StopInfoSP stop_info_sp = m_opaque_sp->GetStopInfo ();
@@ -132,7 +126,7 @@
             if (stop_desc)
             {
                 if (log)
-                    log->Printf ("SBThread::GetStopDescription (this.sp=%p, dst, dst_len) => '%s'", 
+                    log->Printf ("SBThread(%p)::GetStopDescription (dst, dst_len) => '%s'", 
                                  m_opaque_sp.get(), stop_desc);
                 if (dst)
                     return ::snprintf (dst, dst_len, "%s", stop_desc);
@@ -199,7 +193,7 @@
                 if (stop_desc && stop_desc[0])
                 {
                     if (log)
-                        log->Printf ("SBThread::GetStopDescription (this.sp=%p, dst, dst_len) => '%s'", 
+                        log->Printf ("SBThread(%p)::GetStopDescription (dst, dst_len) => '%s'", 
                                      m_opaque_sp.get(), stop_desc);
 
                     if (dst)
@@ -300,7 +294,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBThread::StepOver (this.sp=%p, stop_other_threads='%s')", m_opaque_sp.get(), 
+        log->Printf ("SBThread(%p)::StepOver (stop_other_threads='%s')", m_opaque_sp.get(), 
                      Thread::RunModeAsCString (stop_other_threads));
 
     if (m_opaque_sp)
@@ -349,7 +343,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBThread::StepInto (this.sp=%p, stop_other_threads='%s')", m_opaque_sp.get(),
+        log->Printf ("SBThread(%p)::StepInto (stop_other_threads='%s')", m_opaque_sp.get(),
                      Thread::RunModeAsCString (stop_other_threads));
 
     if (m_opaque_sp)
@@ -424,8 +418,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBThread::StepInstruction (this.sp=%p, step_over=%s)", m_opaque_sp.get(),
-                     (step_over ? "true" : "false"));
+        log->Printf ("SBThread(%p)::StepInstruction (step_over=%i)", m_opaque_sp.get(), step_over);
 
     if (m_opaque_sp)
     {
@@ -449,7 +442,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBThread::RunToAddress (this.sp=%p, addr=%p)", m_opaque_sp.get(), addr);
+        log->Printf ("SBThread(%p)::RunToAddress (addr=0x%llx)", m_opaque_sp.get(), addr);
 
     if (m_opaque_sp)
     {
@@ -478,9 +471,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBThread::GetProcess ()");
-
     SBProcess process;
     if (m_opaque_sp)
     {
@@ -504,9 +494,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBThread::GetNumFrames ()");
-
     uint32_t num_frames = 0;
     if (m_opaque_sp)
         num_frames = m_opaque_sp->GetStackFrameCount();
@@ -522,9 +509,6 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBThread::GetFrameAtIndex (uint32_t idx) idx = %d", idx);
-
     SBFrame sb_frame;
     if (m_opaque_sp)
         sb_frame.SetFrame (m_opaque_sp->GetStackFrameAtIndex (idx));
@@ -533,7 +517,7 @@
     {
         SBStream sstr;
         sb_frame.GetDescription (sstr);
-        log->Printf ("SBThread::GetFrameAtIndex (this.sp=%p, idx=%d) => SBFrame.sp : this = %p, '%s'", 
+        log->Printf ("SBThread(%p)::GetFrameAtIndex (idx=%d) => SBFrame.sp : this = %p, '%s'", 
                      m_opaque_sp.get(), idx, sb_frame.get(), sstr.GetData());
     }
 
@@ -546,7 +530,7 @@
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
     if (log)
-        log->Printf ("SBThread::operator= (this.sp=%p, rhs.sp=%p)", m_opaque_sp.get(), rhs.m_opaque_sp.get());
+        log->Printf ("SBThread(%p)::operator= (rhs.sp=%p)", m_opaque_sp.get(), rhs.m_opaque_sp.get());
                      
     m_opaque_sp = rhs.m_opaque_sp;
     return *this;

Modified: lldb/trunk/source/API/SBValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValue.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValue.cpp (original)
+++ lldb/trunk/source/API/SBValue.cpp Thu Oct 28 23:59:35 2010
@@ -48,8 +48,7 @@
     {
         SBStream sstr;
         GetDescription (sstr);
-        log->Printf ("SBValue::SBValue (value_sp=%p) => this.sp = %p (%s)",
-                     value_sp.get(), m_opaque_sp.get(), sstr.GetData());
+        log->Printf ("SBValue::SBValue (%p) => (%s)", m_opaque_sp.get(), sstr.GetData());
     }
 }
 
@@ -79,23 +78,15 @@
 {
     Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API);
 
-    //if (log)
-    //    log->Printf ("SBValue::GetName ()");
+    if (log)
+        log->Printf ("SBValue::GetName () ptr=%p => '%s'", 
+                     m_opaque_sp.get(),
+                     m_opaque_sp ? m_opaque_sp->GetName().AsCString() : "<invalid>");
 
     if (IsValid())
-    {
-        if (log)
-            log->Printf ("SBValue::GetName (this.sp=%p) => '%s'", m_opaque_sp.get(),
-                         m_opaque_sp->GetName().AsCString());
+        return m_opaque_sp->GetName().GetCString();
 
-        return m_opaque_sp->GetName().AsCString();
-    }
-    else
-    {
-        if (log)
-            log->Printf ("SBValue::GetName (this.sp=%p) ==> NULL", m_opaque_sp.get());
-        return NULL;
-    }
+    return NULL;
 }
 
 const char *
@@ -319,18 +310,21 @@
 {
     if (m_opaque_sp)
     {
-        const char *name = GetName();
-        const char *type_name = GetTypeName ();
-        size_t byte_size = GetByteSize ();
-        uint32_t num_children = GetNumChildren ();
-        bool is_stale = ValueIsStale ();
-        description.Printf ("name: '%s', type: %s, size: %d", (name != NULL ? name : "<unknown name>"),
-                            (type_name != NULL ? type_name : "<unknown type name>"), (int) byte_size);
-        if (num_children > 0)
-            description.Printf (", num_children: %d", num_children);
-
-        if (is_stale)
-            description.Printf (" [value is stale]");
+        // Don't call all these APIs and cause more logging!
+//        const char *name = GetName();
+//        const char *type_name = GetTypeName ();
+//        size_t byte_size = GetByteSize ();
+//        uint32_t num_children = GetNumChildren ();
+//        bool is_stale = ValueIsStale ();
+//        description.Printf ("name: '%s', type: %s, size: %d", (name != NULL ? name : "<unknown name>"),
+//                            (type_name != NULL ? type_name : "<unknown type name>"), (int) byte_size);
+//        if (num_children > 0)
+//            description.Printf (", num_children: %d", num_children);
+//
+//        if (is_stale)
+//            description.Printf (" [value is stale]");
+        
+        description.Printf ("name: '%s'", m_opaque_sp->GetName().GetCString());
     }
     else
         description.Printf ("No value");

Modified: lldb/trunk/source/API/SBValueList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBValueList.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/API/SBValueList.cpp (original)
+++ lldb/trunk/source/API/SBValueList.cpp Thu Oct 28 23:59:35 2010
@@ -158,7 +158,7 @@
         SBStream sstr;
         sb_value.GetDescription (sstr);
         log->Printf ("SBValueList::GetValueAtIndex (this.ap=%p, idx=%d) => SBValue (this.sp = %p, '%s')", 
-                     m_opaque_ap.get(), sb_value.get(), sstr.GetData());
+                     m_opaque_ap.get(), idx, sb_value.get(), sstr.GetData());
     }
 
     return sb_value;

Modified: lldb/trunk/source/Core/ValueObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObject.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObject.cpp (original)
+++ lldb/trunk/source/Core/ValueObject.cpp Thu Oct 28 23:59:35 2010
@@ -1094,7 +1094,7 @@
                         else
                         {
                             if (print_valobj)
-                                s.PutCString(" {\n");
+                                s.PutCString(is_ref ? ": {\n" : " {\n");
                             s.IndentMore();
                         }
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Thu Oct 28 23:59:35 2010
@@ -3327,12 +3327,11 @@
                 if (type_sp.unique())
                 {
                     // We are ready to put this type into the uniqued list up at the module level
-                    TypeSP uniqued_type_sp(m_obj_file->GetModule()->GetTypeList()->InsertUnique(type_sp));
+                    m_obj_file->GetModule()->GetTypeList()->Insert (type_sp);
                     
                     if (m_debug_map_symfile)
-                        m_debug_map_symfile->GetObjectFile()->GetModule()->GetTypeList()->InsertUnique (uniqued_type_sp);
+                        m_debug_map_symfile->GetObjectFile()->GetModule()->GetTypeList()->Insert (type_sp);
 
-                    type_sp = uniqued_type_sp;
                     m_die_to_type[die] = type_sp.get();
                 }
             }

Modified: lldb/trunk/source/Symbol/TypeList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/TypeList.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/TypeList.cpp (original)
+++ lldb/trunk/source/Symbol/TypeList.cpp Thu Oct 28 23:59:35 2010
@@ -52,82 +52,31 @@
 {
 }
 
-//----------------------------------------------------------------------
-// Add a base type to the type list
-//----------------------------------------------------------------------
+void
+TypeList::Insert (TypeSP& type_sp)
+{
+    // Just push each type on the back for now. We will worry about uniquing later
+    if (type_sp)
+        m_types.insert(std::make_pair(type_sp->GetID(), type_sp));
+}
 
-//struct CampareDCTypeBaton
-//{
-//  CampareDCTypeBaton(const std::vector<TypeSP>& _types, const Type* _search_type) :
-//      types(_types),
-//      search_type(_search_type)
-//  {
-//  }
-//  const std::vector<TypeSP>& types;
-//  const Type* search_type;
-//};
-//
-//static int
-//compare_dc_type (const void *key, const void *arrmem)
-//{
-//  const Type* search_type = ((CampareDCTypeBaton*) key)->search_type;
-//  uint32_t curr_index = *(uint32_t *)arrmem;
-//  const Type* curr_type = ((CampareDCTypeBaton*) key)->types[curr_index].get();
-//  Type::CompareState state;
-//  return Type::Compare(*search_type, *curr_type, state);
-//}
-//
-//struct LessThanBinaryPredicate
-//{
-//  LessThanBinaryPredicate(const CampareDCTypeBaton& _compare_baton) :
-//      compare_baton(_compare_baton)
-//  {
-//  }
-//
-//  bool operator() (uint32_t a, uint32_t b) const
-//  {
-//      Type::CompareState state;
-//      return Type::Compare(*compare_baton.search_type, *compare_baton.types[b].get(), state) < 0;
-//  }
-//  const CampareDCTypeBaton& compare_baton;
-//};
 
-TypeSP
-TypeList::InsertUnique(TypeSP& type_sp)
+bool
+TypeList::InsertUnique (TypeSP& type_sp)
 {
-#if 0
-//  Stream s(stdout);
-//  s << "TypeList::InsertUnique for type ";
-//  type_sp->Dump(s);
-//  s << "Current list:\n";
-//  Dump(s);
-
-    CampareDCTypeBaton compare_baton(m_types, type_sp.get());
-    uint32_t* match_index_ptr = (uint32_t*)bsearch(&compare_baton, &m_sorted_indexes[0], m_sorted_indexes.size(), sizeof(uint32_t), compare_dc_type);
-    if (match_index_ptr)
+    if (type_sp)
     {
-//      s << "returning existing type: " << (void *)m_types[*match_index_ptr].get() << "\n";
-        return m_types[*match_index_ptr];
+        user_id_t type_uid = type_sp->GetID();
+        iterator pos, end = m_types.end();
+        
+        for (pos = m_types.find(type_uid); pos != end && pos->second->GetID() == type_uid; ++pos)
+        {
+            if (pos->second.get() == type_sp.get())
+                return false;
+        }
     }
-
-    // Get the new index within the m_types array before we add the new type
-    uint32_t uniqued_type_index = m_types.size();
-    // Add the new shared pointer to our type by appending it to the end of the types array
-    m_types.push_back(type_sp);
-    // Figure out what the sorted index of this new type should be
-    uint32_t fake_index = 0;
-    LessThanBinaryPredicate compare_func_obj(compare_baton);
-    std::vector<uint32_t>::iterator insert_pos = std::upper_bound(m_sorted_indexes.begin(), m_sorted_indexes.end(), fake_index, compare_func_obj);
-    // Insert the sorted index into our sorted index array
-    m_sorted_indexes.insert(insert_pos, uniqued_type_index);
-#else
-    // Just push each type on the back for now. We will worry about uniquing later
-    m_types.push_back (type_sp);
-#endif
-//  s << "New list:\n";
-//  Dump(s);
-
-    return type_sp;
+    Insert (type_sp);
+    return true;
 }
 
 //----------------------------------------------------------------------
@@ -136,26 +85,25 @@
 TypeSP
 TypeList::FindType(lldb::user_id_t uid)
 {
-    TypeSP type_sp;
-    iterator pos, end;
-    for (pos = m_types.begin(), end = m_types.end(); pos != end; ++pos)
-        if ((*pos)->GetID() == uid)
-            return *pos;
-
-    return type_sp;
+    iterator pos = m_types.find(uid);
+    if (pos != m_types.end())
+        return pos->second;
+    return TypeSP();
 }
 
 //----------------------------------------------------------------------
 // Find a type by name.
 //----------------------------------------------------------------------
 TypeList
-TypeList::FindTypes(const ConstString &name)
+TypeList::FindTypes (const ConstString &name)
 {
+    // Do we ever need to make a lookup by name map? Here we are doing
+    // a linear search which isn't going to be fast.
     TypeList types(m_ast.getTargetInfo()->getTriple().getTriple().c_str());
     iterator pos, end;
     for (pos = m_types.begin(), end = m_types.end(); pos != end; ++pos)
-        if ((*pos)->GetName() == name)
-            types.InsertUnique(*pos);
+        if (pos->second->GetName() == name)
+            types.Insert (pos->second);
     return types;
 }
 
@@ -171,33 +119,31 @@
     return m_types.size();
 }
 
+// GetTypeAtIndex isn't used a lot for large type lists, currently only for
+// type lists that are returned for "image dump -t TYPENAME" commands and other
+// simple symbol queries that grab the first result...
+
 TypeSP
 TypeList::GetTypeAtIndex(uint32_t idx)
 {
-    TypeSP type_sp;
-    if (idx < m_types.size())
-        type_sp = m_types[idx];
-    return type_sp;
+    iterator pos, end;
+    uint32_t i = idx;
+    for (pos = m_types.begin(), end = m_types.end(); pos != end; ++pos)
+    {
+        if (i == 0)
+            return pos->second;
+        --i;
+    }
+    return TypeSP();
 }
 
 void
 TypeList::Dump(Stream *s, bool show_context)
 {
-//  std::vector<uint32_t>::const_iterator pos, end;
-//  for (pos = end = m_sorted_indexes.begin(), end = m_sorted_indexes.end(); pos != end; ++pos)
-//  {
-//      m_types[*pos]->Dump(s, show_context);
-//  }
-
-    m_ast.getASTContext()->getTranslationUnitDecl()->print(llvm::fouts(), 0);
-    const size_t num_types = m_types.size();
-    for (size_t i=0; i<num_types; ++i)
+    for (iterator pos = m_types.begin(), end = m_types.end(); pos != end; ++pos)
     {
-        m_types[i]->Dump(s, show_context);
+        pos->second->Dump(s, show_context);
     }
-//  ASTContext *ast_context = GetClangASTContext ().getASTContext();
-//  if (ast_context)
-//      ast_context->PrintStats();
 }
 
 

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=117641&r1=117640&r2=117641&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Thu Oct 28 23:59:35 2010
@@ -73,22 +73,15 @@
         s->Indent();
         s->PutCString("Target\n");
         s->IndentMore();
-        m_images.Dump(s);
-        m_breakpoint_list.Dump(s);
-        m_internal_breakpoint_list.Dump(s);
+            m_images.Dump(s);
+            m_breakpoint_list.Dump(s);
+            m_internal_breakpoint_list.Dump(s);
+        s->IndentLess();
     }
     else
     {
-        char path[PATH_MAX];
-        int path_len = PATH_MAX;
-        if (GetExecutableModule()->GetFileSpec().GetPath (path, path_len))
-            s->Printf ("Target: %s\n", path);
-        else
-            s->Printf ("Target: <unknown>\n");
+        s->Printf ("%s", GetExecutableModule()->GetFileSpec().GetFilename().GetCString());
     }
-//  if (m_process_sp.get())
-//      m_process_sp->Dump(s);
-    s->IndentLess();
 }
 
 void





More information about the lldb-commits mailing list