[Lldb-commits] [lldb] r184237 - PlatformDarwinKernel was treating its file path arg as a kext bundle id -- but when the user

Jason Molenda jmolenda at apple.com
Tue Jun 18 14:23:15 PDT 2013


Author: jmolenda
Date: Tue Jun 18 16:23:14 2013
New Revision: 184237

URL: http://llvm.org/viewvc/llvm-project?rev=184237&view=rev
Log:
PlatformDarwinKernel was treating its file path arg as a kext bundle id -- but when the user
did a manual "target modules add", it would be a file path.  If the kext bundle lookup fails,
fall back to calling PlatformDarwin's GetSharedModule which will handle a file path correctly.
<rdar://problem/14179858> 

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

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp?rev=184237&r1=184236&r2=184237&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp Tue Jun 18 16:23:14 2013
@@ -591,6 +591,8 @@ PlatformDarwinKernel::GetSharedModule (c
     Error error;
     module_sp.reset();
     const FileSpec &platform_file = module_spec.GetFileSpec();
+
+    // Treat the file's path as a kext bundle ID (e.g. "com.apple.driver.AppleIRController") and search our kext index.
     std::string kext_bundle_id = platform_file.GetPath();
     if (!kext_bundle_id.empty())
     {
@@ -611,7 +613,8 @@ PlatformDarwinKernel::GetSharedModule (c
         }
     }
 
-    return error;
+    // Else fall back to treating the file's path as an actual file path - defer to PlatformDarwin's GetSharedModule.
+    return PlatformDarwin::GetSharedModule (module_spec, module_sp, module_search_paths_ptr, old_module_sp_ptr, did_create_ptr);
 }
 
 Error





More information about the lldb-commits mailing list