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
36 static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
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 size_t CalculateNumChildren(uint32_t max) override;
51
52 ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
53 int32_t synthetic_index) override;
54
55 lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
56 bool can_create) override;
57
58 size_t GetIndexOfChildWithName(ConstString name) override;
59
60protected:
61 bool UpdateValue() override;
62
64
65 lldb::RegisterContextSP m_reg_ctx_sp;
66 const RegisterSet *m_reg_set;
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
86 static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
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 size_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
116 lldb::RegisterContextSP m_reg_ctx_sp;
117 RegisterInfo m_reg_info;
121
122private:
123 void ConstructObject(const RegisterInfo *reg_info);
124
126
127 ValueObjectRegister(ValueObject &parent, lldb::RegisterContextSP &reg_ctx_sp,
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:39
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
size_t GetIndexOfChildWithName(ConstString name) override
ValueObjectRegisterSet(const ValueObjectRegisterSet &)=delete
std::optional< uint64_t > GetByteSize() override
lldb::ValueObjectSP GetChildMemberWithName(ConstString name, bool can_create) 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)
size_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
size_t CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
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)
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.
@ eValueTypeRegister
stack frame register value
@ eValueTypeRegisterSet
A collection of stack frame register values.