diff options
author | Jason Molenda <jmolenda@apple.com> | 2018-06-19 21:39:10 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2018-06-19 21:39:10 +0000 |
commit | 85afc93f8a004294edd37045838b4a82e910523f (patch) | |
tree | 835208382c97aae0cc2aa27522e09242407752a1 | |
parent | 1246890964c78b6ee1a453dc2746e8af0ec9479e (diff) | |
download | bcm5719-llvm-85afc93f8a004294edd37045838b4a82e910523f.tar.gz bcm5719-llvm-85afc93f8a004294edd37045838b4a82e910523f.zip |
Correct the pathname that PlatformDarwinKernel::ExamineKextForMatchingUUID
passes to the recursive search function so we only recursively
search the kext bundle directory, instead of its parent directory.
<rdar://problem/41227170>
Differential Revision: https://reviews.llvm.org/D48302
llvm-svn: 335079
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp index 6b938a584cc..1e3216c0af5 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp @@ -780,10 +780,10 @@ Status PlatformDarwinKernel::GetSharedModule( } std::vector<lldb_private::FileSpec> -PlatformDarwinKernel::SearchForExecutablesRecursively(const ConstString &dir) { +PlatformDarwinKernel::SearchForExecutablesRecursively(const std::string &dir) { std::vector<FileSpec> executables; std::error_code EC; - for (llvm::sys::fs::recursive_directory_iterator it(dir.GetStringRef(), EC), + for (llvm::sys::fs::recursive_directory_iterator it(dir.c_str(), EC), end; it != end && !EC; it.increment(EC)) { auto status = it->status(); @@ -800,7 +800,7 @@ Status PlatformDarwinKernel::ExamineKextForMatchingUUID( const FileSpec &kext_bundle_path, const lldb_private::UUID &uuid, const ArchSpec &arch, ModuleSP &exe_module_sp) { for (const auto &exe_file : - SearchForExecutablesRecursively(kext_bundle_path.GetDirectory())) { + SearchForExecutablesRecursively(kext_bundle_path.GetPath())) { if (exe_file.Exists()) { ModuleSpec exe_spec(exe_file); exe_spec.GetUUID() = uuid; diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h index 7103c301bc3..7f603cac2be 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.h @@ -128,7 +128,7 @@ protected: bool recurse); static std::vector<lldb_private::FileSpec> - SearchForExecutablesRecursively(const lldb_private::ConstString &dir); + SearchForExecutablesRecursively(const std::string &dir); static void AddKextToMap(PlatformDarwinKernel *thisp, const lldb_private::FileSpec &file_spec); |