LLDB  mainline
ValueObjectSyntheticFilter.cpp
Go to the documentation of this file.
1 //===-- ValueObjectSyntheticFilter.cpp ------------------------------------===//
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 
10 
11 #include "lldb/Core/Value.h"
12 #include "lldb/Core/ValueObject.h"
15 #include "lldb/Utility/LLDBLog.h"
16 #include "lldb/Utility/Log.h"
17 #include "lldb/Utility/Status.h"
18 
19 #include "llvm/ADT/STLExtras.h"
20 #include <optional>
21 
22 namespace lldb_private {
23 class Declaration;
24 }
25 
26 using namespace lldb_private;
27 
29 public:
31  : SyntheticChildrenFrontEnd(backend) {}
32 
33  size_t CalculateNumChildren() override { return m_backend.GetNumChildren(); }
34 
35  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override {
36  return m_backend.GetChildAtIndex(idx, true);
37  }
38 
39  size_t GetIndexOfChildWithName(ConstString name) override {
40  return m_backend.GetIndexOfChildWithName(name);
41  }
42 
43  bool MightHaveChildren() override { return true; }
44 
45  bool Update() override { return false; }
46 };
47 
49  lldb::SyntheticChildrenSP filter)
50  : ValueObject(parent), m_synth_sp(std::move(filter)), m_children_byindex(),
51  m_name_toindex(), m_synthetic_children_cache(),
52  m_synthetic_children_count(UINT32_MAX),
53  m_parent_type_name(parent.GetTypeName()),
54  m_might_have_children(eLazyBoolCalculate),
55  m_provides_value(eLazyBoolCalculate) {
56  SetName(parent.GetName());
57  // Copying the data of an incomplete type won't work as it has no byte size.
61 }
62 
64 
66  return m_parent->GetCompilerType();
67 }
68 
70  return m_parent->GetTypeName();
71 }
72 
75 }
76 
78  if (ConstString synth_name = m_synth_filter_up->GetSyntheticTypeName())
79  return synth_name;
80 
81  return m_parent->GetDisplayTypeName();
82 }
83 
86 
90 
91  if (max < UINT32_MAX) {
92  size_t num_children = m_synth_filter_up->CalculateNumChildren(max);
93  LLDB_LOGF(log,
94  "[ValueObjectSynthetic::CalculateNumChildren] for VO of name "
95  "%s and type %s, the filter returned %zu child values",
96  GetName().AsCString(), GetTypeName().AsCString(), num_children);
97  return num_children;
98  } else {
99  size_t num_children = (m_synthetic_children_count =
100  m_synth_filter_up->CalculateNumChildren(max));
101  LLDB_LOGF(log,
102  "[ValueObjectSynthetic::CalculateNumChildren] for VO of name "
103  "%s and type %s, the filter returned %zu child values",
104  GetName().AsCString(), GetTypeName().AsCString(), num_children);
105  return num_children;
106  }
107 }
108 
109 lldb::ValueObjectSP
111  if (!m_parent)
112  return lldb::ValueObjectSP();
113  if (IsDynamic() && GetDynamicValueType() == valueType)
114  return GetSP();
115  return m_parent->GetDynamicValue(valueType);
116 }
117 
121  (m_synth_filter_up->MightHaveChildren() ? eLazyBoolYes : eLazyBoolNo);
123 }
124 
125 std::optional<uint64_t> ValueObjectSynthetic::GetByteSize() {
126  return m_parent->GetByteSize();
127 }
128 
130  return m_parent->GetValueType();
131 }
132 
134  ValueObject *valobj_for_frontend = m_parent;
135  if (m_synth_sp->WantsDereference())
136  {
138  if (type.IsValid() && type.IsPointerOrReferenceType())
139  {
140  Status error;
141  lldb::ValueObjectSP deref_sp = m_parent->Dereference(error);
142  if (error.Success())
143  valobj_for_frontend = deref_sp.get();
144  }
145  }
146  m_synth_filter_up = (m_synth_sp->GetFrontEnd(*valobj_for_frontend));
147  if (!m_synth_filter_up)
148  m_synth_filter_up = std::make_unique<DummySyntheticFrontEnd>(*m_parent);
149 }
150 
153 
154  SetValueIsValid(false);
155  m_error.Clear();
156 
157  if (!m_parent->UpdateValueIfNeeded(false)) {
158  // our parent could not update.. as we are meaningless without a parent,
159  // just stop
160  if (m_parent->GetError().Fail())
162  return false;
163  }
164 
165  // regenerate the synthetic filter if our typename changes
166  // <rdar://problem/12424824>
167  ConstString new_parent_type_name = m_parent->GetTypeName();
168  if (new_parent_type_name != m_parent_type_name) {
169  LLDB_LOGF(log,
170  "[ValueObjectSynthetic::UpdateValue] name=%s, type changed "
171  "from %s to %s, recomputing synthetic filter",
172  GetName().AsCString(), m_parent_type_name.AsCString(),
173  new_parent_type_name.AsCString());
174  m_parent_type_name = new_parent_type_name;
176  }
177 
178  // let our backend do its update
179  if (!m_synth_filter_up->Update()) {
180  LLDB_LOGF(log,
181  "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
182  "filter said caches are stale - clearing",
183  GetName().AsCString());
184  // filter said that cached values are stale
185  {
186  std::lock_guard<std::mutex> guard(m_child_mutex);
187  m_children_byindex.clear();
188  m_name_toindex.clear();
189  }
190  // usually, an object's value can change but this does not alter its
191  // children count for a synthetic VO that might indeed happen, so we need
192  // to tell the upper echelons that they need to come back to us asking for
193  // children
195  {
196  std::lock_guard<std::mutex> guard(m_child_mutex);
198  }
201  } else {
202  LLDB_LOGF(log,
203  "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
204  "filter said caches are still valid",
205  GetName().AsCString());
206  }
207 
209 
210  lldb::ValueObjectSP synth_val(m_synth_filter_up->GetSyntheticValue());
211 
212  if (synth_val && synth_val->CanProvideValue()) {
213  LLDB_LOGF(log,
214  "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
215  "filter said it can provide a value",
216  GetName().AsCString());
217 
219  CopyValueData(synth_val.get());
220  } else {
221  LLDB_LOGF(log,
222  "[ValueObjectSynthetic::UpdateValue] name=%s, synthetic "
223  "filter said it will not provide a value",
224  GetName().AsCString());
225 
227  // Copying the data of an incomplete type won't work as it has no byte size.
230  }
231 
232  SetValueIsValid(true);
233  return true;
234 }
235 
236 lldb::ValueObjectSP ValueObjectSynthetic::GetChildAtIndex(size_t idx,
237  bool can_create) {
239 
240  LLDB_LOGF(log,
241  "[ValueObjectSynthetic::GetChildAtIndex] name=%s, retrieving "
242  "child at index %zu",
243  GetName().AsCString(), idx);
244 
246 
247  ValueObject *valobj;
248  bool child_is_cached;
249  {
250  std::lock_guard<std::mutex> guard(m_child_mutex);
251  auto cached_child_it = m_children_byindex.find(idx);
252  child_is_cached = cached_child_it != m_children_byindex.end();
253  if (child_is_cached)
254  valobj = cached_child_it->second;
255  }
256 
257  if (!child_is_cached) {
258  if (can_create && m_synth_filter_up != nullptr) {
259  LLDB_LOGF(log,
260  "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
261  "index %zu not cached and will be created",
262  GetName().AsCString(), idx);
263 
264  lldb::ValueObjectSP synth_guy = m_synth_filter_up->GetChildAtIndex(idx);
265 
266  LLDB_LOGF(
267  log,
268  "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at index "
269  "%zu created as %p (is "
270  "synthetic: %s)",
271  GetName().AsCString(), idx, static_cast<void *>(synth_guy.get()),
272  synth_guy.get()
273  ? (synth_guy->IsSyntheticChildrenGenerated() ? "yes" : "no")
274  : "no");
275 
276  if (!synth_guy)
277  return synth_guy;
278 
279  {
280  std::lock_guard<std::mutex> guard(m_child_mutex);
281  if (synth_guy->IsSyntheticChildrenGenerated())
282  m_synthetic_children_cache.push_back(synth_guy);
283  m_children_byindex[idx] = synth_guy.get();
284  }
285  synth_guy->SetPreferredDisplayLanguageIfNeeded(
287  return synth_guy;
288  } else {
289  LLDB_LOGF(log,
290  "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
291  "index %zu not cached and cannot "
292  "be created (can_create = %s, synth_filter = %p)",
293  GetName().AsCString(), idx, can_create ? "yes" : "no",
294  static_cast<void *>(m_synth_filter_up.get()));
295 
296  return lldb::ValueObjectSP();
297  }
298  } else {
299  LLDB_LOGF(log,
300  "[ValueObjectSynthetic::GetChildAtIndex] name=%s, child at "
301  "index %zu cached as %p",
302  GetName().AsCString(), idx, static_cast<void *>(valobj));
303 
304  return valobj->GetSP();
305  }
306 }
307 
308 lldb::ValueObjectSP
310  bool can_create) {
312 
313  uint32_t index = GetIndexOfChildWithName(name);
314 
315  if (index == UINT32_MAX)
316  return lldb::ValueObjectSP();
317 
318  return GetChildAtIndex(index, can_create);
319 }
320 
323 
324  uint32_t found_index = UINT32_MAX;
325  bool did_find;
326  {
327  std::lock_guard<std::mutex> guard(m_child_mutex);
328  auto name_to_index = m_name_toindex.find(name.GetCString());
329  did_find = name_to_index != m_name_toindex.end();
330  if (did_find)
331  found_index = name_to_index->second;
332  }
333 
334  if (!did_find && m_synth_filter_up != nullptr) {
335  uint32_t index = m_synth_filter_up->GetIndexOfChildWithName(name);
336  if (index == UINT32_MAX)
337  return index;
338  std::lock_guard<std::mutex> guard(m_child_mutex);
339  m_name_toindex[name.GetCString()] = index;
340  return index;
341  } else if (!did_find && m_synth_filter_up == nullptr)
342  return UINT32_MAX;
343  else /*if (iter != m_name_toindex.end())*/
344  return found_index;
345 }
346 
348 
350  return m_parent->GetSP();
351 }
352 
354  m_value = (source->UpdateValueIfNeeded(), source->GetValue());
356  m_error = m_value.GetValueAsData(&exe_ctx, m_data, GetModule().get());
357 }
358 
360  if (!UpdateValueIfNeeded())
361  return false;
363  return true;
364  return m_parent->CanProvideValue();
365 }
366 
367 bool ValueObjectSynthetic::SetValueFromCString(const char *value_str,
368  Status &error) {
369  return m_parent->SetValueFromCString(value_str, error);
370 }
371 
373  if (m_parent) {
375  m_parent->SetFormat(format);
376  }
377  this->ValueObject::SetFormat(format);
379 }
380 
382  lldb::LanguageType lang) {
384  if (m_parent)
386 }
387 
390  if (m_parent)
393  } else
395 }
396 
398  if (m_parent)
400  return false;
401 }
402 
404  if (m_parent)
407 }
408 
410  if (m_parent)
411  return m_parent->GetDeclaration(decl);
412 
413  return ValueObject::GetDeclaration(decl);
414 }
415 
417  if (m_parent)
418  return m_parent->GetLanguageFlags();
419  return this->ValueObject::GetLanguageFlags();
420 }
421 
423  if (m_parent)
424  m_parent->SetLanguageFlags(flags);
425  else
426  this->ValueObject::SetLanguageFlags(flags);
427 }
DummySyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: ValueObjectSyntheticFilter.cpp:39
lldb_private::CompilerType::IsPointerOrReferenceType
bool IsPointerOrReferenceType(CompilerType *pointee_type=nullptr) const
Definition: CompilerType.cpp:193
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::ValueObject::IsInScope
virtual bool IsInScope()
Definition: ValueObject.h:420
lldb_private::ValueObject::CanProvideValue
virtual bool CanProvideValue()
Definition: ValueObject.cpp:3115
lldb_private::ValueObjectSynthetic::m_provides_value
LazyBool m_provides_value
Definition: ValueObjectSyntheticFilter.h:160
lldb_private::ValueObjectSynthetic::m_synthetic_children_cache
SyntheticChildrenCache m_synthetic_children_cache
Guarded by m_child_mutex;.
Definition: ValueObjectSyntheticFilter.h:150
lldb_private::ValueObject::ClearUserVisibleData
void ClearUserVisibleData(uint32_t items=ValueObject::eClearUserVisibleDataItemsAllStrings)
Definition: ValueObject.cpp:2941
lldb_private::ValueObject::SetValueIsValid
void SetValueIsValid(bool valid)
Definition: ValueObject.h:980
lldb_private::ValueObjectSynthetic::SetPreferredDisplayLanguage
void SetPreferredDisplayLanguage(lldb::LanguageType)
Definition: ValueObjectSyntheticFilter.cpp:381
lldb::Format
Format
Display format definitions.
Definition: lldb-enumerations.h:156
lldb_private::ValueObject::SetLanguageFlags
virtual void SetLanguageFlags(uint64_t flags)
Definition: ValueObject.h:791
lldb_private::ValueObject::GetValue
const Value & GetValue() const
Definition: ValueObject.h:497
lldb_private::ValueObjectSynthetic::GetDynamicValueType
virtual lldb::DynamicValueType GetDynamicValueType()
Definition: ValueObjectSyntheticFilter.h:80
lldb_private::Value::GetValueAsData
Status GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data, Module *module)
Definition: Value.cpp:299
lldb_private::ValueObjectSynthetic::m_synthetic_children_count
uint32_t m_synthetic_children_count
Definition: ValueObjectSyntheticFilter.h:154
lldb_private::ValueObjectSynthetic::m_synth_filter_up
std::unique_ptr< SyntheticChildrenFrontEnd > m_synth_filter_up
Definition: ValueObjectSyntheticFilter.h:135
lldb_private::ValueObjectSynthetic::IsDynamic
bool IsDynamic() override
Definition: ValueObjectSyntheticFilter.h:72
lldb_private::ValueObjectSynthetic::CreateSynthFilter
virtual void CreateSynthFilter()
Definition: ValueObjectSyntheticFilter.cpp:133
lldb_private::ValueObject::SetFormat
virtual void SetFormat(lldb::Format format)
Definition: ValueObject.h:705
lldb_private::eLazyBoolYes
@ eLazyBoolYes
Definition: lldb-private-enumerations.h:115
lldb_private::CompilerType::IsCompleteType
bool IsCompleteType() const
Definition: CompilerType.cpp:91
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:344
lldb_private::ValueObjectSynthetic::GetByteSize
std::optional< uint64_t > GetByteSize() override
Definition: ValueObjectSyntheticFilter.cpp:125
lldb_private::ValueObjectSynthetic::SetSyntheticChildrenGenerated
void SetSyntheticChildrenGenerated(bool b) override
Definition: ValueObjectSyntheticFilter.cpp:403
lldb_private::ValueObjectSynthetic::SetLanguageFlags
void SetLanguageFlags(uint64_t flags) override
Definition: ValueObjectSyntheticFilter.cpp:422
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:443
lldb_private::SyntheticChildrenFrontEnd
Definition: TypeSynthetic.h:27
DummySyntheticFrontEnd::Update
bool Update() override
Definition: ValueObjectSyntheticFilter.cpp:45
lldb_private::ValueObject::IsSyntheticChildrenGenerated
virtual bool IsSyntheticChildrenGenerated()
Definition: ValueObject.h:641
lldb_private::ConstString::AsCString
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
Definition: ConstString.h:192
lldb_private::ValueObject::SetPreferredDisplayLanguage
void SetPreferredDisplayLanguage(lldb::LanguageType lt)
Definition: ValueObject.h:713
lldb_private::ValueObjectSynthetic::~ValueObjectSynthetic
~ValueObjectSynthetic() override
lldb_private::ValueObject::ValueObjectSynthetic
friend class ValueObjectSynthetic
Definition: ValueObject.h:935
lldb_private::ValueObject::GetQualifiedTypeName
virtual ConstString GetQualifiedTypeName()
Definition: ValueObject.h:369
lldb_private::ValueObjectSynthetic::GetDynamicValue
lldb::ValueObjectSP GetDynamicValue(lldb::DynamicValueType valueType) override
Definition: ValueObjectSyntheticFilter.cpp:110
lldb_private::ValueObject::m_preferred_display_language
lldb::LanguageType m_preferred_display_language
Definition: ValueObject.h:900
lldb_private::ValueObjectSynthetic::UpdateValue
bool UpdateValue() override
Definition: ValueObjectSyntheticFilter.cpp:151
lldb_private::ValueObjectSynthetic::m_name_toindex
NameToIndexMap m_name_toindex
Guarded by m_child_mutex;.
Definition: ValueObjectSyntheticFilter.h:148
lldb_private::ValueObjectSynthetic::m_child_mutex
std::mutex m_child_mutex
Definition: ValueObjectSyntheticFilter.h:144
lldb_private::ValueObject::GetTypeName
virtual ConstString GetTypeName()
Definition: ValueObject.h:365
lldb_private::ValueObject::GetError
const Status & GetError()
Definition: ValueObject.cpp:284
ValueObjectSyntheticFilter.h
lldb_private::ValueObject::GetDynamicValue
virtual lldb::ValueObjectSP GetDynamicValue(lldb::DynamicValueType valueType)
Definition: ValueObject.cpp:1844
lldb_private::ValueObjectSynthetic::IsSyntheticChildrenGenerated
bool IsSyntheticChildrenGenerated() override
Definition: ValueObjectSyntheticFilter.cpp:397
lldb_private::ValueObject::m_data
DataExtractor m_data
A data extractor that can be used to extract the value.
Definition: ValueObject.h:851
lldb_private::ValueObject::SetSyntheticChildrenGenerated
virtual void SetSyntheticChildrenGenerated(bool b)
Definition: ValueObject.h:645
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::ValueObjectSynthetic::MightHaveChildren
bool MightHaveChildren() override
Find out if a ValueObject might have children.
Definition: ValueObjectSyntheticFilter.cpp:118
lldb_private::ValueObjectSynthetic::CalculateNumChildren
size_t CalculateNumChildren(uint32_t max) override
Should only be called by ValueObject::GetNumChildren().
Definition: ValueObjectSyntheticFilter.cpp:84
lldb_private::ValueObjectSynthetic::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create) override
Definition: ValueObjectSyntheticFilter.cpp:236
lldb_private::ValueObject::Dereference
virtual lldb::ValueObjectSP Dereference(Status &error)
Definition: ValueObject.cpp:2642
Log.h
lldb_private::ValueObject::eClearUserVisibleDataItemsAll
@ eClearUserVisibleDataItemsAll
Definition: ValueObject.h:193
lldb_private::ValueObject::GetSP
lldb::ValueObjectSP GetSP()
Definition: ValueObject.h:555
lldb_private::ValueObjectSynthetic::GetDisplayTypeName
ConstString GetDisplayTypeName() override
Definition: ValueObjectSyntheticFilter.cpp:77
lldb_private::Status::Fail
bool Fail() const
Test for error condition.
Definition: Status.cpp:181
lldb_private::ValueObjectSynthetic::m_might_have_children
LazyBool m_might_have_children
Definition: ValueObjectSyntheticFilter.h:158
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::ValueObject::UpdateValueIfNeeded
bool UpdateValueIfNeeded(bool update_format=true)
Definition: ValueObject.cpp:112
lldb_private::ValueObjectSynthetic::m_synth_sp
lldb::SyntheticChildrenSP m_synth_sp
Definition: ValueObjectSyntheticFilter.h:134
lldb_private::ValueObjectSynthetic::GetValueType
lldb::ValueType GetValueType() const override
Definition: ValueObjectSyntheticFilter.cpp:129
lldb::DynamicValueType
DynamicValueType
Definition: lldb-enumerations.h:501
lldb_private::ValueObject::GetExecutionContextRef
const ExecutionContextRef & GetExecutionContextRef() const
Definition: ValueObject.h:330
lldb_private::ValueObjectSynthetic::GetDeclaration
bool GetDeclaration(Declaration &decl) override
Definition: ValueObjectSyntheticFilter.cpp:409
lldb_private::ValueObject::SetName
void SetName(ConstString name)
Change the name of the current ValueObject.
Definition: ValueObject.h:560
lldb_private::CompilerType::IsValid
bool IsValid() const
Definition: CompilerType.h:124
lldb_private::ValueObjectSynthetic::GetPreferredDisplayLanguage
lldb::LanguageType GetPreferredDisplayLanguage() override
Definition: ValueObjectSyntheticFilter.cpp:388
ValueObject.h
lldb_private::ValueObject::GetValueType
virtual lldb::ValueType GetValueType() const =0
lldb_private::ValueObject::SetValueFromCString
virtual bool SetValueFromCString(const char *value_str, Status &error)
Definition: ValueObject.cpp:1474
lldb_private::ValueObject::GetPreferredDisplayLanguage
virtual lldb::LanguageType GetPreferredDisplayLanguage()
Definition: ValueObject.cpp:3091
lldb_private::ValueObjectSynthetic::IsInScope
bool IsInScope() override
Definition: ValueObjectSyntheticFilter.cpp:347
lldb_private::ValueObjectSynthetic::GetCompilerTypeImpl
CompilerType GetCompilerTypeImpl() override
Definition: ValueObjectSyntheticFilter.cpp:65
DummySyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: ValueObjectSyntheticFilter.cpp:35
lldb_private::Status
Definition: Status.h:44
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::ValueObjectSynthetic::GetLanguageFlags
uint64_t GetLanguageFlags() override
Definition: ValueObjectSyntheticFilter.cpp:416
lldb_private::ValueObject::GetName
ConstString GetName() const
Definition: ValueObject.h:467
lldb::ValueType
ValueType
Definition: lldb-enumerations.h:316
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:444
lldb_private::ValueObjectSynthetic::CanProvideValue
bool CanProvideValue() override
Definition: ValueObjectSyntheticFilter.cpp:359
uint32_t
lldb_private::eLazyBoolNo
@ eLazyBoolNo
Definition: lldb-private-enumerations.h:115
TypeSynthetic.h
lldb_private::ValueObjectSynthetic::CopyValueData
void CopyValueData(ValueObject *source)
Definition: ValueObjectSyntheticFilter.cpp:353
lldb_private::ValueObject::m_value
Value m_value
Definition: ValueObject.h:852
lldb_private::ValueObject::m_parent
ValueObject * m_parent
The parent value object, or nullptr if this has no parent.
Definition: ValueObject.h:840
DummySyntheticFrontEnd
Definition: ValueObjectSyntheticFilter.cpp:28
lldb_private::ValueObject::GetDeclaration
virtual bool GetDeclaration(Declaration &decl)
Definition: ValueObject.cpp:1559
DummySyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: ValueObjectSyntheticFilter.cpp:43
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb_private::ValueObject::GetCompilerType
CompilerType GetCompilerType()
Definition: ValueObject.h:352
lldb_private::ValueObject::Bitflags::m_children_count_valid
bool m_children_count_valid
Definition: ValueObject.h:911
lldb_private::ValueObject::GetModule
virtual lldb::ModuleSP GetModule()
Return the module associated with this value object in case the value is from an executable file and ...
Definition: ValueObject.cpp:3036
lldb_private::ConstString::GetCString
const char * GetCString() const
Get the string value as a C string.
Definition: ConstString.h:215
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
DummySyntheticFrontEnd::DummySyntheticFrontEnd
DummySyntheticFrontEnd(ValueObject &backend)
Definition: ValueObjectSyntheticFilter.cpp:30
Status.h
lldb_private::ValueObjectSynthetic::GetTypeName
ConstString GetTypeName() override
Definition: ValueObjectSyntheticFilter.cpp:69
lldb_private::LLDBLog::DataFormatters
@ DataFormatters
lldb_private::ValueObject::GetDisplayTypeName
virtual ConstString GetDisplayTypeName()
Definition: ValueObject.h:367
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ValueObject::m_flags
struct lldb_private::ValueObject::Bitflags m_flags
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
lldb_private::ValueObjectSynthetic::m_parent_type_name
ConstString m_parent_type_name
Definition: ValueObjectSyntheticFilter.h:156
lldb_private::ValueObjectSynthetic::GetChildMemberWithName
lldb::ValueObjectSP GetChildMemberWithName(ConstString name, bool can_create) override
Definition: ValueObjectSyntheticFilter.cpp:309
lldb_private::Status::Clear
void Clear()
Clear the object state.
Definition: Status.cpp:167
lldb_private::Log
Definition: Log.h:115
lldb_private::ValueObject::m_error
Status m_error
An error object that can describe any errors that occur when updating values.
Definition: ValueObject.h:855
lldb_private::ValueObjectSynthetic::SetValueFromCString
bool SetValueFromCString(const char *value_str, Status &error) override
Definition: ValueObjectSyntheticFilter.cpp:367
lldb_private::GetLog
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:309
lldb_private::Declaration
Definition: Declaration.h:24
lldb_private::ValueObjectSynthetic::GetNonSyntheticValue
lldb::ValueObjectSP GetNonSyntheticValue() override
Definition: ValueObjectSyntheticFilter.cpp:349
lldb_private::ValueObjectSynthetic::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: ValueObjectSyntheticFilter.cpp:321
lldb_private::ValueObjectSynthetic::GetQualifiedTypeName
ConstString GetQualifiedTypeName() override
Definition: ValueObjectSyntheticFilter.cpp:73
DummySyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: ValueObjectSyntheticFilter.cpp:33
lldb_private::ValueObject::GetByteSize
virtual std::optional< uint64_t > GetByteSize()=0
lldb_private::ValueObject::GetLanguageFlags
virtual uint64_t GetLanguageFlags()
Definition: ValueObject.h:789
Value.h
LLDBLog.h
lldb_private::ValueObjectSynthetic::SetFormat
void SetFormat(lldb::Format format) override
Definition: ValueObjectSyntheticFilter.cpp:372
ExecutionContext.h
lldb_private::ValueObjectSynthetic::m_children_byindex
ByIndexMap m_children_byindex
Guarded by m_child_mutex;.
Definition: ValueObjectSyntheticFilter.h:146