[Lldb-commits] [lldb] r235255 - Remove usages of host architecture within ELF object file for unknown parts of ArchSpec.
Oleksiy Vyalov
ovyalov at google.com
Sat Apr 18 07:08:16 PDT 2015
Author: ovyalov
Date: Sat Apr 18 09:08:16 2015
New Revision: 235255
URL: http://llvm.org/viewvc/llvm-project?rev=235255&view=rev
Log:
Remove usages of host architecture within ELF object file for unknown parts of ArchSpec.
http://reviews.llvm.org/D9078
Modified:
lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=235255&r1=235254&r2=235255&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Sat Apr 18 09:08:16 2015
@@ -27,7 +27,6 @@
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
-#include "lldb/Host/HostInfo.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/StringRef.h"
@@ -673,14 +672,7 @@ ObjectFileELF::GetModuleSpecifications (
GetSectionHeaderInfo(section_headers, data, header, uuid, gnu_debuglink_file, gnu_debuglink_crc, spec.GetArchitecture ());
- // If the module vendor is not set and the module OS matches this host OS, set the module vendor to the host vendor.
llvm::Triple &spec_triple = spec.GetArchitecture ().GetTriple ();
- if (spec_triple.getVendor () == llvm::Triple::VendorType::UnknownVendor)
- {
- const llvm::Triple &host_triple = HostInfo::GetArchitecture().GetTriple();
- if (spec_triple.getOS () == host_triple.getOS ())
- spec_triple.setVendor (host_triple.getVendor ());
- }
if (log)
log->Printf ("ObjectFileELF::%s file '%s' module set to triple: %s (architecture %s)", __FUNCTION__, file.GetPath ().c_str (), spec_triple.getTriple ().c_str (), spec.GetArchitecture ().GetArchitectureName ());
@@ -1392,30 +1384,6 @@ ObjectFileELF::GetSectionHeaderInfo(Sect
{
const uint32_t sub_type = subTypeFromElfHeader(header);
arch_spec.SetArchitecture (eArchTypeELF, header.e_machine, sub_type);
-
- switch (arch_spec.GetAddressByteSize())
- {
- case 4:
- {
- const ArchSpec host_arch32 = HostInfo::GetArchitecture(HostInfo::eArchKind32);
- if (host_arch32.GetCore() == arch_spec.GetCore())
- {
- arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data());
- arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data());
- }
- }
- break;
- case 8:
- {
- const ArchSpec host_arch64 = HostInfo::GetArchitecture(HostInfo::eArchKind64);
- if (host_arch64.GetCore() == arch_spec.GetCore())
- {
- arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data());
- arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data());
- }
- }
- break;
- }
}
// If there are no section headers we are done.
More information about the lldb-commits
mailing list