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 
12 #include "lldb/Core/ValueObject.h"
16 #include "lldb/lldb-defines.h"
17 #include "lldb/lldb-enumerations.h"
18 #include "lldb/lldb-forward.h"
20 
21 #include <stddef.h>
22 #include <stdint.h>
23 
24 namespace lldb_private {
25 class DataExtractor;
26 class Status;
27 class ExecutionContextScope;
28 class Scalar;
29 class Stream;
30 
32 public:
33  ~ValueObjectRegisterSet() override;
34 
35  static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
36  lldb::RegisterContextSP &reg_ctx_sp,
37  uint32_t set_idx);
38 
39  uint64_t GetByteSize() override;
40 
41  lldb::ValueType GetValueType() const override {
43  }
44 
45  ConstString GetTypeName() override;
46 
48 
49  size_t CalculateNumChildren(uint32_t max) override;
50 
51  ValueObject *CreateChildAtIndex(size_t idx, bool synthetic_array_member,
52  int32_t synthetic_index) override;
53 
54  lldb::ValueObjectSP GetChildMemberWithName(ConstString name,
55  bool can_create) override;
56 
57  size_t GetIndexOfChildWithName(ConstString name) override;
58 
59 protected:
60  bool UpdateValue() override;
61 
63 
64  lldb::RegisterContextSP m_reg_ctx_sp;
65  const RegisterSet *m_reg_set;
67 
68 private:
70 
72  ValueObjectManager &manager,
73  lldb::RegisterContextSP &reg_ctx_sp, uint32_t set_idx);
74 
75  // For ValueObject only
77 };
78 
80 public:
81  ~ValueObjectRegister() override;
82 
83  static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope,
84  lldb::RegisterContextSP &reg_ctx_sp,
85  uint32_t reg_num);
86 
87  uint64_t GetByteSize() override;
88 
89  lldb::ValueType GetValueType() const override {
91  }
92 
93  ConstString GetTypeName() override;
94 
95  size_t CalculateNumChildren(uint32_t max) override;
96 
97  bool SetValueFromCString(const char *value_str, Status &error) override;
98 
99  bool SetData(DataExtractor &data, Status &error) override;
100 
101  bool ResolveValue(Scalar &scalar) override;
102 
103  void
105  GetExpressionPathFormat epformat =
107 
108 protected:
109  bool UpdateValue() override;
110 
112 
113  lldb::RegisterContextSP m_reg_ctx_sp;
114  RegisterInfo m_reg_info;
118 
119 private:
120  void ConstructObject(uint32_t reg_num);
121 
123 
124  ValueObjectRegister(ValueObject &parent, lldb::RegisterContextSP &reg_ctx_sp,
125  uint32_t reg_num);
127  ValueObjectManager &manager,
128  lldb::RegisterContextSP &reg_ctx_sp, uint32_t reg_num);
129 
130  // For ValueObject only
132 };
133 
134 } // namespace lldb_private
135 
136 #endif // LLDB_CORE_VALUEOBJECTREGISTER_H
An data extractor class.
Definition: DataExtractor.h:46
A class that represents a running process on the host machine.
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
lldb::ValueType GetValueType() const override
virtual bool SetValueFromCString(const char *value_str, Status &error)
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::RegisterContextSP &reg_ctx_sp, uint32_t set_idx)
A collection of stack frame register values.
virtual void GetExpressionPath(Stream &s, GetExpressionPathFormat=eGetExpressionPathFormatDereferencePointers)
ValueObject * CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override
virtual bool SetData(DataExtractor &data, Status &error)
virtual bool ResolveValue(Scalar &scalar)
DISALLOW_COPY_AND_ASSIGN(ValueObjectRegisterSet)
size_t CalculateNumChildren(uint32_t max) override
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
lldb::ValueObjectSP GetChildMemberWithName(ConstString name, bool can_create) override
ValueObjectRegisterSet(ExecutionContextScope *exe_scope, ValueObjectManager &manager, lldb::RegisterContextSP &reg_ctx_sp, uint32_t set_idx)
A uniqued constant string class.
Definition: ConstString.h:40
lldb::RegisterContextSP m_reg_ctx_sp
Represents a generic type in a programming language.
Definition: CompilerType.h:33
lldb::ValueType GetValueType() const override
stack frame register value
size_t GetIndexOfChildWithName(ConstString name) override
An error handling class.
Definition: Status.h:44