summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-07-28 16:44:49 +0000
committerZachary Turner <zturner@google.com>2014-07-28 16:44:49 +0000
commitad587ae4ca143d388c0ec4ef2faa1b5eddedbf67 (patch)
treede86d3fc9716f9768adc2102ba1cac9910068d4a /lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
parent3b2065f0176db3573b30381575c1655dc42c8dfe (diff)
downloadbcm5719-llvm-ad587ae4ca143d388c0ec4ef2faa1b5eddedbf67.tar.gz
bcm5719-llvm-ad587ae4ca143d388c0ec4ef2faa1b5eddedbf67.zip
Fix supported architectures on PlatformWindows.
i386, i486, i486sx, and i686 are all indistinguishable as far as PE/COFF files are concerned. This patch adds support for all of these architectures to PlatformWindows. Differential Revision: http://reviews.llvm.org/D4658 llvm-svn: 214092
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
index 512656aefcf..43661987127 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -129,7 +129,11 @@ ObjectFilePECOFF::GetModuleSpecifications (const lldb_private::FileSpec& file,
if (ParseCOFFHeader(data, &offset, coff_header))
{
ArchSpec spec;
- spec.SetArchitecture(eArchTypeCOFF, coff_header.machine, LLDB_INVALID_CPUTYPE);
+ llvm::Triple::ArchType archType = llvm::Triple::UnknownArch;
+ if (coff_header.machine == MachineAmd64)
+ spec.SetTriple("x86_64-pc-windows");
+ else if (coff_header.machine == MachineX86)
+ spec.SetTriple("i386-pc-windows");
specs.Append(ModuleSpec(file, spec));
}
}
OpenPOWER on IntegriCloud