[Lldb-commits] [PATCH] D24284: [lldb] Read modules from memory when a local copy is not available
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 20 13:53:42 PDT 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL282013: [PECOFF] Use the COFF subsystem field when determining the Triple. (authored by zturner).
Changed prior to commit:
https://reviews.llvm.org/D24284?vs=71855&id=71984#toc
Repository:
rL LLVM
https://reviews.llvm.org/D24284
Files:
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
Index: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
===================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h
@@ -128,6 +128,8 @@
uint32_t GetPluginVersion() override;
+ bool IsWindowsSubsystem();
+
protected:
bool NeedsEndianSwap() const;
Index: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
@@ -944,6 +944,21 @@
}
}
+bool ObjectFilePECOFF::IsWindowsSubsystem() {
+ switch (m_coff_header_opt.subsystem) {
+ case llvm::COFF::IMAGE_SUBSYSTEM_NATIVE:
+ case llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_GUI:
+ case llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_CUI:
+ case llvm::COFF::IMAGE_SUBSYSTEM_NATIVE_WINDOWS:
+ case llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_CE_GUI:
+ case llvm::COFF::IMAGE_SUBSYSTEM_XBOX:
+ case llvm::COFF::IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool ObjectFilePECOFF::GetArchitecture(ArchSpec &arch) {
uint16_t machine = m_coff_header.machine;
switch (machine) {
@@ -954,7 +969,9 @@
case llvm::COFF::IMAGE_FILE_MACHINE_ARM:
case llvm::COFF::IMAGE_FILE_MACHINE_ARMNT:
case llvm::COFF::IMAGE_FILE_MACHINE_THUMB:
- arch.SetArchitecture(eArchTypeCOFF, machine, LLDB_INVALID_CPUTYPE);
+ arch.SetArchitecture(eArchTypeCOFF, machine, LLDB_INVALID_CPUTYPE,
+ IsWindowsSubsystem() ? llvm::Triple::Win32
+ : llvm::Triple::UnknownOS);
return true;
default:
break;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24284.71984.patch
Type: text/x-patch
Size: 1835 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160920/7f0d630c/attachment.bin>
More information about the lldb-commits
mailing list