]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - source/Plugins/Process/Windows/Common/RegisterContextWindows.h
Vendor import of lldb trunk r256945:
[FreeBSD/FreeBSD.git] / source / Plugins / Process / Windows / Common / RegisterContextWindows.h
1 //===-- RegisterContextWindows.h --------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_RegisterContextWindows_H_
11 #define liblldb_RegisterContextWindows_H_
12
13 #include "lldb/lldb-forward.h"
14 #include "lldb/Target/RegisterContext.h"
15
16 namespace lldb_private
17 {
18
19 class Thread;
20
21 class RegisterContextWindows : public lldb_private::RegisterContext
22 {
23   public:
24     //------------------------------------------------------------------
25     // Constructors and Destructors
26     //------------------------------------------------------------------
27     RegisterContextWindows(Thread &thread, uint32_t concrete_frame_idx);
28
29     virtual ~RegisterContextWindows();
30
31     //------------------------------------------------------------------
32     // Subclasses must override these functions
33     //------------------------------------------------------------------
34     void InvalidateAllRegisters() override;
35
36     bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
37
38     bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
39
40     uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override;
41
42     //------------------------------------------------------------------
43     // Subclasses can override these functions if desired
44     //------------------------------------------------------------------
45     uint32_t NumSupportedHardwareBreakpoints() override;
46
47     uint32_t SetHardwareBreakpoint(lldb::addr_t addr, size_t size) override;
48
49     bool ClearHardwareBreakpoint(uint32_t hw_idx) override;
50
51     uint32_t NumSupportedHardwareWatchpoints() override;
52
53     uint32_t SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read, bool write) override;
54
55     bool ClearHardwareWatchpoint(uint32_t hw_index) override;
56
57     bool HardwareSingleStep(bool enable) override;
58
59   protected:
60     virtual bool CacheAllRegisterValues();
61
62     CONTEXT m_context;
63     bool m_context_stale;
64 };
65 }
66
67 #endif // #ifndef liblldb_RegisterContextWindows_H_