[lldb-dev] [PATCH] Fix for ObjectFilePECOFF::GetArchitecture

Colin Riley colin at codeplay.com
Thu Nov 21 14:30:30 PST 2013


Is anyone else using/looking at the PECOFF support? I'd like to commit 
this, and would probably have done it without asking due to how minor it 
is, but wanted to see if someone was using or has ownership of it first. 
If I don't get a reply within a few days I'll commit.

It's pretty simple: 0 as subtype never matches anything (at least, it 
doesn't match x86_64 windows binaries, which is what I was tinkering 
with). Matching with with LLDB_INVALID_CPUTYPE is what the ELF plugin 
does and I think is more correct.
-------------- next part --------------
Index: source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
===================================================================
--- source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp	(revision 195376)
+++ source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp	(working copy)
@@ -922,7 +922,7 @@
         case llvm::COFF::IMAGE_FILE_MACHINE_ARM:
         case llvm::COFF::IMAGE_FILE_MACHINE_ARMV7:
         case llvm::COFF::IMAGE_FILE_MACHINE_THUMB:
-            arch.SetArchitecture (eArchTypeCOFF, machine, 0);
+            arch.SetArchitecture (eArchTypeCOFF, machine, LLDB_INVALID_CPUTYPE);
             return true;
         default:
             break;


More information about the lldb-dev mailing list