[PATCH] Fix for ObjectFilePECOFF::GetArchitecture

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.

ObjectFilePECOFF.cpp.patch (666 Bytes)

Looks good. Just make sure there isn't a take in ArchSpec.cpp that converts COFF cpu type/subtype that relies on the value being 0 instead of LLDB_INVALID_CPUTYPE (I also can't remember if LLDB_INVALID_CPUTYPE is zero?).

Thanks for the quick reply. There doesn't seem to be anything requiring it be 0 in ArchSpec; LLDB_INVALID_CPUTYPE is actually 0xFFFFFFFEu. In fact the coff entries in ArchSpec use LLDB_INVALID_CPUTYPE, so I think this is correct. I'll commit.