Improved detection of object file types, moving
detection of kernels into the object file and
adding a new category for raw binary images.
Fixed all clients who previously searched for
sections manually, making them use the object
file's facilities instead.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150272 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp b/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
index 7aa33c3..8294861 100644
--- a/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
+++ b/source/Plugins/OperatingSystem/Darwin-Kernel/OperatingSystemDarwinKernel.cpp
@@ -68,14 +68,9 @@
ObjectFile *object_file = exe_module->GetObjectFile();
if (object_file)
{
- SectionList *section_list = object_file->GetSectionList();
- if (section_list)
+ if (object_file->GetStrata() != ObjectFile::eStrataKernel)
{
- static ConstString g_kld_section_name ("__KLD");
- if (section_list->FindSectionByName (g_kld_section_name))
- {
- create = true;
- }
+ return NULL;
}
}
}