From ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Mon, 18 Dec 2017 20:12:36 +0000 Subject: Vendor import of lldb trunk r321017: https://llvm.org/svn/llvm-project/lldb/trunk@321017 --- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp') diff --git a/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp index 5607a71ad5aab..72b1b15f08f86 100644 --- a/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp +++ b/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp @@ -10,9 +10,6 @@ #include "ObjectFilePECOFF.h" #include "WindowsMiniDump.h" -#include "llvm/BinaryFormat/COFF.h" - -#include "lldb/Core/ArchSpec.h" #include "lldb/Core/FileSpecList.h" #include "lldb/Core/Module.h" #include "lldb/Core/ModuleSpec.h" @@ -23,12 +20,14 @@ #include "lldb/Target/Process.h" #include "lldb/Target/SectionLoadList.h" #include "lldb/Target/Target.h" +#include "lldb/Utility/ArchSpec.h" #include "lldb/Utility/DataBufferHeap.h" #include "lldb/Utility/DataBufferLLVM.h" #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/Timer.h" #include "lldb/Utility/UUID.h" +#include "llvm/BinaryFormat/COFF.h" #include "llvm/Support/MemoryBuffer.h" @@ -136,6 +135,11 @@ size_t ObjectFilePECOFF::GetModuleSpecifications( spec.SetTriple("i686-pc-windows"); specs.Append(ModuleSpec(file, spec)); } + else if (coff_header.machine == MachineArmNt) + { + spec.SetTriple("arm-pc-windows"); + specs.Append(ModuleSpec(file, spec)); + } } } } @@ -537,7 +541,8 @@ Symtab *ObjectFilePECOFF::GetSymtab() { // First 4 bytes should be zeroed after strtab_size has been read, // because it is used as offset 0 to encode a NULL string. - uint32_t *strtab_data_start = (uint32_t *)strtab_data.GetDataStart(); + uint32_t *strtab_data_start = const_cast( + reinterpret_cast(strtab_data.GetDataStart())); strtab_data_start[0] = 0; offset = 0; -- cgit v1.2.3