LLDB  mainline
RegisterContextDummy.h
Go to the documentation of this file.
1 //===-- RegisterContextDummy.h ----------------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef lldb_RegisterContextDummy_h_
11 #define lldb_RegisterContextDummy_h_
12 
13 #include <vector>
14 
17 #include "lldb/lldb-private.h"
18 
19 namespace lldb_private {
20 
22 public:
23  typedef std::shared_ptr<RegisterContextDummy> SharedPtr;
24 
25  RegisterContextDummy(Thread &thread, uint32_t concrete_frame_idx,
26  uint32_t address_byte_size);
27 
28  ~RegisterContextDummy() override;
29 
30  void InvalidateAllRegisters() override;
31 
32  size_t GetRegisterCount() override;
33 
34  const lldb_private::RegisterInfo *GetRegisterInfoAtIndex(size_t reg) override;
35 
36  size_t GetRegisterSetCount() override;
37 
38  const lldb_private::RegisterSet *GetRegisterSet(size_t reg_set) override;
39 
40  bool ReadRegister(const lldb_private::RegisterInfo *reg_info,
41  lldb_private::RegisterValue &value) override;
42 
43  bool WriteRegister(const lldb_private::RegisterInfo *reg_info,
44  const lldb_private::RegisterValue &value) override;
45 
46  bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
47 
48  bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
49 
51  uint32_t num) override;
52 
53 private:
54  // For RegisterContextLLDB only
55 
56  lldb_private::RegisterSet m_reg_set0; // register set 0 (PC only)
57  lldb_private::RegisterInfo m_pc_reg_info;
58 
59  DISALLOW_COPY_AND_ASSIGN(RegisterContextDummy);
60 };
61 
62 } // namespace lldb_private
63 
64 #endif // lldb_RegisterContextDummy_h_
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override
std::shared_ptr< RegisterContextDummy > SharedPtr
const lldb_private::RegisterSet * GetRegisterSet(size_t reg_set) override
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override
Convert from a given register numbering scheme to the lldb register numbering scheme.
RegisterContextDummy(Thread &thread, uint32_t concrete_frame_idx, uint32_t address_byte_size)
bool WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
bool ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override