[Lldb-commits] [lldb] r169958 - /lldb/trunk/source/Target/Target.cpp

Jason Molenda jmolenda at apple.com
Tue Dec 11 18:23:57 PST 2012


Author: jmolenda
Date: Tue Dec 11 20:23:56 2012
New Revision: 169958

URL: http://llvm.org/viewvc/llvm-project?rev=169958&view=rev
Log:
Add a LOG_TARGET log to Target::SetDefaultArchitecture
to track any architecture setting there.

Modified:
    lldb/trunk/source/Target/Target.cpp

Modified: lldb/trunk/source/Target/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Target.cpp?rev=169958&r1=169957&r2=169958&view=diff
==============================================================================
--- lldb/trunk/source/Target/Target.cpp (original)
+++ lldb/trunk/source/Target/Target.cpp Tue Dec 11 20:23:56 2012
@@ -96,9 +96,7 @@
         log->Printf ("%p Target::Target()", this);
     if (m_arch.IsValid())
     {
-        LogSP log_target(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TARGET));
-        if (log_target)
-            log_target->Printf("Target::Target created with architecture %s (%s)", m_arch.GetArchitectureName(), m_arch.GetTriple().getTriple().c_str());
+        LogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET, "Target::Target created with architecture %s (%s)", m_arch.GetArchitectureName(), m_arch.GetTriple().getTriple().c_str());
     }
 }
 
@@ -1672,7 +1670,10 @@
 {
     TargetPropertiesSP properties_sp(Target::GetGlobalProperties());
     if (properties_sp)
+    {
+        LogIfAnyCategoriesSet(LIBLLDB_LOG_TARGET, "Target::SetDefaultArchitecture setting target's default architecture to  %s (%s)", arch.GetArchitectureName(), arch.GetTriple().getTriple().c_str());
         return properties_sp->SetDefaultArchitecture(arch);
+    }
 }
 
 Target *





More information about the lldb-commits mailing list