summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-08-26 22:39:03 +0000
committerJason Molenda <jmolenda@apple.com>2014-08-26 22:39:03 +0000
commitf37b7c79a319595b5541929a4eff810c2df6bb83 (patch)
treee03626bd46f6a148edd53c9fd0e37ef4fad68257 /lldb/source
parent67d629889e3a74c8d6bf83001034b2cad714aaf0 (diff)
downloadbcm5719-llvm-f37b7c79a319595b5541929a4eff810c2df6bb83.tar.gz
bcm5719-llvm-f37b7c79a319595b5541929a4eff810c2df6bb83.zip
Don't have ProcessMachCore::CanDebug use the Target's arch when
creating the ModuleSpec to load the core file - we won't have a fat core file and we can end up with cpu subtype mismatches if the core file header isn't written out completely accurately. We need to be a little loose in this particular case. <rdar://problem/17843388> llvm-svn: 216498
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
index 8c44838471a..eeadc843895 100644
--- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
+++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
@@ -95,7 +95,11 @@ ProcessMachCore::CanDebug(Target &target, bool plugin_specified_by_name)
// For now we are just making sure the file exists for a given module
if (!m_core_module_sp && m_core_file.Exists())
{
- ModuleSpec core_module_spec(m_core_file, target.GetArchitecture());
+ // Don't add the Target's architecture to the ModuleSpec - we may be working
+ // with a core file that doesn't have the correct cpusubtype in the header
+ // but we should still try to use it - ModuleSpecList::FindMatchingModuleSpec
+ // enforces a strict arch mach.
+ ModuleSpec core_module_spec(m_core_file);
Error error (ModuleList::GetSharedModule (core_module_spec,
m_core_module_sp,
NULL,
OpenPOWER on IntegriCloud