[Lldb-commits] [lldb] r186862 - elf-core: Remove SetTriple workaround
Ed Maste
emaste at freebsd.org
Mon Jul 22 13:01:34 PDT 2013
Author: emaste
Date: Mon Jul 22 15:01:34 2013
New Revision: 186862
URL: http://llvm.org/viewvc/llvm-project?rev=186862&view=rev
Log:
elf-core: Remove SetTriple workaround
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.
Thanks to Daniel Malea for testing on Linux.
Modified:
lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=186862&r1=186861&r2=186862&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Mon Jul 22 15:01:34 2013
@@ -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);
More information about the lldb-commits
mailing list