summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Windows
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2019-08-27 17:22:03 +0000
committerTatyana Krasnukha <tatyana@synopsys.com>2019-08-27 17:22:03 +0000
commit900f9ba217171b090e8c49830b7f744fa6d28f4f (patch)
treec555b457394de63ed2c944c6f0c1721d09cf773f /lldb/source/Plugins/Process/Windows
parent6fd3960066f1f04b4e35a232e91efd11774f4f59 (diff)
downloadbcm5719-llvm-900f9ba217171b090e8c49830b7f744fa6d28f4f.tar.gz
bcm5719-llvm-900f9ba217171b090e8c49830b7f744fa6d28f4f.zip
[lldb] Fix x86 compilation
Differential Revision: https://reviews.llvm.org/D66655 Patch by Leonid Mashinskiy llvm-svn: 370078
Diffstat (limited to 'lldb/source/Plugins/Process/Windows')
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp8
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h4
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp12
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h4
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp8
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h4
6 files changed, 19 insertions, 21 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
index 97b0b76b697..8128d5550c4 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.cpp
+++ b/lldb/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 @@ Status NativeRegisterContextWindows_WoW64::WriteRegister(
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 @@ uint32_t NativeRegisterContextWindows_WoW64::NumSupportedHardwareWatchpoints() {
return 0;
}
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
index 1db0bb1f2cc..473a9dd5d64 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_WoW64.h
+++ b/lldb/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 @@ private:
} // namespace lldb_private
#endif // liblldb_NativeRegisterContextWindows_WoW64_h_
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
index 113725c9f92..eb7b4b86f05 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.cpp
+++ b/lldb/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 @@ Status
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 @@ NativeRegisterContextWindows_i386::ReadRegister(const RegisterInfo *reg_info,
Status NativeRegisterContextWindows_i386::WriteRegister(
const RegisterInfo *reg_info, const RegisterValue &reg_value) {
- Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_REGISTERS);
Status error;
if (!reg_info) {
@@ -278,20 +276,20 @@ Status NativeRegisterContextWindows_i386::WriteRegister(
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);
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
index 0ea0148e7e6..1e1689cc957 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_i386.h
+++ b/lldb/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 @@ private:
} // namespace lldb_private
#endif // liblldb_NativeRegisterContextWindows_i386_h_
-#endif // defined(_WIN64)
+#endif // defined(__i386__) || defined(_M_IX86)
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
index f72eae8dbd0..f202bda3fbe 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp
+++ b/lldb/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 @@ Status NativeRegisterContextWindows_x86_64::WriteRegister(
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 @@ NativeRegisterContextWindows_x86_64::NumSupportedHardwareWatchpoints() {
return 0;
}
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
index 5c12b0c2d3d..49f541efa64 100644
--- a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.h
+++ b/lldb/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 @@ private:
} // namespace lldb_private
#endif // liblldb_NativeRegisterContextWindows_x86_64_h_
-#endif // defined(_WIN64)
+#endif // defined(__x86_64__) || defined(_M_X64)
OpenPOWER on IntegriCloud