1 //===-- NativeRegisterContextDBReg_x86.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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef lldb_NativeRegisterContextDBReg_x86_h
10 #define lldb_NativeRegisterContextDBReg_x86_h
11 
12 #include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h"
13 
14 namespace lldb_private {
15 
16 class NativeRegisterContextDBReg_x86
17     : public virtual NativeRegisterContextRegisterInfo {
18 public:
19   Status IsWatchpointHit(uint32_t wp_index, bool &is_hit) override;
20 
21   Status GetWatchpointHitIndex(uint32_t &wp_index,
22                                lldb::addr_t trap_addr) override;
23 
24   Status IsWatchpointVacant(uint32_t wp_index, bool &is_vacant) override;
25 
26   bool ClearHardwareWatchpoint(uint32_t wp_index) override;
27 
28   Status ClearWatchpointHit(uint32_t wp_index) override;
29 
30   Status ClearAllHardwareWatchpoints() override;
31 
32   Status SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size,
33                                         uint32_t watch_flags,
34                                         uint32_t wp_index);
35 
36   uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size,
37                                  uint32_t watch_flags) override;
38 
39   lldb::addr_t GetWatchpointAddress(uint32_t wp_index) override;
40 
41   uint32_t NumSupportedHardwareWatchpoints() override;
42 
43   const RegisterInfo *GetDR(int num) const;
44 };
45 
46 } // namespace lldb_private
47 
48 #endif // #ifndef lldb_NativeRegisterContextDBReg_x86_h
49