When doing an exhaustive search for the kernel in memory, also look

at 16k offsets.
<rdar://problem/17861781> 

llvm-svn: 214387
This commit is contained in:
Jason Molenda
2014-07-31 06:07:04 +00:00
parent 742424339a
commit a02869de00

View 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;