[Lldb-commits] [lldb] r250978 - Add some verbose lldb host logging so lldb will show what SDK

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Wed Oct 21 20:44:52 PDT 2015


Author: jmolenda
Date: Wed Oct 21 22:44:51 2015
New Revision: 250978

URL: http://llvm.org/viewvc/llvm-project?rev=250978&view=rev
Log:
Add some verbose lldb host logging so lldb will show what SDK
directories it is searching for files.

Modified:
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=250978&r1=250977&r2=250978&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Wed Oct 21 22:44:51 2015
@@ -237,7 +237,7 @@ PlatformRemoteiOS::ResolveExecutable (co
                                                  NULL,
                                                  NULL, 
                                                  NULL);
-        
+
             if (exe_module_sp && exe_module_sp->GetObjectFile())
                 return error;
             exe_module_sp.reset();
@@ -567,6 +567,7 @@ uint32_t
 PlatformRemoteiOS::FindFileInAllSDKs (const char *platform_file_path,
                                       FileSpecList &file_list)
 {
+    Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST | LIBLLDB_LOG_VERBOSE);
     if (platform_file_path && platform_file_path[0] && UpdateSDKDirectoryInfosIfNeeded())
     {
         const uint32_t num_sdk_infos = m_sdk_directory_infos.size();
@@ -574,6 +575,10 @@ PlatformRemoteiOS::FindFileInAllSDKs (co
         // First try for an exact match of major, minor and update
         for (uint32_t sdk_idx=0; sdk_idx<num_sdk_infos; ++sdk_idx)
         {
+            if (log)
+            {
+                log->Printf ("Searching for %s in sdk path %s", platform_file_path, m_sdk_directory_infos[sdk_idx].directory.GetPath().c_str());
+            }
             if (GetFileInSDK (platform_file_path,
                               sdk_idx,
                               local_file))
@@ -764,6 +769,7 @@ PlatformRemoteiOS::GetSharedModule (cons
     // then we attempt to get a shared module for the right architecture
     // with the right UUID.
     const FileSpec &platform_file = module_spec.GetFileSpec();
+    Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST | LIBLLDB_LOG_VERBOSE);
 
     Error error;
     char platform_file_path[PATH_MAX];
@@ -781,6 +787,10 @@ PlatformRemoteiOS::GetSharedModule (cons
         const uint32_t connected_sdk_idx = GetConnectedSDKIndex ();
         if (connected_sdk_idx < num_sdk_infos)
         {
+            if (log)
+            {
+                log->Printf ("Searching for %s in sdk path %s", platform_file_path, m_sdk_directory_infos[connected_sdk_idx].directory.GetPath().c_str());
+            }
             if (GetFileInSDK (platform_file_path, connected_sdk_idx, platform_module_spec.GetFileSpec()))
             {
                 module_sp.reset();
@@ -800,6 +810,10 @@ PlatformRemoteiOS::GetSharedModule (cons
         // will tend to be valid in that same SDK.
         if (m_last_module_sdk_idx < num_sdk_infos)
         {
+            if (log)
+            {
+                log->Printf ("Searching for %s in sdk path %s", platform_file_path, m_sdk_directory_infos[m_last_module_sdk_idx].directory.GetPath().c_str());
+            }
             if (GetFileInSDK (platform_file_path, m_last_module_sdk_idx, platform_module_spec.GetFileSpec()))
             {
                 module_sp.reset();
@@ -820,6 +834,10 @@ PlatformRemoteiOS::GetSharedModule (cons
         const uint32_t current_sdk_idx = GetSDKIndexBySDKDirectoryInfo(current_sdk_info);
         if (current_sdk_idx < num_sdk_infos && current_sdk_idx != m_last_module_sdk_idx)
         {
+            if (log)
+            {
+                log->Printf ("Searching for %s in sdk path %s", platform_file_path, m_sdk_directory_infos[current_sdk_idx].directory.GetPath().c_str());
+            }
             if (GetFileInSDK (platform_file_path, current_sdk_idx, platform_module_spec.GetFileSpec()))
             {
                 module_sp.reset();
@@ -844,6 +862,10 @@ PlatformRemoteiOS::GetSharedModule (cons
                 // it above
                 continue;
             }
+            if (log)
+            {
+                log->Printf ("Searching for %s in sdk path %s", platform_file_path, m_sdk_directory_infos[sdk_idx].directory.GetPath().c_str());
+            }
             if (GetFileInSDK (platform_file_path, sdk_idx, platform_module_spec.GetFileSpec()))
             {
                 //printf ("sdk[%u]: '%s'\n", sdk_idx, local_file.GetPath().c_str());




More information about the lldb-commits mailing list