brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · d8e8e81 Raw
81 lines · c
1//===-- NativeRegisterContextWindows_arm.h ----------------------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#if defined(__arm__) || defined(_M_ARM)10#ifndef liblldb_NativeRegisterContextWindows_arm_h_11#define liblldb_NativeRegisterContextWindows_arm_h_12 13#include "Plugins/Process/Utility/lldb-arm-register-enums.h"14 15#include "NativeRegisterContextWindows.h"16 17namespace lldb_private {18 19class NativeThreadWindows;20 21class NativeRegisterContextWindows_arm : public NativeRegisterContextWindows {22public:23  NativeRegisterContextWindows_arm(const ArchSpec &target_arch,24                                   NativeThreadProtocol &native_thread);25 26  uint32_t GetRegisterSetCount() const override;27 28  const RegisterSet *GetRegisterSet(uint32_t set_index) const override;29 30  Status ReadRegister(const RegisterInfo *reg_info,31                      RegisterValue &reg_value) override;32 33  Status WriteRegister(const RegisterInfo *reg_info,34                       const RegisterValue &reg_value) override;35 36  Status ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override;37 38  Status WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;39 40  Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;41 42  Status GetWatchpointHitIndex(uint32_t &wp_index,43                               lldb::addr_t trap_addr) override;44 45  Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;46 47  bool ClearHardwareWatchpoint(uint32_t wp_index) override;48 49  Status ClearAllHardwareWatchpoints() override;50 51  Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,52                                        uint32_t watch_flags,53                                        uint32_t wp_index);54 55  uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,56                                 uint32_t watch_flags) override;57 58  lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;59 60  uint32_t NumSupportedHardwareWatchpoints() override;61 62protected:63  Status GPRRead(const uint32_t reg, RegisterValue &reg_value);64 65  Status GPRWrite(const uint32_t reg, const RegisterValue &reg_value);66 67  Status FPRRead(const uint32_t reg, RegisterValue &reg_value);68 69  Status FPRWrite(const uint32_t reg, const RegisterValue &reg_value);70 71private:72  bool IsGPR(uint32_t reg_index) const;73 74  bool IsFPR(uint32_t reg_index) const;75};76 77} // namespace lldb_private78 79#endif // liblldb_NativeRegisterContextWindows_arm_h_80#endif // defined(__arm__) || defined(_M_ARM)81