RegisterContextPOSIXProcessMonitor_powerpc.h revision 287506
1//===-- RegisterContextPOSIXProcessMonitor_powerpc.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_RegisterContextPOSIXProcessMonitor_powerpc_H_
11#define liblldb_RegisterContextPOSIXProcessMonitor_powerpc_H_
12
13#include "Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h"
14
15class RegisterContextPOSIXProcessMonitor_powerpc:
16    public RegisterContextPOSIX_powerpc,
17    public POSIXBreakpointProtocol
18{
19public:
20    RegisterContextPOSIXProcessMonitor_powerpc(lldb_private::Thread &thread,
21                                              uint32_t concrete_frame_idx,
22                                              lldb_private::RegisterInfoInterface *register_info);
23
24protected:
25    bool
26    IsVMX();
27
28    bool
29    ReadGPR();
30
31    bool
32    ReadFPR();
33
34    bool
35    ReadVMX();
36
37    bool
38    WriteGPR();
39
40    bool
41    WriteFPR();
42
43    bool
44    WriteVMX();
45
46    // lldb_private::RegisterContext
47    bool
48    ReadRegister(const unsigned reg, lldb_private::RegisterValue &value);
49
50    bool
51    WriteRegister(const unsigned reg, const lldb_private::RegisterValue &value);
52
53    bool
54    ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
55
56    bool
57    WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
58
59    bool
60    ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
61
62    bool
63    WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
64
65    uint32_t
66    SetHardwareWatchpoint(lldb::addr_t addr, size_t size, bool read, bool write);
67
68    bool
69    ClearHardwareWatchpoint(uint32_t hw_index);
70
71    bool
72    HardwareSingleStep(bool enable);
73
74    // POSIXBreakpointProtocol
75    bool
76    UpdateAfterBreakpoint();
77
78    unsigned
79    GetRegisterIndexFromOffset(unsigned offset);
80
81    bool
82    IsWatchpointHit(uint32_t hw_index);
83
84    bool
85    ClearWatchpointHits();
86
87    lldb::addr_t
88    GetWatchpointAddress(uint32_t hw_index);
89
90    bool
91    IsWatchpointVacant(uint32_t hw_index);
92
93    bool
94    SetHardwareWatchpointWithIndex(lldb::addr_t addr, size_t size, bool read, bool write, uint32_t hw_index);
95
96    uint32_t
97    NumSupportedHardwareWatchpoints();
98
99private:
100    ProcessMonitor &
101    GetMonitor();
102};
103
104#endif
105