In https://reviews.llvm.org/D133534 I made a little cleanup
to DynamicLoaderDarwinKernel::CreateInstance and unintentionally
changed the logic. Previously it would not create an instance
if there was a binary given to lldb and it was not a kernel.
With my change, the absence of any binary would also cause it
to not create. So connecting to a kernel without any binaries
would fail.
rdar://
100985097
if (!force) {
// If the user provided an executable binary and it is not a kernel, this
// plugin should not create an instance.
- if (!is_kernel(process->GetTarget().GetExecutableModulePointer()))
+ Module *exec = process->GetTarget().GetExecutableModulePointer();
+ if (exec && !is_kernel(exec))
return nullptr;
// If the target's architecture does not look like an Apple environment,