[Lldb-commits] [lldb] r214387 - When doing an exhaustive search for the kernel in memory, also look

Jason Molenda jmolenda at apple.com
Wed Jul 30 23:07:05 PDT 2014


Author: jmolenda
Date: Thu Jul 31 01:07:04 2014
New Revision: 214387

URL: http://llvm.org/viewvc/llvm-project?rev=214387&view=rev
Log:
When doing an exhaustive search for the kernel in memory, also look
at 16k offsets.
<rdar://problem/17861781> 


Modified:
    lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=214387&r1=214386&r2=214387&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Thu Jul 31 01:07:04 2014
@@ -326,6 +326,8 @@ DynamicLoaderDarwinKernel::SearchForKern
             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::SearchForKern
             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;





More information about the lldb-commits mailing list