Index: Common/CMakeLists.txt =================================================================== --- Common/CMakeLists.txt +++ Common/CMakeLists.txt @@ -22,11 +22,7 @@ ) # TODO add support for ARM (NT) and ARM64 -# TODO build these unconditionally as we cannot do cross-debugging or WoW -if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") - target_sources(lldbPluginProcessWindowsCommon PRIVATE - x64/RegisterContextWindows_x64.cpp) -elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i?86|X86") - target_sources(lldbPluginProcessWindowsCommon PRIVATE - x86/RegisterContextWindows_x86.cpp) -endif() +target_sources(lldbPluginProcessWindowsCommon PRIVATE + x64/RegisterContextWindows_x64.cpp) +target_sources(lldbPluginProcessWindowsCommon PRIVATE + x86/RegisterContextWindows_x86.cpp) Index: Common/x64/RegisterContextWindows_x64.h =================================================================== --- Common/x64/RegisterContextWindows_x64.h +++ Common/x64/RegisterContextWindows_x64.h @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#if defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64) + #ifndef liblldb_RegisterContextWindows_x64_H_ #define liblldb_RegisterContextWindows_x64_H_ @@ -41,3 +43,5 @@ } #endif // #ifndef liblldb_RegisterContextWindows_x64_H_ + +#endif // defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64) Index: Common/x64/RegisterContextWindows_x64.cpp =================================================================== --- Common/x64/RegisterContextWindows_x64.cpp +++ Common/x64/RegisterContextWindows_x64.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#if defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64) + #include "lldb/Host/windows/HostThreadWindows.h" #include "lldb/Host/windows/windows.h" #include "lldb/Utility/RegisterValue.h" @@ -534,3 +536,5 @@ return ::SetThreadContext( wthread.GetHostThread().GetNativeThread().GetSystemHandle(), &m_context); } + +#endif // defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64) Index: Common/x86/RegisterContextWindows_x86.h =================================================================== --- Common/x86/RegisterContextWindows_x86.h +++ Common/x86/RegisterContextWindows_x86.h @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#if defined(__i386__) || defined(_M_IX86) + #ifndef liblldb_RegisterContextWindows_x86_H_ #define liblldb_RegisterContextWindows_x86_H_ @@ -45,3 +47,5 @@ } #endif // #ifndef liblldb_RegisterContextWindows_x86_H_ + +#endif // defined(__i386__) || defined(_M_IX86) Index: Common/x86/RegisterContextWindows_x86.cpp =================================================================== --- Common/x86/RegisterContextWindows_x86.cpp +++ Common/x86/RegisterContextWindows_x86.cpp @@ -6,6 +6,8 @@ // //===----------------------------------------------------------------------===// +#if defined(__i386__) || defined(_M_IX86) + #include "lldb/Host/windows/HostThreadWindows.h" #include "lldb/Host/windows/windows.h" #include "lldb/Utility/RegisterValue.h" @@ -282,3 +284,5 @@ reg_value.SetUInt32(value); return true; } + +#endif // defined(__i386__) || defined(_M_IX86)