[llvm-branch-commits] [lldb] r367523 - Merging r367414:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 1 01:21:51 PDT 2019


Author: hans
Date: Thu Aug  1 01:21:51 2019
New Revision: 367523

URL: http://llvm.org/viewvc/llvm-project?rev=367523&view=rev
Log:
Merging r367414:
------------------------------------------------------------------------
r367414 | tkrasnukha | 2019-07-31 14:00:30 +0200 (Wed, 31 Jul 2019) | 7 lines

[ProcessWindows] Choose a register context file by preprocessor

Replaced Cmake option based check with the preprocessor macro as CMAKE_SYSTEM_PROCESSOR doesn't work as expected on Windows.

Fixes llvm.org/pr42724

Differential Revision: https://reviews.llvm.org/D65409
------------------------------------------------------------------------

Modified:
    lldb/branches/release_90/   (props changed)
    lldb/branches/release_90/source/Plugins/Process/Windows/Common/CMakeLists.txt
    lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
    lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h
    lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
    lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h

Propchange: lldb/branches/release_90/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug  1 01:21:51 2019
@@ -1,3 +1,3 @@
 /lldb/branches/apple/python-GIL:156467-162159
 /lldb/branches/iohandler:198360-200250
-/lldb/trunk:366433,366985
+/lldb/trunk:366433,366985,367414

Modified: lldb/branches/release_90/source/Plugins/Process/Windows/Common/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_90/source/Plugins/Process/Windows/Common/CMakeLists.txt?rev=367523&r1=367522&r2=367523&view=diff
==============================================================================
--- lldb/branches/release_90/source/Plugins/Process/Windows/Common/CMakeLists.txt (original)
+++ lldb/branches/release_90/source/Plugins/Process/Windows/Common/CMakeLists.txt Thu Aug  1 01:21:51 2019
@@ -7,6 +7,9 @@ add_lldb_library(lldbPluginProcessWindow
   ProcessWindowsLog.cpp
   RegisterContextWindows.cpp
   TargetThreadWindows.cpp
+  x64/RegisterContextWindows_x64.cpp
+  x86/RegisterContextWindows_x86.cpp
+  # TODO add support for ARM (NT) and ARM64
 
   LINK_LIBS
     lldbCore
@@ -20,13 +23,3 @@ add_lldb_library(lldbPluginProcessWindow
   LINK_COMPONENTS
     Support
   )
-
-# 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()

Modified: lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp?rev=367523&r1=367522&r2=367523&view=diff
==============================================================================
--- lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp (original)
+++ lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp Thu Aug  1 01:21:51 2019
@@ -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 @@ bool RegisterContextWindows_x64::WriteRe
   return ::SetThreadContext(
       wthread.GetHostThread().GetNativeThread().GetSystemHandle(), &m_context);
 }
+
+#endif // defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)

Modified: lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h?rev=367523&r1=367522&r2=367523&view=diff
==============================================================================
--- lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h (original)
+++ lldb/branches/release_90/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.h Thu Aug  1 01:21:51 2019
@@ -9,6 +9,8 @@
 #ifndef liblldb_RegisterContextWindows_x64_H_
 #define liblldb_RegisterContextWindows_x64_H_
 
+#if defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
+
 #include "RegisterContextWindows.h"
 #include "lldb/lldb-forward.h"
 
@@ -40,4 +42,6 @@ public:
 };
 }
 
+#endif // defined(__x86_64__) || defined(__amd64__) || defined(_M_X64) || defined(_M_AMD64)
+
 #endif // #ifndef liblldb_RegisterContextWindows_x64_H_

Modified: lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp?rev=367523&r1=367522&r2=367523&view=diff
==============================================================================
--- lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp (original)
+++ lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp Thu Aug  1 01:21:51 2019
@@ -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 @@ bool RegisterContextWindows_x86::ReadReg
   reg_value.SetUInt32(value);
   return true;
 }
+
+#endif // defined(__i386__) || defined(_M_IX86)

Modified: lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h?rev=367523&r1=367522&r2=367523&view=diff
==============================================================================
--- lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h (original)
+++ lldb/branches/release_90/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.h Thu Aug  1 01:21:51 2019
@@ -9,6 +9,8 @@
 #ifndef liblldb_RegisterContextWindows_x86_H_
 #define liblldb_RegisterContextWindows_x86_H_
 
+#if defined(__i386__) || defined(_M_IX86)
+
 #include "RegisterContextWindows.h"
 #include "lldb/lldb-forward.h"
 
@@ -44,4 +46,6 @@ private:
 };
 }
 
+#endif // defined(__i386__) || defined(_M_IX86)
+
 #endif // #ifndef liblldb_RegisterContextWindows_x86_H_




More information about the llvm-branch-commits mailing list