Increase search for kernel image from 32MB to 128MB
DynamicLoaderDarwinKernel::SearchForKernelNearPC() searches for a Darwin kernel mach-o header starting at $pc and working backwards, stopping on the first memory read error encountered. The kernel, and the kexts linked in to the kernel, have grown over the years and the original 32MB scan limit is giving a high chance of failing to find the kernel if we're in a random kext. In non-kernel environments, firmware and bare board typically, we will hit a memory read error on an unmapped page quickly so this doesn't add a lot of random memory read requests in those environments. We only check at one megabyte boundaries, so worst case this is 128 reads at the start of a gdb-remote connection. The check for a memory read error & stopping was a more recent addition (a few years ago), so I kept the scan region a bit small.
Loading
Please sign in to comment