LLDB mainline
ValueObjectRegister.h
Go to the documentation of this file.
1//===-- ValueObjectRegister.h -----------------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLDB_CORE_VALUEOBJECTREGISTER_H
10#define LLDB_CORE_VALUEOBJECTREGISTER_H
11
16#include "lldb/lldb-defines.h"
18#include "lldb/lldb-forward.h"
20
21#include <cstddef>
22#include <cstdint>
23#include <optional>
24
25namespace lldb_private {
26class DataExtractor;
27class Status;
28class ExecutionContextScope;
29class Scalar;
30class Stream;
31
33public:
35
37 lldb::RegisterContextSP &reg_ctx_sp,
38 uint32_t set_idx);
39
40 std::optional<uint64_t> GetByteSize() override;
41
42 lldb::ValueType GetValueType() const override {
44 }
45
46 ConstString GetTypeName() override;
47
49
50 llvm::Expected<uint32_t> CalculateNumChildren(uint32_t max) override;
51
52 ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
53 int32_t synthetic_index) override;
54
56 bool can_create = true) override;
57
58 size_t GetIndexOfChildWithName(llvm::StringRef name) override;
59
60protected:
61 bool UpdateValue() override;
62
64
67 uint32_t m_reg_set_idx;
68
69private:
71
73 ValueObjectManager &manager,
74 lldb::RegisterContextSP &reg_ctx_sp, uint32_t set_idx);
75
76 // For ValueObject only
80};
81
83public:
85
87 lldb::RegisterContextSP &reg_ctx_sp,
88 const RegisterInfo *reg_info);
89
90 std::optional<uint64_t> GetByteSize() override;
91
92 lldb::ValueType GetValueType() const override {
94 }
95
96 ConstString GetTypeName() override;
97
98 llvm::Expected<uint32_t> CalculateNumChildren(uint32_t max) override;
99
100 bool SetValueFromCString(const char *value_str, Status &error) override;
101
102 bool SetData(DataExtractor &data, Status &error) override;
103
104 bool ResolveValue(Scalar &scalar) override;
105
106 void
108 GetExpressionPathFormat epformat =
110
111protected:
112 bool UpdateValue() override;
113
115
121
122private:
123 void ConstructObject(const RegisterInfo *reg_info);
124
126
128 const RegisterInfo *reg_info);
130 ValueObjectManager &manager,
131 lldb::RegisterContextSP &reg_ctx_sp,
132 const RegisterInfo *reg_info);
133
134 // For ValueObject only
137};
138
139} // namespace lldb_private
140
141#endif // LLDB_CORE_VALUEOBJECTREGISTER_H
static llvm::raw_ostream & error(Stream &strm)
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
A uniqued constant string class.
Definition: ConstString.h:40
An data extractor class.
Definition: DataExtractor.h:48
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
ValueObjectRegisterSet(const ValueObjectRegisterSet &)=delete
std::optional< uint64_t > GetByteSize() override
size_t GetIndexOfChildWithName(llvm::StringRef name) override
lldb::ValueObjectSP GetChildMemberWithName(llvm::StringRef name, bool can_create=true) override
ValueObject * CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override
Should only be called by ValueObject::GetChildAtIndex().
lldb::ValueType GetValueType() const override
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::RegisterContextSP &reg_ctx_sp, uint32_t set_idx)
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
const ValueObjectRegisterSet & operator=(const ValueObjectRegisterSet &)=delete
bool SetValueFromCString(const char *value_str, Status &error) override
bool SetData(DataExtractor &data, Status &error) override
lldb::ValueType GetValueType() const override
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::RegisterContextSP &reg_ctx_sp, const RegisterInfo *reg_info)
llvm::Expected< uint32_t > CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
std::optional< uint64_t > GetByteSize() override
ValueObjectRegister(const ValueObjectRegister &)=delete
lldb::RegisterContextSP m_reg_ctx_sp
const ValueObjectRegister & operator=(const ValueObjectRegister &)=delete
CompilerType GetCompilerTypeImpl() override
void ConstructObject(const RegisterInfo *reg_info)
void GetExpressionPath(Stream &s, GetExpressionPathFormat epformat=eGetExpressionPathFormatDereferencePointers) override
bool ResolveValue(Scalar &scalar) override
A class that represents a running process on the host machine.
Definition: SBAttachInfo.h:14
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:472
std::shared_ptr< lldb_private::RegisterContext > RegisterContextSP
Definition: lldb-forward.h:386
@ eValueTypeRegister
stack frame register value
@ eValueTypeRegisterSet
A collection of stack frame register values.
Every register is described in detail including its name, alternate name (optional),...
Registers are grouped into register sets.