[Lldb-commits] [lldb] r216498 - Don't have ProcessMachCore::CanDebug use the Target's arch when

Jason Molenda jmolenda at apple.com
Tue Aug 26 15:39:04 PDT 2014


Author: jmolenda
Date: Tue Aug 26 17:39:03 2014
New Revision: 216498

URL: http://llvm.org/viewvc/llvm-project?rev=216498&view=rev
Log:
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>

Modified:
    lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp

Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=216498&r1=216497&r2=216498&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Tue Aug 26 17:39:03 2014
@@ -95,7 +95,11 @@ ProcessMachCore::CanDebug(Target &target
     // 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,





More information about the lldb-commits mailing list