LLDB mainline
NSSet.cpp
Go to the documentation of this file.
1//===-- NSSet.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
9#include "NSSet.h"
10#include "CFBasicHash.h"
11
15#include "lldb/Target/Target.h"
17#include "lldb/Utility/Endian.h"
18#include "lldb/Utility/Status.h"
19#include "lldb/Utility/Stream.h"
22
23using namespace lldb;
24using namespace lldb_private;
25using namespace lldb_private::formatters;
26
27std::map<ConstString, CXXFunctionSummaryFormat::Callback> &
29 static std::map<ConstString, CXXFunctionSummaryFormat::Callback> g_map;
30 return g_map;
31}
32
33std::map<ConstString, CXXSyntheticChildren::CreateFrontEndCallback> &
35 static std::map<ConstString, CXXSyntheticChildren::CreateFrontEndCallback>
36 g_map;
37 return g_map;
38}
39
40namespace lldb_private {
41namespace formatters {
43public:
45
46 ~NSSetISyntheticFrontEnd() override;
47
48 llvm::Expected<uint32_t> CalculateNumChildren() override;
49
50 lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override;
51
53
54private:
56 uint32_t _used : 26;
57 uint32_t _szidx : 6;
58 };
59
61 uint64_t _used : 58;
62 uint32_t _szidx : 6;
63 };
64
69
71 uint8_t m_ptr_size = 8;
75 std::vector<SetItemDescriptor> m_children;
76};
77
103
104template <typename D32, typename D64>
130
131namespace Foundation1300 {
133 uint32_t _used : 26;
134 uint32_t _size;
135 uint32_t _mutations;
136 uint32_t _objs_addr;
137 };
138
140 uint64_t _used : 58;
141 uint64_t _size;
142 uint64_t _mutations;
143 uint64_t _objs_addr;
144 };
145
148}
149
150namespace Foundation1428 {
151 struct DataDescriptor_32 {
152 uint32_t _used : 26;
153 uint32_t _size;
154 uint32_t _objs_addr;
155 uint32_t _mutations;
156 };
157
158 struct DataDescriptor_64 {
159 uint64_t _used : 58;
160 uint64_t _size;
161 uint64_t _objs_addr;
162 uint64_t _mutations;
163 };
164
167}
168
169namespace Foundation1437 {
170 struct DataDescriptor_32 {
171 uint32_t _cow;
172 // __table storage
173 uint32_t _objs_addr;
174 uint32_t _muts;
175 uint32_t _used : 26;
176 uint32_t _szidx : 6;
177 };
178
179 struct DataDescriptor_64 {
180 uint64_t _cow;
181 // __Table storage
182 uint64_t _objs_addr;
183 uint32_t _muts;
184 uint32_t _used : 26;
185 uint32_t _szidx : 6;
186 };
187
190
191 template <typename DD>
192 uint64_t
194 Status &error) {
195 const lldb::addr_t start_of_descriptor =
196 valobj_addr + process.GetAddressByteSize();
197 DD descriptor = DD();
198 process.ReadMemory(start_of_descriptor, &descriptor, sizeof(descriptor),
199 error);
200 if (error.Fail()) {
201 return 0;
202 }
203 return descriptor._used;
204 }
205
206 uint64_t
208 Status &error) {
209 if (process.GetAddressByteSize() == 4) {
210 return __NSSetMSize_Impl<DataDescriptor_32>(process, valobj_addr, error);
211 } else {
212 return __NSSetMSize_Impl<DataDescriptor_64>(process, valobj_addr, error);
213 }
214 }
215 } // namespace Foundation1437
216} // namespace formatters
217} // namespace lldb_private
218
219template <bool cf_style>
221 ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
222 static constexpr llvm::StringLiteral g_TypeHint("NSSet");
223
224 ProcessSP process_sp = valobj.GetProcessSP();
225 if (!process_sp)
226 return false;
227
228 ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
229
230 if (!runtime)
231 return false;
232
234 runtime->GetClassDescriptor(valobj));
235
236 if (!descriptor || !descriptor->IsValid())
237 return false;
238
239 uint32_t ptr_size = process_sp->GetAddressByteSize();
240 bool is_64bit = (ptr_size == 8);
241
242 lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
243
244 if (!valobj_addr)
245 return false;
246
247 uint64_t value = 0;
248
249 ConstString class_name(descriptor->GetClassName());
250 llvm::StringRef class_name_ref(class_name.GetStringRef());
251
252 static constexpr llvm::StringLiteral g_SetI("__NSSetI");
253 static constexpr llvm::StringLiteral g_OrderedSetI("__NSOrderedSetI");
254 static constexpr llvm::StringLiteral g_SetM("__NSSetM");
255 static constexpr llvm::StringLiteral g_SetCF("__NSCFSet");
256 static constexpr llvm::StringLiteral g_SetCFRef("CFSetRef");
257
258 if (class_name_ref.empty())
259 return false;
260
261 if (class_name_ref == g_SetI || class_name_ref == g_OrderedSetI) {
263 value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size,
264 ptr_size, 0, error);
265 if (error.Fail())
266 return false;
267 value &= (is_64bit ? ~0xFC00000000000000UL : ~0xFC000000U);
268 } else if (class_name_ref == g_SetM) {
269 AppleObjCRuntime *apple_runtime =
270 llvm::dyn_cast_or_null<AppleObjCRuntime>(runtime);
272 if (apple_runtime && apple_runtime->GetFoundationVersion() >= 1437) {
273 value = Foundation1437::__NSSetMSize(*process_sp, valobj_addr, error);
274 } else {
275 value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size,
276 ptr_size, 0, error);
277 value &= (is_64bit ? ~0xFC00000000000000UL : ~0xFC000000U);
278 }
279 if (error.Fail())
280 return false;
281 } else if (class_name_ref == g_SetCF || class_name_ref == g_SetCFRef) {
282 ExecutionContext exe_ctx(process_sp);
283 CFBasicHash cfbh;
284 if (!cfbh.Update(valobj_addr, exe_ctx))
285 return false;
286 value = cfbh.GetCount();
287 } else {
289 auto iter = map.find(class_name), end = map.end();
290 if (iter != end)
291 return iter->second(valobj, stream, options);
292 else
293 return false;
294 }
295
296 llvm::StringRef prefix, suffix;
297 if (Language *language = Language::FindPlugin(options.GetLanguage()))
298 std::tie(prefix, suffix) = language->GetFormatterPrefixSuffix(g_TypeHint);
299
300 stream << prefix;
301 stream.Printf("%" PRIu64 " %s%s", value, "element", value == 1 ? "" : "s");
302 stream << suffix;
303 return true;
304}
305
308 CXXSyntheticChildren *synth, lldb::ValueObjectSP valobj_sp) {
309 lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
310 if (!process_sp)
311 return nullptr;
312 ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
313 if (!runtime)
314 return nullptr;
315
316 CompilerType valobj_type(valobj_sp->GetCompilerType());
317 Flags flags(valobj_type.GetTypeInfo());
318
319 if (flags.IsClear(eTypeIsPointer)) {
321 valobj_sp = valobj_sp->AddressOf(error);
322 if (error.Fail() || !valobj_sp)
323 return nullptr;
324 }
325
327 runtime->GetClassDescriptor(*valobj_sp));
328
329 if (!descriptor || !descriptor->IsValid())
330 return nullptr;
331
332 ConstString class_name = descriptor->GetClassName();
333 llvm::StringRef class_name_ref(class_name.GetStringRef());
334
335 static constexpr llvm::StringLiteral g_SetI("__NSSetI");
336 static constexpr llvm::StringLiteral g_OrderedSetI("__NSOrderedSetI");
337 static constexpr llvm::StringLiteral g_SetM("__NSSetM");
338 static constexpr llvm::StringLiteral g_SetCF("__NSCFSet");
339 static constexpr llvm::StringLiteral g_SetCFRef("CFSetRef");
340
341 if (class_name_ref.empty())
342 return nullptr;
343
344 if (class_name_ref == g_SetI || class_name_ref == g_OrderedSetI) {
345 return (new NSSetISyntheticFrontEnd(valobj_sp));
346 } else if (class_name_ref == g_SetM) {
347 AppleObjCRuntime *apple_runtime =
348 llvm::dyn_cast_or_null<AppleObjCRuntime>(runtime);
349 if (apple_runtime) {
350 if (apple_runtime->GetFoundationVersion() >= 1437)
351 return (new Foundation1437::NSSetMSyntheticFrontEnd(valobj_sp));
352 else if (apple_runtime->GetFoundationVersion() >= 1428)
353 return (new Foundation1428::NSSetMSyntheticFrontEnd(valobj_sp));
354 else
355 return (new Foundation1300::NSSetMSyntheticFrontEnd(valobj_sp));
356 } else {
357 return (new Foundation1300::NSSetMSyntheticFrontEnd(valobj_sp));
358 }
359 } else if (class_name_ref == g_SetCF || class_name_ref == g_SetCFRef) {
360 return (new NSCFSetSyntheticFrontEnd(valobj_sp));
361 } else {
363 auto iter = map.find(class_name), end = map.end();
364 if (iter != end)
365 return iter->second(synth, valobj_sp);
366 return nullptr;
367 }
368}
369
376
383
384llvm::Expected<uint32_t>
390
393 m_children.clear();
394 delete m_data_32;
395 m_data_32 = nullptr;
396 delete m_data_64;
397 m_data_64 = nullptr;
398 m_ptr_size = 0;
399 ValueObjectSP valobj_sp = m_backend.GetSP();
400 if (!valobj_sp)
402 m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
403 lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
404 if (!process_sp)
406 m_ptr_size = process_sp->GetAddressByteSize();
407 uint64_t data_location = valobj_sp->GetValueAsUnsigned(0) + m_ptr_size;
409 if (m_ptr_size == 4) {
411 process_sp->ReadMemory(data_location, m_data_32, sizeof(DataDescriptor_32),
412 error);
413 } else {
415 process_sp->ReadMemory(data_location, m_data_64, sizeof(DataDescriptor_64),
416 error);
417 }
418 if (error.Fail())
420 m_data_ptr = data_location + m_ptr_size;
422}
423
426 uint32_t idx) {
427 uint32_t num_children = CalculateNumChildrenIgnoringErrors();
428
429 if (idx >= num_children)
430 return lldb::ValueObjectSP();
431
432 ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
433 if (!process_sp)
434 return lldb::ValueObjectSP();
435
436 if (m_children.empty()) {
437 // do the scan phase
438 lldb::addr_t obj_at_idx = 0;
439
440 uint32_t tries = 0;
441 uint32_t test_idx = 0;
442
443 while (tries < num_children) {
444 obj_at_idx = m_data_ptr + (test_idx * m_ptr_size);
445 if (!process_sp)
446 return lldb::ValueObjectSP();
448 obj_at_idx = process_sp->ReadPointerFromMemory(obj_at_idx, error);
449 if (error.Fail())
450 return lldb::ValueObjectSP();
451
452 test_idx++;
453
454 if (!obj_at_idx)
455 continue;
456 tries++;
457
458 SetItemDescriptor descriptor = {obj_at_idx, lldb::ValueObjectSP()};
459
460 m_children.push_back(descriptor);
461 }
462 }
463
464 if (idx >= m_children.size()) // should never happen
465 return lldb::ValueObjectSP();
466
467 SetItemDescriptor &set_item = m_children[idx];
468 if (!set_item.valobj_sp) {
469 auto ptr_size = process_sp->GetAddressByteSize();
470 DataBufferHeap buffer(ptr_size, 0);
471 switch (ptr_size) {
472 case 0: // architecture has no clue - fail
473 return lldb::ValueObjectSP();
474 case 4:
475 *reinterpret_cast<uint32_t *>(buffer.GetBytes()) =
476 static_cast<uint32_t>(set_item.item_ptr);
477 break;
478 case 8:
479 *reinterpret_cast<uint64_t *>(buffer.GetBytes()) =
480 static_cast<uint64_t>(set_item.item_ptr);
481 break;
482 default:
483 lldbassert(false && "pointer size is not 4 nor 8");
484 }
485 StreamString idx_name;
486 idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
487
488 DataExtractor data(buffer.GetBytes(), buffer.GetByteSize(),
489 process_sp->GetByteOrder(),
490 process_sp->GetAddressByteSize());
491
493 idx_name.GetString(), data, m_exe_ctx_ref,
494 m_backend.GetCompilerType().GetBasicTypeFromAST(
496 }
497 return set_item.valobj_sp;
498}
499
504
505llvm::Expected<uint32_t>
507 if (!m_hashtable.IsValid())
508 return 0;
509 return m_hashtable.GetCount();
510}
511
514 m_children.clear();
515 ValueObjectSP valobj_sp = m_backend.GetSP();
516 m_ptr_size = 0;
517 if (!valobj_sp)
519 m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
520
521 lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
522 if (!process_sp)
524 m_ptr_size = process_sp->GetAddressByteSize();
525 m_order = process_sp->GetByteOrder();
526 return m_hashtable.Update(valobj_sp->GetValueAsUnsigned(0), m_exe_ctx_ref)
529}
530
533 uint32_t idx) {
534 lldb::addr_t m_values_ptr = m_hashtable.GetValuePointer();
535
536 const uint32_t num_children = CalculateNumChildrenIgnoringErrors();
537
538 if (idx >= num_children)
539 return lldb::ValueObjectSP();
540
541 if (m_children.empty()) {
542 ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
543 if (!process_sp)
544 return lldb::ValueObjectSP();
545
547 lldb::addr_t val_at_idx = 0;
548
549 uint32_t tries = 0;
550 uint32_t test_idx = 0;
551
552 // Iterate over inferior memory, reading value pointers by shifting the
553 // cursor by test_index * m_ptr_size. Returns an empty ValueObject if a read
554 // fails, otherwise, continue until the number of tries matches the number
555 // of childen.
556 while (tries < num_children) {
557 val_at_idx = m_values_ptr + (test_idx * m_ptr_size);
558
559 val_at_idx = process_sp->ReadPointerFromMemory(val_at_idx, error);
560 if (error.Fail())
561 return lldb::ValueObjectSP();
562
563 test_idx++;
564
565 if (!val_at_idx)
566 continue;
567 tries++;
568
569 SetItemDescriptor descriptor = {val_at_idx, lldb::ValueObjectSP()};
570
571 m_children.push_back(descriptor);
572 }
573 }
574
575 if (idx >= m_children.size()) // should never happen
576 return lldb::ValueObjectSP();
577
578 SetItemDescriptor &set_item = m_children[idx];
579 if (!set_item.valobj_sp) {
580
582
583 switch (m_ptr_size) {
584 case 0: // architecture has no clue - fail
585 return lldb::ValueObjectSP();
586 case 4:
587 *reinterpret_cast<uint32_t *>(buffer_sp->GetBytes()) =
588 static_cast<uint32_t>(set_item.item_ptr);
589 break;
590 case 8:
591 *reinterpret_cast<uint64_t *>(buffer_sp->GetBytes()) =
592 static_cast<uint64_t>(set_item.item_ptr);
593 break;
594 default:
595 lldbassert(false && "pointer size is not 4 nor 8");
596 }
597 StreamString idx_name;
598 idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
599
600 DataExtractor data(buffer_sp, m_order, m_ptr_size);
601
603 idx_name.GetString(), data, m_exe_ctx_ref,
604 m_backend.GetCompilerType().GetBasicTypeFromAST(
606 }
607
608 return set_item.valobj_sp;
609}
610
611template <typename D32, typename D64>
615 m_data_32(nullptr), m_data_64(nullptr) {
616 if (valobj_sp)
617 Update();
618}
619
620template <typename D32, typename D64>
623 delete m_data_32;
624 m_data_32 = nullptr;
625 delete m_data_64;
626 m_data_64 = nullptr;
627}
628
629template <typename D32, typename D64>
630llvm::Expected<uint32_t>
633 if (!m_data_32 && !m_data_64)
634 return 0;
635 return (m_data_32 ? (uint32_t)m_data_32->_used : (uint32_t)m_data_64->_used);
636}
637
638template <typename D32, typename D64>
641 m_children.clear();
642 ValueObjectSP valobj_sp = m_backend.GetSP();
643 m_ptr_size = 0;
644 delete m_data_32;
645 m_data_32 = nullptr;
646 delete m_data_64;
647 m_data_64 = nullptr;
648 if (!valobj_sp)
650 if (!valobj_sp)
652 m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
653 lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
654 if (!process_sp)
656 m_ptr_size = process_sp->GetAddressByteSize();
657 uint64_t data_location = valobj_sp->GetValueAsUnsigned(0) + m_ptr_size;
659 if (m_ptr_size == 4) {
660 m_data_32 = new D32();
661 process_sp->ReadMemory(data_location, m_data_32, sizeof(D32),
662 error);
663 } else {
664 m_data_64 = new D64();
665 process_sp->ReadMemory(data_location, m_data_64, sizeof(D64),
666 error);
667 }
668 return error.Success() ? lldb::ChildCacheState::eReuse
670}
671
672template <typename D32, typename D64>
676 lldb::addr_t m_objs_addr =
677 (m_data_32 ? m_data_32->_objs_addr : m_data_64->_objs_addr);
678
679 uint32_t num_children = CalculateNumChildrenIgnoringErrors();
680
681 if (idx >= num_children)
682 return lldb::ValueObjectSP();
683
684 ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
685 if (!process_sp)
686 return lldb::ValueObjectSP();
687
688 if (m_children.empty()) {
689 // do the scan phase
690 lldb::addr_t obj_at_idx = 0;
691
692 uint32_t tries = 0;
693 uint32_t test_idx = 0;
694
695 while (tries < num_children) {
696 obj_at_idx = m_objs_addr + (test_idx * m_ptr_size);
697 if (!process_sp)
698 return lldb::ValueObjectSP();
700 obj_at_idx = process_sp->ReadPointerFromMemory(obj_at_idx, error);
701 if (error.Fail())
702 return lldb::ValueObjectSP();
703
704 test_idx++;
705
706 if (!obj_at_idx)
707 continue;
708 tries++;
709
710 SetItemDescriptor descriptor = {obj_at_idx, lldb::ValueObjectSP()};
711
712 m_children.push_back(descriptor);
713 }
714 }
715
716 if (idx >= m_children.size()) // should never happen
717 return lldb::ValueObjectSP();
718
719 SetItemDescriptor &set_item = m_children[idx];
720 if (!set_item.valobj_sp) {
721 auto ptr_size = process_sp->GetAddressByteSize();
722 DataBufferHeap buffer(ptr_size, 0);
723 switch (ptr_size) {
724 case 0: // architecture has no clue?? - fail
725 return lldb::ValueObjectSP();
726 case 4:
727 *((uint32_t *)buffer.GetBytes()) = (uint32_t)set_item.item_ptr;
728 break;
729 case 8:
730 *((uint64_t *)buffer.GetBytes()) = (uint64_t)set_item.item_ptr;
731 break;
732 default:
733 assert(false && "pointer size is not 4 nor 8 - get out of here ASAP");
734 }
735 StreamString idx_name;
736 idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
737
738 DataExtractor data(buffer.GetBytes(), buffer.GetByteSize(),
739 process_sp->GetByteOrder(),
740 process_sp->GetAddressByteSize());
741
743 idx_name.GetString(), data, m_exe_ctx_ref,
744 m_backend.GetCompilerType().GetBasicTypeFromAST(
746 }
747 return set_item.valobj_sp;
748}
749
751 ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options);
752
754 ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options);
static llvm::raw_ostream & error(Stream &strm)
#define lldbassert(x)
Definition LLDBAssert.h:16
static std::optional< size_t > CalculateNumChildren(CompilerType container_elem_type, uint64_t num_elements, CompilerType element_type)
Calculates the number of elements stored in a container (with element type 'container_elem_type') as ...
bool Update(lldb::addr_t addr, ExecutionContextRef exe_ctx_rf)
Generic representation of a type in a programming language.
A uniqued constant string class.
Definition ConstString.h:40
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
A subclass of DataBuffer that stores a data buffer on the heap.
lldb::offset_t GetByteSize() const override
Get the number of bytes in the data buffer.
An data extractor class.
Execution context objects refer to objects in the execution of the program that is being debugged.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class to manage flags.
Definition Flags.h:22
static Language * FindPlugin(lldb::LanguageType language)
Definition Language.cpp:84
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
static ObjCLanguageRuntime * Get(Process &process)
virtual ClassDescriptorSP GetClassDescriptor(ValueObject &in_value)
A plug-in interface definition class for debugging a process.
Definition Process.h:359
virtual size_t ReadMemory(lldb::addr_t vm_addr, void *buf, size_t size, Status &error)
Read of memory from a process.
Definition Process.cpp:2038
uint32_t GetAddressByteSize() const
Definition Process.cpp:3930
An error handling class.
Definition Status.h:118
llvm::StringRef GetString() const
A stream class that can stream formatted output to a file.
Definition Stream.h:28
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition Stream.cpp:134
uint32_t CalculateNumChildrenIgnoringErrors(uint32_t max=UINT32_MAX)
SyntheticChildrenFrontEnd(ValueObject &backend)
lldb::ValueObjectSP CreateChildValueObjectFromData(llvm::StringRef name, const DataExtractor &data, const ExecutionContext &exe_ctx, CompilerType type)
lldb::LanguageType GetLanguage() const
lldb::ProcessSP GetProcessSP() const
virtual uint64_t GetValueAsUnsigned(uint64_t fail_value, bool *success=nullptr)
uint8_t * GetBytes()
Get a pointer to the data.
Definition DataBuffer.h:108
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
Definition NSSet.cpp:675
lldb::ChildCacheState Update() override
This function is assumed to always succeed and if it fails, the front-end should know to deal with it...
Definition NSSet.cpp:640
llvm::Expected< uint32_t > CalculateNumChildren() override
Definition NSSet.cpp:632
GenericNSSetMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition NSSet.cpp:613
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
Definition NSSet.cpp:532
lldb::ChildCacheState Update() override
This function is assumed to always succeed and if it fails, the front-end should know to deal with it...
Definition NSSet.cpp:513
llvm::Expected< uint32_t > CalculateNumChildren() override
Definition NSSet.cpp:506
NSCFSetSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition NSSet.cpp:500
std::vector< SetItemDescriptor > m_children
Definition NSSet.cpp:101
lldb::ValueObjectSP GetChildAtIndex(uint32_t idx) override
Definition NSSet.cpp:425
NSSetISyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition NSSet.cpp:370
std::vector< SetItemDescriptor > m_children
Definition NSSet.cpp:75
lldb::ChildCacheState Update() override
This function is assumed to always succeed and if it fails, the front-end should know to deal with it...
Definition NSSet.cpp:392
llvm::Expected< uint32_t > CalculateNumChildren() override
Definition NSSet.cpp:385
static std::map< ConstString, CXXFunctionSummaryFormat::Callback > & GetAdditionalSummaries()
Definition NSSet.cpp:28
static std::map< ConstString, CXXSyntheticChildren::CreateFrontEndCallback > & GetAdditionalSynthetics()
Definition NSSet.cpp:34
#define LLDB_INVALID_ADDRESS
GenericNSSetMSyntheticFrontEnd< DataDescriptor_32, DataDescriptor_64 > NSSetMSyntheticFrontEnd
Definition NSSet.cpp:146
GenericNSSetMSyntheticFrontEnd< DataDescriptor_32, DataDescriptor_64 > NSSetMSyntheticFrontEnd
Definition NSSet.cpp:165
GenericNSSetMSyntheticFrontEnd< DataDescriptor_32, DataDescriptor_64 > NSSetMSyntheticFrontEnd
Definition NSSet.cpp:188
uint64_t __NSSetMSize(lldb_private::Process &process, lldb::addr_t valobj_addr, Status &error)
Definition NSSet.cpp:207
uint64_t __NSSetMSize_Impl(lldb_private::Process &process, lldb::addr_t valobj_addr, Status &error)
Definition NSSet.cpp:193
bool NSSetSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition NSSet.cpp:220
SyntheticChildrenFrontEnd * NSSetSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
A class that represents a running process on the host machine.
ChildCacheState
Specifies if children need to be re-computed after a call to SyntheticChildrenFrontEnd::Update.
@ eRefetch
Children need to be recomputed dynamically.
@ eReuse
Children did not change and don't need to be recomputed; re-use what we computed the last time we cal...
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
std::shared_ptr< lldb_private::Process > ProcessSP
ByteOrder
Byte ordering definitions.
std::shared_ptr< lldb_private::WritableDataBuffer > WritableDataBufferSP
uint64_t addr_t
Definition lldb-types.h:80