diff options
author | Greg Clayton <gclayton@apple.com> | 2016-03-29 22:09:24 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2016-03-29 22:09:24 +0000 |
commit | c44bcec6e1f3e45c635de5fd9c066a8359254ef0 (patch) | |
tree | fc52c7341da889ff498f76f3edfd88ad50e8dc6f /lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | |
parent | e5ee6f04ab2a5fb162454a5b9ccc968c3c9105f1 (diff) | |
download | bcm5719-llvm-c44bcec6e1f3e45c635de5fd9c066a8359254ef0.tar.gz bcm5719-llvm-c44bcec6e1f3e45c635de5fd9c066a8359254ef0.zip |
LLDB top of tree SVN fails to attach to a MacOSX native process by pid only (no executable).
The problem was that the static DynamicLoaderDarwinKernel::Initialize() was recently changed to come before DynamicLoaderMacOSXDYLD::Initialize() which caused the DynamicLoaderDarwinKernel::CreateInstance(...) to be called before DynamicLoaderMacOSXDYLD::CreateInstance(...) and DynamicLoaderDarwinKernel would claim it could be the dynamic loader for a user space MacOSX process. The fix is to make DynamicLoaderDarwinKernel::CreateInstance() a bit more thourough when vetting the process so that it doesn't claim MacOSX user space processes.
<rdar://problem/25425373>
llvm-svn: 264794
Diffstat (limited to 'lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp')
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 58cb6d5f9fb..1360edd9fd4 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -181,8 +181,8 @@ DynamicLoaderDarwinKernel::CreateInstance (Process* process, bool force) // At this point if there is an ExecutableModule, it is a kernel and the Target is some variant of an Apple system. // If the Process hasn't provided the kernel load address, we need to look around in memory to find it. - addr_t kernel_load_address = SearchForDarwinKernel (process); - if (kernel_load_address != LLDB_INVALID_ADDRESS) + const addr_t kernel_load_address = SearchForDarwinKernel (process); + if (CheckForKernelImageAtAddress (kernel_load_address, process).IsValid()) { process->SetCanRunCode(false); return new DynamicLoaderDarwinKernel (process, kernel_load_address); |