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_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTDUMMY_H
11#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTDUMMY_H
12
13#include <vector>
14
17#include "lldb/lldb-private.h"
18
19namespace lldb_private {
20
22public:
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
47
48 bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
49
51 uint32_t num) override;
52
53private:
54 // For RegisterContextLLDB only
55
56 lldb_private::RegisterSet m_reg_set0; // register set 0 (PC only)
58
61};
62
63} // namespace lldb_private
64
65#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTDUMMY_H
std::shared_ptr< RegisterContextDummy > SharedPtr
RegisterContextDummy(const RegisterContextDummy &)=delete
bool ReadAllRegisterValues(lldb::WritableDataBufferSP &data_sp) override
const RegisterContextDummy & operator=(const RegisterContextDummy &)=delete
uint32_t ConvertRegisterKindToRegisterNumber(lldb::RegisterKind kind, uint32_t num) override
Convert from a given register numbering scheme to the lldb register numbering scheme.
bool WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override
bool WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value) override
const lldb_private::RegisterSet * GetRegisterSet(size_t reg_set) override
lldb_private::RegisterSet m_reg_set0
bool ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value) override
lldb_private::RegisterInfo m_pc_reg_info
const lldb_private::RegisterInfo * GetRegisterInfoAtIndex(size_t reg) override
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::DataBuffer > DataBufferSP
Definition: lldb-forward.h:334
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
Definition: lldb-forward.h:335
RegisterKind
Register numbering types.
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.