diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
commit | ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch) | |
tree | 27916256fdeeb57d10d2f3d6948be5d71a703215 /source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp | |
parent | 76e0736e7fcfeb179779e49c05604464b1ccd704 (diff) |
Notes
Diffstat (limited to 'source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp')
-rw-r--r-- | source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
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<uint32_t *>( + reinterpret_cast<const uint32_t *>(strtab_data.GetDataStart())); strtab_data_start[0] = 0; offset = 0; |