summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-10-15 08:31:52 +0000
committerMartin Storsjo <martin@martin.st>2019-10-15 08:31:52 +0000
commitb1f6ba2a2ecdf253c1ee2f2a04156eba78cfe3fa (patch)
tree12c30dbf9168c5c60af7e895ff542d1d4273b22b /lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
parentda92ed8365aa5506c4991b9075f57aeeb7f6f70a (diff)
downloadbcm5719-llvm-b1f6ba2a2ecdf253c1ee2f2a04156eba78cfe3fa.tar.gz
bcm5719-llvm-b1f6ba2a2ecdf253c1ee2f2a04156eba78cfe3fa.zip
[LLDB] [Windows] Initial support for ARM64 register contexts
Differential Revision: https://reviews.llvm.org/D67954 llvm-svn: 374866
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h')
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
new file mode 100644
index 00000000000..fbf4d1f163f
--- /dev/null
+++ b/lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_arm64.h
@@ -0,0 +1,80 @@
+//===-- NativeRegisterContextWindows_arm64.h --------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#if defined(__aarch64__) || defined(_M_ARM64)
+#ifndef liblldb_NativeRegisterContextWindows_arm64_h_
+#define liblldb_NativeRegisterContextWindows_arm64_h_
+
+#include "Plugins/Process/Utility/lldb-arm64-register-enums.h"
+
+#include "NativeRegisterContextWindows.h"
+
+namespace lldb_private {
+
+class NativeThreadWindows;
+
+class NativeRegisterContextWindows_arm64 : public NativeRegisterContextWindows {
+public:
+ NativeRegisterContextWindows_arm64(const ArchSpec &target_arch,
+ NativeThreadProtocol &native_thread);
+
+ uint32_t GetRegisterSetCount() const override;
+
+ const RegisterSet *GetRegisterSet(uint32_t set_index) const override;
+
+ Status ReadRegister(const RegisterInfo *reg_info,
+ RegisterValue &reg_value) override;
+
+ Status WriteRegister(const RegisterInfo *reg_info,
+ const RegisterValue &reg_value) override;
+
+ Status ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
+
+ Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
+
+ Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
+
+ Status GetWatchpointHitIndex(uint32_t &wp_index,
+ lldb::addr_t trap_addr) override;
+
+ Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
+
+ bool ClearHardwareWatchpoint(uint32_t wp_index) override;
+
+ Status ClearAllHardwareWatchpoints() override;
+
+ Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
+ uint32_t watch_flags,
+ uint32_t wp_index);
+
+ uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
+ uint32_t watch_flags) override;
+
+ lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;
+
+ uint32_t NumSupportedHardwareWatchpoints() override;
+
+protected:
+ Status GPRRead(const uint32_t reg, RegisterValue &reg_value);
+
+ Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+ Status FPRRead(const uint32_t reg, RegisterValue &reg_value);
+
+ Status FPRWrite(const uint32_t reg, const RegisterValue &reg_value);
+
+private:
+ bool IsGPR(uint32_t reg_index) const;
+
+ bool IsFPR(uint32_t reg_index) const;
+};
+
+} // namespace lldb_private
+
+#endif // liblldb_NativeRegisterContextWindows_arm64_h_
+#endif // defined(__aarch64__) || defined(_M_ARM64)
OpenPOWER on IntegriCloud