LLDB  mainline
RegisterContextHistory.h
Go to the documentation of this file.
1 //===-- RegisterContextHistory.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_RegisterContextHistory_h_
11 #define lldb_RegisterContextHistory_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<RegisterContextHistory> SharedPtr;
24 
25  RegisterContextHistory(Thread &thread, uint32_t concrete_frame_idx,
26  uint32_t address_byte_size, lldb::addr_t pc_value);
27 
28  ~RegisterContextHistory() 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  lldb::addr_t m_pc_value;
60 
61  DISALLOW_COPY_AND_ASSIGN(RegisterContextHistory);
62 };
63 } // namespace lldb_private
64 
65 #endif // lldb_RegisterContextHistory_h_
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
bool ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override
std::shared_ptr< RegisterContextHistory > SharedPtr
RegisterContextHistory(Thread &thread, uint32_t concrete_frame_idx, uint32_t address_byte_size, lldb::addr_t pc_value)
bool ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override
Convert from a given register numbering scheme to the lldb register numbering scheme.
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
uint64_t addr_t
Definition: lldb-types.h:83
const lldb_private::RegisterSet * GetRegisterSet(size_t reg_set) override
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
bool WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override