[Lldb-commits] [PATCH] D66655: [lldb] Fix x86 compilation

Leonid Mashinskiy via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 23 08:10:08 PDT 2019


leonid.mashinskiy created this revision.
leonid.mashinskiy added a reviewer: asmith.
leonid.mashinskiy added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rLLDB LLDB

https://reviews.llvm.org/D66655

Files:
  source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
  source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h


Index: source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
===================================================================
--- source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
+++ source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#if defined(_WIN64)
+#if defined(_WIN32) && !defined(_WIN64)
 #ifndef liblldb_NativeRegisterContextWindows_i386_h_
 #define liblldb_NativeRegisterContextWindows_i386_h_
 
@@ -71,4 +71,4 @@
 } // namespace lldb_private
 
 #endif // liblldb_NativeRegisterContextWindows_i386_h_
-#endif // defined(_WIN64)
+#endif // defined(_WIN32) && !defined(_WIN64)
Index: source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
===================================================================
--- source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
+++ source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
@@ -242,7 +242,6 @@
 NativeRegisterContextWindows_i386::ReadRegister(const RegisterInfo *reg_info,
                                                 RegisterValue &reg_value) {
   Status error;
-  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
 
   if (!reg_info) {
     error.SetErrorString("reg_info NULL");
@@ -267,7 +266,6 @@
 
 Status NativeRegisterContextWindows_i386::WriteRegister(
     const RegisterInfo *reg_info, const RegisterValue &reg_value) {
-  Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
   Status error;
 
   if (!reg_info) {
@@ -286,12 +284,12 @@
   }
 
   if (IsGPR(reg))
-    return GPRRead(reg, reg_value);
+    return GPRWrite(reg, reg_value);
 
   return Status("unimplemented");
 }
 
-Status NativeRegisterContextWindows_x86_64::ReadAllRegisterValues(
+Status NativeRegisterContextWindows_i386::ReadAllRegisterValues(
     lldb::DataBufferSP &data_sp) {
   const size_t data_size = REG_CONTEXT_SIZE;
   data_sp = std::make_shared<DataBufferHeap>(data_size, 0);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66655.216852.patch
Type: text/x-patch
Size: 2098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190823/4099072c/attachment-0001.bin>


More information about the lldb-commits mailing list