When doing an exhaustive search for the kernel in memory, also look
authorJason Molenda <jmolenda@apple.com>
Thu, 31 Jul 2014 06:07:04 +0000 (06:07 +0000)
committerJason Molenda <jmolenda@apple.com>
Thu, 31 Jul 2014 06:07:04 +0000 (06:07 +0000)
at 16k offsets.
<rdar://problem/17861781>

llvm-svn: 214387

lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp

index 22fb029..fa518d3 100644 (file)
@@ -326,6 +326,8 @@ DynamicLoaderDarwinKernel::SearchForKernelNearPC (Process *process)
             return addr + 0x1000;
         if (CheckForKernelImageAtAddress (addr + 0x2000, process).IsValid())
             return addr + 0x2000;
+        if (CheckForKernelImageAtAddress (addr + 0x4000, process).IsValid())
+            return addr + 0x4000;
         i++;
         addr -= 0x100000;
     }
@@ -376,6 +378,8 @@ DynamicLoaderDarwinKernel::SearchForKernelViaExhaustiveSearch (Process *process)
             return addr + 0x1000;
         if (CheckForKernelImageAtAddress (addr + 0x2000, process).IsValid())
             return addr + 0x2000;
+        if (CheckForKernelImageAtAddress (addr + 0x4000, process).IsValid())
+            return addr + 0x4000;
         addr += 0x100000;
     }
     return LLDB_INVALID_ADDRESS;