Help on correct setup to build lldb on windows. No host platform architecture?

Hi,

I have built lldb.exe on a 64bit Windows 7. Lldb.exe is 32bit PE executable.

The LLVM TARGET TRIPLE is i686-pc-win32.

However, when file any executable, lldb will show this error message

Error: ‘a.exe’ doesn’t contain any ‘host’ platform architectures:

I debugged into LLDB, I found

ArchSpec.cpp SetTriple doesn’t recognize i686-pc-win32 at all.

And if win32 in the triple, Host::GetArchitecture will set not to

Recognize any x64 executable neither.

I would like to know if anybody knows how to configure lldb.exe

On windows to solve this issue?

Thanks,

Yin

You need to modify g_core_definitions in ArchSpec.cpp to contain an entry for "i686". Is this a supported llvm triple? If so, please do make sure you add a valid settings for it.

You might start by trying to add this row right next to the "x86_64" row:

    { eByteOrderLittle, 8, 1, 15, llvm::Triple::x86_64 , ArchSpec::eCore_x86_64_x86_64 , "i686" },

This of course assumes i686 is 64 bit...

If "i686" is 32 bit, try adding:

    { eByteOrderLittle, 4, 1, 15, llvm::Triple::x86 , ArchSpec::eCore_x86_32_i386 , "i686" },