diff options
Diffstat (limited to 'source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp')
-rw-r--r-- | source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp index f168fb6fda5e..e5d27fc28949 100644 --- a/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp +++ b/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp @@ -18,7 +18,6 @@ // Other libraries and framework includes // Project includes #include "lldb/Breakpoint/BreakpointLocation.h" -#include "lldb/Core/ArchSpec.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleList.h" #include "lldb/Core/ModuleSpec.h" @@ -31,6 +30,7 @@ #include "lldb/Target/Platform.h" #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Log.h" #include "lldb/Utility/Status.h" @@ -694,7 +694,16 @@ Status PlatformDarwinKernel::GetSharedModule( } } - // Second look through the kext binarys without dSYMs + // Give the generic methods, including possibly calling into + // DebugSymbols framework on macOS systems, a chance. + error = PlatformDarwin::GetSharedModule(module_spec, process, module_sp, + module_search_paths_ptr, + old_module_sp_ptr, did_create_ptr); + if (error.Success() && module_sp.get()) { + return error; + } + + // Lastly, look through the kext binarys without dSYMs if (m_name_to_kext_path_map_without_dsyms.count(kext_bundle_cs) > 0) { for (BundleIDToKextIterator it = m_name_to_kext_path_map_without_dsyms.begin(); @@ -739,7 +748,17 @@ Status PlatformDarwinKernel::GetSharedModule( } } } - // Second try all kernel binaries that don't have a dSYM + + // Give the generic methods, including possibly calling into + // DebugSymbols framework on macOS systems, a chance. + error = PlatformDarwin::GetSharedModule(module_spec, process, module_sp, + module_search_paths_ptr, + old_module_sp_ptr, did_create_ptr); + if (error.Success() && module_sp.get()) { + return error; + } + + // Next try all kernel binaries that don't have a dSYM for (auto possible_kernel : m_kernel_binaries_without_dsyms) { if (possible_kernel.Exists()) { ModuleSpec kern_spec(possible_kernel); @@ -767,11 +786,7 @@ Status PlatformDarwinKernel::GetSharedModule( } } - // Else fall back to treating the file's path as an actual file path - defer - // to PlatformDarwin's GetSharedModule. - return PlatformDarwin::GetSharedModule(module_spec, process, module_sp, - module_search_paths_ptr, - old_module_sp_ptr, did_create_ptr); + return error; } Status PlatformDarwinKernel::ExamineKextForMatchingUUID( |