[Lldb-commits] [lldb] r180962 - If the Target's current architecture is incompatible with the kernel
Jason Molenda
jmolenda at apple.com
Thu May 2 15:02:57 PDT 2013
Author: jmolenda
Date: Thu May 2 17:02:57 2013
New Revision: 180962
URL: http://llvm.org/viewvc/llvm-project?rev=180962&view=rev
Log:
If the Target's current architecture is incompatible with the kernel
DynamicLoaderDarwinKernel finds in memory, have DynamicLoaderDarwinKernel
re-set the Target's arch based on the kernel's cpu type / cpu subtype.
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=180962&r1=180961&r2=180962&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Thu May 2 17:02:57 2013
@@ -434,6 +434,11 @@ DynamicLoaderDarwinKernel::CheckForKerne
if (exe_objfile->GetType() == ObjectFile::eTypeExecutable && exe_objfile->GetStrata() == ObjectFile::eStrataKernel)
{
+ ArchSpec kernel_arch (eArchTypeMachO, header.cputype, header.cpusubtype);
+ if (!process->GetTarget().GetArchitecture().IsCompatibleMatch(kernel_arch))
+ {
+ process->GetTarget().SetArchitecture (kernel_arch);
+ }
return memory_module_sp->GetUUID();
}
}
More information about the lldb-commits
mailing list