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