leonid.mashinskiy updated this revision to Diff 217359.
leonid.mashinskiy added a reviewer: tatyana-krasnukha.
Repository:
rLLDB LLDB
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66655/new/
https://reviews.llvm.org/D66655
Files:
source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
Index: source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
===================================================================
--- source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
+++ source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#if defined(_WIN64)
+#if defined(__x86_64__) || defined(_M_X64)
#ifndef liblldb_NativeRegisterContextWindows_x86_64_h_
#define liblldb_NativeRegisterContextWindows_x86_64_h_
@@ -79,4 +79,4 @@
} // namespace lldb_private
#endif // liblldb_NativeRegisterContextWindows_x86_64_h_
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
Index: source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
===================================================================
--- source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
+++ source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#if defined(_WIN64)
+#if defined(__x86_64__) || defined(_M_X64)
#include "NativeRegisterContextWindows_x86_64.h"
#include "NativeRegisterContextWindows_WoW64.h"
@@ -476,9 +476,9 @@
const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
if (reg == LLDB_INVALID_REGNUM) {
// This is likely an internal register for lldb use only and should not be
- // directly queried.
+ // directly written.
error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
- "register, cannot read directly",
+ "register, cannot write directly",
reg_info->name);
return error;
}
@@ -576,4 +576,4 @@
return 0;
}
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
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(__i386__) || defined(_M_IX86)
#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(__i386__) || defined(_M_IX86)
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
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#if defined(_WIN32) && !defined(_WIN64)
+#if defined(__i386__) || defined(_M_IX86)
#include "NativeRegisterContextWindows_i386.h"
@@ -242,7 +242,6 @@
NativeRegisterContextWindows_i386::ReadRegister(const RegisterInfo *reg_info,
RegisterValue ®_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 ®_value) {
- Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
Status error;
if (!reg_info) {
@@ -278,20 +276,20 @@
const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
if (reg == LLDB_INVALID_REGNUM) {
// This is likely an internal register for lldb use only and should not be
- // directly queried.
+ // directly written.
error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
- "register, cannot read directly",
+ "register, cannot write directly",
reg_info->name);
return error;
}
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);
Index: source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
===================================================================
--- source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
+++ source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#if defined(_WIN64)
+#if defined(__x86_64__) || defined(_M_X64)
#ifndef liblldb_NativeRegisterContextWindows_WoW64_h_
#define liblldb_NativeRegisterContextWindows_WoW64_h_
@@ -71,4 +71,4 @@
} // namespace lldb_private
#endif // liblldb_NativeRegisterContextWindows_WoW64_h_
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
Index: source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
===================================================================
--- source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
+++ source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-#if defined(_WIN64)
+#if defined(__x86_64__) || defined(_M_X64)
#include "NativeRegisterContextWindows_WoW64.h"
@@ -265,9 +265,9 @@
const uint32_t reg = reg_info->kinds[lldb::eRegisterKindLLDB];
if (reg == LLDB_INVALID_REGNUM) {
// This is likely an internal register for lldb use only and should not be
- // directly queried.
+ // directly written.
error.SetErrorStringWithFormat("register \"%s\" is an internal-only lldb "
- "register, cannot read directly",
+ "register, cannot write directly",
reg_info->name);
return error;
}
@@ -359,4 +359,4 @@
return 0;
}
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits