mirror of
https://github.com/intel/llvm.git
synced 2026-01-16 13:35:38 +08:00
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. llvm-svn: 180962
This commit is contained in:
@@ -434,6 +434,11 @@ DynamicLoaderDarwinKernel::CheckForKernelImageAtAddress (lldb::addr_t addr, Proc
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user