[Lldb-commits] [PATCH 1/2] elf-core: Undo SetTriple workaround

Ed Maste emaste at freebsd.org
Mon Jul 22 09:46:20 PDT 2013


I'm not sure why the SetTriple() call is needed; on FreeBSD I see that
Arch, Vendor, OS, and Environment are unchanged after this call (for
x86_64, at least), and core debugging works without it.

If we need to restore it we should be able to switch on
arch.GetTriple.getOS() instead of a compile-time #ifdef.
---
 source/Plugins/Process/elf-core/ProcessElfCore.cpp | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/source/Plugins/Process/elf-core/ProcessElfCore.cpp
index 3e7d07d..945e34f 100644
--- a/source/Plugins/Process/elf-core/ProcessElfCore.cpp
+++ b/source/Plugins/Process/elf-core/ProcessElfCore.cpp
@@ -206,21 +206,6 @@ ProcessElfCore::DoLoadCore ()
     // Even if the architecture is set in the target, we need to override
     // it to match the core file which is always single arch.
     ArchSpec arch (m_core_module_sp->GetArchitecture());
-    switch (arch.GetCore())
-    {
-        case ArchSpec::eCore_x86_32_i486:
-            arch.SetTriple ("i386", m_target.GetPlatform().get());
-            break;
-        case ArchSpec::eCore_x86_64_x86_64:
-#ifdef __FreeBSD__
-            arch.SetTriple ("x86_64-freebsd-unknown", m_target.GetPlatform().get());
-#else
-            arch.SetTriple ("x86_64-linux-gnu", m_target.GetPlatform().get());
-#endif
-            break;
-        default:
-            assert(false && "Unhandled core type");
-    }
     if (arch.IsValid())
         m_target.SetArchitecture(arch);            
 
-- 
1.7.11.5




More information about the lldb-commits mailing list