LLDB  mainline
NSDictionary.cpp
Go to the documentation of this file.
1 //===-- NSDictionary.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 <mutex>
10 
11 #include "clang/AST/DeclCXX.h"
12 
13 #include "CFBasicHash.h"
14 #include "NSDictionary.h"
15 
18 
19 #include "lldb/Core/ValueObject.h"
22 #include "lldb/Target/Language.h"
23 #include "lldb/Target/StackFrame.h"
24 #include "lldb/Target/Target.h"
26 #include "lldb/Utility/Endian.h"
27 #include "lldb/Utility/Status.h"
28 #include "lldb/Utility/Stream.h"
29 
30 using namespace lldb;
31 using namespace lldb_private;
32 using namespace lldb_private::formatters;
33 
34 NSDictionary_Additionals::AdditionalFormatterMatching::Prefix::Prefix(
35  ConstString p)
36  : m_prefix(p) {}
37 
39  ConstString class_name) {
40  return class_name.GetStringRef().startswith(m_prefix.GetStringRef());
41 }
42 
44  : m_name(n) {}
45 
47  ConstString class_name) {
48  return (class_name == m_name);
49 }
50 
55  return g_map;
56 }
57 
62  g_map;
63  return g_map;
64 }
65 
66 static CompilerType GetLLDBNSPairType(TargetSP target_sp) {
67  CompilerType compiler_type;
68 
69  TypeSystemClang *target_ast_context =
71 
72  if (target_ast_context) {
73  ConstString g_lldb_autogen_nspair("__lldb_autogen_nspair");
74 
75  compiler_type =
76  target_ast_context->GetTypeForIdentifier<clang::CXXRecordDecl>(
77  g_lldb_autogen_nspair);
78 
79  if (!compiler_type) {
80  compiler_type = target_ast_context->CreateRecordType(
82  g_lldb_autogen_nspair.GetCString(), clang::TTK_Struct,
84 
85  if (compiler_type) {
87  CompilerType id_compiler_type =
88  target_ast_context->GetBasicType(eBasicTypeObjCID);
90  compiler_type, "key", id_compiler_type, lldb::eAccessPublic, 0);
92  compiler_type, "value", id_compiler_type, lldb::eAccessPublic, 0);
94  }
95  }
96  }
97  return compiler_type;
98 }
99 
100 namespace lldb_private {
101 namespace formatters {
103 public:
104  NSDictionaryISyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
105 
106  ~NSDictionaryISyntheticFrontEnd() override;
107 
108  size_t CalculateNumChildren() override;
109 
110  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
111 
112  bool Update() override;
113 
114  bool MightHaveChildren() override;
115 
116  size_t GetIndexOfChildWithName(ConstString name) override;
117 
118 private:
122  };
123 
125  uint64_t _used : 58;
127  };
128 
132  lldb::ValueObjectSP valobj_sp;
133  };
134 
136  uint8_t m_ptr_size = 8;
138  DataDescriptor_32 *m_data_32 = nullptr;
139  DataDescriptor_64 *m_data_64 = nullptr;
142  std::vector<DictionaryItemDescriptor> m_children;
143 };
144 
146 public:
147  NSConstantDictionarySyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
148 
149  size_t CalculateNumChildren() override;
150 
151  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
152 
153  bool Update() override;
154 
155  bool MightHaveChildren() override;
156 
157  size_t GetIndexOfChildWithName(ConstString name) override;
158 
159 private:
162  uint8_t m_ptr_size = 8;
164  unsigned int m_size = 0;
167 
171  lldb::ValueObjectSP valobj_sp;
172  };
173 
174  std::vector<DictionaryItemDescriptor> m_children;
175 };
176 
178 public:
179  NSCFDictionarySyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
180 
181  size_t CalculateNumChildren() override;
182 
183  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
184 
185  bool Update() override;
186 
187  bool MightHaveChildren() override;
188 
189  size_t GetIndexOfChildWithName(ConstString name) override;
190 
191 private:
195  lldb::ValueObjectSP valobj_sp;
196  };
197 
199  uint8_t m_ptr_size = 8;
201 
203 
205  std::vector<DictionaryItemDescriptor> m_children;
206 };
207 
209 public:
210  NSDictionary1SyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
211 
212  ~NSDictionary1SyntheticFrontEnd() override = default;
213 
214  size_t CalculateNumChildren() override;
215 
216  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
217 
218  bool Update() override;
219 
220  bool MightHaveChildren() override;
221 
222  size_t GetIndexOfChildWithName(ConstString name) override;
223 
224 private:
225  ValueObjectSP m_pair;
226 };
227 
228 template <typename D32, typename D64>
230 public:
231  GenericNSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
232 
234 
235  size_t CalculateNumChildren() override;
236 
237  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
238 
239  bool Update() override;
240 
241  bool MightHaveChildren() override;
242 
243  size_t GetIndexOfChildWithName(ConstString name) override;
244 
245 private:
249  lldb::ValueObjectSP valobj_sp;
250  };
251 
253  uint8_t m_ptr_size = 8;
255  D32 *m_data_32;
256  D64 *m_data_64;
258  std::vector<DictionaryItemDescriptor> m_children;
259 };
260 
261 namespace Foundation1100 {
263  public:
264  NSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp);
265 
266  ~NSDictionaryMSyntheticFrontEnd() override;
267 
268  size_t CalculateNumChildren() override;
269 
270  lldb::ValueObjectSP GetChildAtIndex(size_t idx) override;
271 
272  bool Update() override;
273 
274  bool MightHaveChildren() override;
275 
276  size_t GetIndexOfChildWithName(ConstString name) override;
277 
278  private:
286  };
287 
289  uint64_t _used : 58;
291  uint64_t _size;
292  uint64_t _mutations;
293  uint64_t _objs_addr;
294  uint64_t _keys_addr;
295  };
296 
300  lldb::ValueObjectSP valobj_sp;
301  };
302 
304  uint8_t m_ptr_size = 8;
306  DataDescriptor_32 *m_data_32 = nullptr;
307  DataDescriptor_64 *m_data_64 = nullptr;
309  std::vector<DictionaryItemDescriptor> m_children;
310  };
311 }
312 
313 namespace Foundation1428 {
314  namespace {
315  struct DataDescriptor_32 {
320  uint64_t GetSize() { return _size; }
321  };
322 
323  struct DataDescriptor_64 {
324  uint64_t _used : 58;
325  uint32_t _kvo : 1;
326  uint64_t _size;
327  uint64_t _buffer;
328  uint64_t GetSize() { return _size; }
329  };
330  }
331 
334 }
335 
336 namespace Foundation1437 {
337  static const uint64_t NSDictionaryCapacities[] = {
338  0, 3, 7, 13, 23, 41, 71, 127, 191, 251, 383, 631, 1087, 1723,
339  2803, 4523, 7351, 11959, 19447, 31231, 50683, 81919, 132607,
340  214519, 346607, 561109, 907759, 1468927, 2376191, 3845119,
341  6221311, 10066421, 16287743, 26354171, 42641881, 68996069,
342  111638519, 180634607, 292272623, 472907251
343  };
344 
345  static const size_t NSDictionaryNumSizeBuckets =
346  sizeof(NSDictionaryCapacities) / sizeof(uint64_t);
347 
348  namespace {
349  struct DataDescriptor_32 {
352  uint32_t _used : 25;
353  uint32_t _kvo : 1;
355 
356  uint64_t GetSize() {
357  return (_szidx) >= NSDictionaryNumSizeBuckets ?
359  }
360  };
361 
362  struct DataDescriptor_64 {
363  uint64_t _buffer;
364  uint32_t _muts;
365  uint32_t _used : 25;
366  uint32_t _kvo : 1;
367  uint32_t _szidx : 6;
368 
369  uint64_t GetSize() {
370  return (_szidx) >= NSDictionaryNumSizeBuckets ?
372  }
373  };
374  } // namespace
375 
378 
379  template <typename DD>
380  uint64_t
382  lldb::addr_t valobj_addr, Status &error) {
383  const lldb::addr_t start_of_descriptor =
384  valobj_addr + process.GetAddressByteSize();
385  DD descriptor = DD();
386  process.ReadMemory(start_of_descriptor, &descriptor, sizeof(descriptor),
387  error);
388  if (error.Fail()) {
389  return 0;
390  }
391  return descriptor._used;
392  }
393 
394  uint64_t
396  Status &error) {
397  if (process.GetAddressByteSize() == 4) {
398  return __NSDictionaryMSize_Impl<DataDescriptor_32>(process, valobj_addr,
399  error);
400  } else {
401  return __NSDictionaryMSize_Impl<DataDescriptor_64>(process, valobj_addr,
402  error);
403  }
404  }
405 
406 }
407 } // namespace formatters
408 } // namespace lldb_private
409 
410 template <bool name_entries>
412  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
413  static ConstString g_TypeHint("NSDictionary");
414  ProcessSP process_sp = valobj.GetProcessSP();
415  if (!process_sp)
416  return false;
417 
418  ObjCLanguageRuntime *runtime = ObjCLanguageRuntime::Get(*process_sp);
419 
420  if (!runtime)
421  return false;
422 
424  runtime->GetNonKVOClassDescriptor(valobj));
425 
426  if (!descriptor || !descriptor->IsValid())
427  return false;
428 
429  uint32_t ptr_size = process_sp->GetAddressByteSize();
430  bool is_64bit = (ptr_size == 8);
431 
432  lldb::addr_t valobj_addr = valobj.GetValueAsUnsigned(0);
433 
434  if (!valobj_addr)
435  return false;
436 
437  uint64_t value = 0;
438 
439  ConstString class_name(descriptor->GetClassName());
440 
441  static const ConstString g_DictionaryI("__NSDictionaryI");
442  static const ConstString g_DictionaryM("__NSDictionaryM");
443  static const ConstString g_DictionaryMLegacy("__NSDictionaryM_Legacy");
444  static const ConstString g_DictionaryMImmutable("__NSDictionaryM_Immutable");
445  static const ConstString g_DictionaryMFrozen("__NSFrozenDictionaryM");
446  static const ConstString g_Dictionary1("__NSSingleEntryDictionaryI");
447  static const ConstString g_Dictionary0("__NSDictionary0");
448  static const ConstString g_DictionaryCF("__CFDictionary");
449  static const ConstString g_DictionaryNSCF("__NSCFDictionary");
450  static const ConstString g_DictionaryCFRef("CFDictionaryRef");
451  static const ConstString g_ConstantDictionary("NSConstantDictionary");
452 
453  if (class_name.IsEmpty())
454  return false;
455 
456  if (class_name == g_DictionaryI || class_name == g_DictionaryMImmutable) {
457  Status error;
458  value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size,
459  ptr_size, 0, error);
460  if (error.Fail())
461  return false;
462 
463  value &= (is_64bit ? ~0xFC00000000000000UL : ~0xFC000000U);
464  } else if (class_name == g_ConstantDictionary) {
465  Status error;
466  value = process_sp->ReadUnsignedIntegerFromMemory(
467  valobj_addr + 2 * ptr_size, ptr_size, 0, error);
468  if (error.Fail())
469  return false;
470  } else if (class_name == g_DictionaryM || class_name == g_DictionaryMLegacy ||
471  class_name == g_DictionaryMFrozen) {
472  AppleObjCRuntime *apple_runtime =
473  llvm::dyn_cast_or_null<AppleObjCRuntime>(runtime);
474  Status error;
475  if (apple_runtime && apple_runtime->GetFoundationVersion() >= 1437) {
476  value = Foundation1437::__NSDictionaryMSize(*process_sp, valobj_addr,
477  error);
478  } else {
479  value = process_sp->ReadUnsignedIntegerFromMemory(valobj_addr + ptr_size,
480  ptr_size, 0, error);
481  value &= (is_64bit ? ~0xFC00000000000000UL : ~0xFC000000U);
482  }
483  if (error.Fail())
484  return false;
485  } else if (class_name == g_Dictionary1) {
486  value = 1;
487  } else if (class_name == g_Dictionary0) {
488  value = 0;
489  } else if (class_name == g_DictionaryCF || class_name == g_DictionaryNSCF ||
490  class_name == g_DictionaryCFRef) {
491  ExecutionContext exe_ctx(process_sp);
492  CFBasicHash cfbh;
493  if (!cfbh.Update(valobj_addr, exe_ctx))
494  return false;
495  value = cfbh.GetCount();
496  } else {
498  for (auto &candidate : map) {
499  if (candidate.first && candidate.first->Match(class_name))
500  return candidate.second(valobj, stream, options);
501  }
502  return false;
503  }
504 
505  std::string prefix, suffix;
506  if (Language *language = Language::FindPlugin(options.GetLanguage())) {
507  if (!language->GetFormatterPrefixSuffix(valobj, g_TypeHint, prefix,
508  suffix)) {
509  prefix.clear();
510  suffix.clear();
511  }
512  }
513 
514  stream.Printf("%s%" PRIu64 " %s%s%s", prefix.c_str(), value, "key/value pair",
515  value == 1 ? "" : "s", suffix.c_str());
516  return true;
517 }
518 
521  CXXSyntheticChildren *synth, lldb::ValueObjectSP valobj_sp) {
522  lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
523  if (!process_sp)
524  return nullptr;
525  AppleObjCRuntime *runtime = llvm::dyn_cast_or_null<AppleObjCRuntime>(
526  ObjCLanguageRuntime::Get(*process_sp));
527  if (!runtime)
528  return nullptr;
529 
530  CompilerType valobj_type(valobj_sp->GetCompilerType());
531  Flags flags(valobj_type.GetTypeInfo());
532 
533  if (flags.IsClear(eTypeIsPointer)) {
534  Status error;
535  valobj_sp = valobj_sp->AddressOf(error);
536  if (error.Fail() || !valobj_sp)
537  return nullptr;
538  }
539 
541  runtime->GetClassDescriptor(*valobj_sp));
542 
543  if (!descriptor || !descriptor->IsValid())
544  return nullptr;
545 
546  ConstString class_name(descriptor->GetClassName());
547 
548  static const ConstString g_DictionaryI("__NSDictionaryI");
549  static const ConstString g_DictionaryM("__NSDictionaryM");
550  static const ConstString g_Dictionary1("__NSSingleEntryDictionaryI");
551  static const ConstString g_DictionaryImmutable("__NSDictionaryM_Immutable");
552  static const ConstString g_DictionaryMFrozen("__NSFrozenDictionaryM");
553  static const ConstString g_DictionaryMLegacy("__NSDictionaryM_Legacy");
554  static const ConstString g_Dictionary0("__NSDictionary0");
555  static const ConstString g_DictionaryCF("__CFDictionary");
556  static const ConstString g_DictionaryNSCF("__NSCFDictionary");
557  static const ConstString g_DictionaryCFRef("CFDictionaryRef");
558  static const ConstString g_ConstantDictionary("NSConstantDictionary");
559 
560  if (class_name.IsEmpty())
561  return nullptr;
562 
563  if (class_name == g_DictionaryI) {
564  return (new NSDictionaryISyntheticFrontEnd(valobj_sp));
565  } else if (class_name == g_ConstantDictionary) {
566  return (new NSConstantDictionarySyntheticFrontEnd(valobj_sp));
567  } else if (class_name == g_DictionaryM || class_name == g_DictionaryMFrozen) {
568  if (runtime->GetFoundationVersion() >= 1437) {
569  return (new Foundation1437::NSDictionaryMSyntheticFrontEnd(valobj_sp));
570  } else if (runtime->GetFoundationVersion() >= 1428) {
571  return (new Foundation1428::NSDictionaryMSyntheticFrontEnd(valobj_sp));
572  } else {
573  return (new Foundation1100::NSDictionaryMSyntheticFrontEnd(valobj_sp));
574  }
575  } else if (class_name == g_DictionaryMLegacy) {
576  return (new Foundation1100::NSDictionaryMSyntheticFrontEnd(valobj_sp));
577  } else if (class_name == g_Dictionary1) {
578  return (new NSDictionary1SyntheticFrontEnd(valobj_sp));
579  } else if (class_name == g_DictionaryCF || class_name == g_DictionaryNSCF ||
580  class_name == g_DictionaryCFRef) {
581  return (new NSCFDictionarySyntheticFrontEnd(valobj_sp));
582  } else {
584  for (auto &candidate : map) {
585  if (candidate.first && candidate.first->Match((class_name)))
586  return candidate.second(synth, valobj_sp);
587  }
588  }
589 
590  return nullptr;
591 }
592 
594  NSDictionaryISyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
595  : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_pair_type() {}
596 
599  delete m_data_32;
600  m_data_32 = nullptr;
601  delete m_data_64;
602  m_data_64 = nullptr;
603 }
604 
607  const char *item_name = name.GetCString();
608  uint32_t idx = ExtractIndexFromString(item_name);
609  if (idx < UINT32_MAX && idx >= CalculateNumChildren())
610  return UINT32_MAX;
611  return idx;
612 }
613 
616  if (!m_data_32 && !m_data_64)
617  return 0;
618  return (m_data_32 ? m_data_32->_used : m_data_64->_used);
619 }
620 
622  m_children.clear();
623  delete m_data_32;
624  m_data_32 = nullptr;
625  delete m_data_64;
626  m_data_64 = nullptr;
627  m_ptr_size = 0;
628  ValueObjectSP valobj_sp = m_backend.GetSP();
629  if (!valobj_sp)
630  return false;
631  m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
632  Status error;
633  error.Clear();
634  lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
635  if (!process_sp)
636  return false;
637  m_ptr_size = process_sp->GetAddressByteSize();
638  m_order = process_sp->GetByteOrder();
639  uint64_t data_location = valobj_sp->GetValueAsUnsigned(0) + m_ptr_size;
640  if (m_ptr_size == 4) {
641  m_data_32 = new DataDescriptor_32();
642  process_sp->ReadMemory(data_location, m_data_32, sizeof(DataDescriptor_32),
643  error);
644  } else {
645  m_data_64 = new DataDescriptor_64();
646  process_sp->ReadMemory(data_location, m_data_64, sizeof(DataDescriptor_64),
647  error);
648  }
649  if (error.Fail())
650  return false;
651  m_data_ptr = data_location + m_ptr_size;
652  return false;
653 }
654 
657  return true;
658 }
659 
660 lldb::ValueObjectSP
662  size_t idx) {
663  uint32_t num_children = CalculateNumChildren();
664 
665  if (idx >= num_children)
666  return lldb::ValueObjectSP();
667 
668  if (m_children.empty()) {
669  // do the scan phase
670  lldb::addr_t key_at_idx = 0, val_at_idx = 0;
671 
672  uint32_t tries = 0;
673  uint32_t test_idx = 0;
674 
675  while (tries < num_children) {
676  key_at_idx = m_data_ptr + (2 * test_idx * m_ptr_size);
677  val_at_idx = key_at_idx + m_ptr_size;
678  ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
679  if (!process_sp)
680  return lldb::ValueObjectSP();
681  Status error;
682  key_at_idx = process_sp->ReadPointerFromMemory(key_at_idx, error);
683  if (error.Fail())
684  return lldb::ValueObjectSP();
685  val_at_idx = process_sp->ReadPointerFromMemory(val_at_idx, error);
686  if (error.Fail())
687  return lldb::ValueObjectSP();
688 
689  test_idx++;
690 
691  if (!key_at_idx || !val_at_idx)
692  continue;
693  tries++;
694 
695  DictionaryItemDescriptor descriptor = {key_at_idx, val_at_idx,
696  lldb::ValueObjectSP()};
697 
698  m_children.push_back(descriptor);
699  }
700  }
701 
702  if (idx >= m_children.size()) // should never happen
703  return lldb::ValueObjectSP();
704 
705  DictionaryItemDescriptor &dict_item = m_children[idx];
706  if (!dict_item.valobj_sp) {
707  if (!m_pair_type.IsValid()) {
708  TargetSP target_sp(m_backend.GetTargetSP());
709  if (!target_sp)
710  return ValueObjectSP();
711  m_pair_type = GetLLDBNSPairType(target_sp);
712  }
713  if (!m_pair_type.IsValid())
714  return ValueObjectSP();
715 
716  WritableDataBufferSP buffer_sp(new DataBufferHeap(2 * m_ptr_size, 0));
717 
718  if (m_ptr_size == 8) {
719  uint64_t *data_ptr = (uint64_t *)buffer_sp->GetBytes();
720  *data_ptr = dict_item.key_ptr;
721  *(data_ptr + 1) = dict_item.val_ptr;
722  } else {
723  uint32_t *data_ptr = (uint32_t *)buffer_sp->GetBytes();
724  *data_ptr = dict_item.key_ptr;
725  *(data_ptr + 1) = dict_item.val_ptr;
726  }
727 
728  StreamString idx_name;
729  idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
730  DataExtractor data(buffer_sp, m_order, m_ptr_size);
731  dict_item.valobj_sp = CreateValueObjectFromData(idx_name.GetString(), data,
732  m_exe_ctx_ref, m_pair_type);
733  }
734  return dict_item.valobj_sp;
735 }
736 
738  NSCFDictionarySyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
739  : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_hashtable(),
740  m_pair_type() {}
741 
744  const char *item_name = name.GetCString();
745  const uint32_t idx = ExtractIndexFromString(item_name);
746  if (idx < UINT32_MAX && idx >= CalculateNumChildren())
747  return UINT32_MAX;
748  return idx;
749 }
750 
753  if (!m_hashtable.IsValid())
754  return 0;
755  return m_hashtable.GetCount();
756 }
757 
759  m_children.clear();
760  ValueObjectSP valobj_sp = m_backend.GetSP();
761  m_ptr_size = 0;
762  if (!valobj_sp)
763  return false;
764  m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
765 
766  lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
767  if (!process_sp)
768  return false;
769  m_ptr_size = process_sp->GetAddressByteSize();
770  m_order = process_sp->GetByteOrder();
771  return m_hashtable.Update(valobj_sp->GetValueAsUnsigned(0), m_exe_ctx_ref);
772 }
773 
776  return true;
777 }
778 
779 lldb::ValueObjectSP
781  size_t idx) {
782  lldb::addr_t m_keys_ptr = m_hashtable.GetKeyPointer();
783  lldb::addr_t m_values_ptr = m_hashtable.GetValuePointer();
784 
785  const uint32_t num_children = CalculateNumChildren();
786 
787  if (idx >= num_children)
788  return lldb::ValueObjectSP();
789 
790  if (m_children.empty()) {
791  ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
792  if (!process_sp)
793  return lldb::ValueObjectSP();
794 
795  Status error;
796  lldb::addr_t key_at_idx = 0, val_at_idx = 0;
797 
798  uint32_t tries = 0;
799  uint32_t test_idx = 0;
800 
801  // Iterate over inferior memory, reading key/value pointers by shifting each
802  // cursor by test_index * m_ptr_size. Returns an empty ValueObject if a read
803  // fails, otherwise, continue until the number of tries matches the number
804  // of childen.
805  while (tries < num_children) {
806  key_at_idx = m_keys_ptr + (test_idx * m_ptr_size);
807  val_at_idx = m_values_ptr + (test_idx * m_ptr_size);
808 
809  key_at_idx = process_sp->ReadPointerFromMemory(key_at_idx, error);
810  if (error.Fail())
811  return lldb::ValueObjectSP();
812  val_at_idx = process_sp->ReadPointerFromMemory(val_at_idx, error);
813  if (error.Fail())
814  return lldb::ValueObjectSP();
815 
816  test_idx++;
817 
818  if (!key_at_idx || !val_at_idx)
819  continue;
820  tries++;
821 
822  DictionaryItemDescriptor descriptor = {key_at_idx, val_at_idx,
823  lldb::ValueObjectSP()};
824 
825  m_children.push_back(descriptor);
826  }
827  }
828 
829  if (idx >= m_children.size()) // should never happen
830  return lldb::ValueObjectSP();
831 
832  DictionaryItemDescriptor &dict_item = m_children[idx];
833  if (!dict_item.valobj_sp) {
834  if (!m_pair_type.IsValid()) {
835  TargetSP target_sp(m_backend.GetTargetSP());
836  if (!target_sp)
837  return ValueObjectSP();
838  m_pair_type = GetLLDBNSPairType(target_sp);
839  }
840  if (!m_pair_type.IsValid())
841  return ValueObjectSP();
842 
843  WritableDataBufferSP buffer_sp(new DataBufferHeap(2 * m_ptr_size, 0));
844 
845  switch (m_ptr_size) {
846  case 0: // architecture has no clue - fail
847  return lldb::ValueObjectSP();
848  case 4: {
849  uint32_t *data_ptr = reinterpret_cast<uint32_t *>(buffer_sp->GetBytes());
850  *data_ptr = dict_item.key_ptr;
851  *(data_ptr + 1) = dict_item.val_ptr;
852  } break;
853  case 8: {
854  uint64_t *data_ptr = reinterpret_cast<uint64_t *>(buffer_sp->GetBytes());
855  *data_ptr = dict_item.key_ptr;
856  *(data_ptr + 1) = dict_item.val_ptr;
857  } break;
858  default:
859  lldbassert(false && "pointer size is not 4 nor 8");
860  }
861 
862  StreamString idx_name;
863  idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
864  DataExtractor data(buffer_sp, m_order, m_ptr_size);
865  dict_item.valobj_sp = CreateValueObjectFromData(idx_name.GetString(), data,
866  m_exe_ctx_ref, m_pair_type);
867  }
868  return dict_item.valobj_sp;
869 }
870 
872  NSConstantDictionarySyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
873  : SyntheticChildrenFrontEnd(*valobj_sp) {}
874 
877  const char *item_name = name.GetCString();
878  uint32_t idx = ExtractIndexFromString(item_name);
879  if (idx < UINT32_MAX && idx >= CalculateNumChildren())
880  return UINT32_MAX;
881  return idx;
882 }
883 
886  return m_size;
887 }
888 
890  ValueObjectSP valobj_sp = m_backend.GetSP();
891  if (!valobj_sp)
892  return false;
893  m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
894  Status error;
895  error.Clear();
896  lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
897  if (!process_sp)
898  return false;
899  m_ptr_size = process_sp->GetAddressByteSize();
900  m_order = process_sp->GetByteOrder();
901  uint64_t valobj_addr = valobj_sp->GetValueAsUnsigned(0);
902  m_size = process_sp->ReadUnsignedIntegerFromMemory(
903  valobj_addr + 2 * m_ptr_size, m_ptr_size, 0, error);
904  if (error.Fail())
905  return false;
906  m_keys_ptr =
907  process_sp->ReadPointerFromMemory(valobj_addr + 3 * m_ptr_size, error);
908  if (error.Fail())
909  return false;
910  m_objects_ptr =
911  process_sp->ReadPointerFromMemory(valobj_addr + 4 * m_ptr_size, error);
912  return !error.Fail();
913 }
914 
917  return true;
918 }
919 
920 lldb::ValueObjectSP lldb_private::formatters::
922  uint32_t num_children = CalculateNumChildren();
923 
924  if (idx >= num_children)
925  return lldb::ValueObjectSP();
926 
927  if (m_children.empty()) {
928  // do the scan phase
929  lldb::addr_t key_at_idx = 0, val_at_idx = 0;
930  ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
931  if (!process_sp)
932  return lldb::ValueObjectSP();
933 
934  for (unsigned int child = 0; child < num_children; ++child) {
935  Status error;
936  key_at_idx = process_sp->ReadPointerFromMemory(
937  m_keys_ptr + child * m_ptr_size, error);
938  if (error.Fail())
939  return lldb::ValueObjectSP();
940  val_at_idx = process_sp->ReadPointerFromMemory(
941  m_objects_ptr + child * m_ptr_size, error);
942  if (error.Fail())
943  return lldb::ValueObjectSP();
944  DictionaryItemDescriptor descriptor = {key_at_idx, val_at_idx,
945  lldb::ValueObjectSP()};
946  m_children.push_back(descriptor);
947  }
948  }
949 
950  if (idx >= m_children.size()) // should never happen
951  return lldb::ValueObjectSP();
952 
953  DictionaryItemDescriptor &dict_item = m_children[idx];
954  if (!dict_item.valobj_sp) {
955  if (!m_pair_type.IsValid()) {
956  TargetSP target_sp(m_backend.GetTargetSP());
957  if (!target_sp)
958  return ValueObjectSP();
959  m_pair_type = GetLLDBNSPairType(target_sp);
960  }
961  if (!m_pair_type.IsValid())
962  return ValueObjectSP();
963 
964  WritableDataBufferSP buffer_sp(new DataBufferHeap(2 * m_ptr_size, 0));
965 
966  if (m_ptr_size == 8) {
967  uint64_t *data_ptr = (uint64_t *)buffer_sp->GetBytes();
968  *data_ptr = dict_item.key_ptr;
969  *(data_ptr + 1) = dict_item.val_ptr;
970  } else {
971  uint32_t *data_ptr = (uint32_t *)buffer_sp->GetBytes();
972  *data_ptr = dict_item.key_ptr;
973  *(data_ptr + 1) = dict_item.val_ptr;
974  }
975 
976  StreamString idx_name;
977  idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
978  DataExtractor data(buffer_sp, m_order, m_ptr_size);
979  dict_item.valobj_sp = CreateValueObjectFromData(idx_name.GetString(), data,
980  m_exe_ctx_ref, m_pair_type);
981  }
982  return dict_item.valobj_sp;
983 }
984 
986  NSDictionary1SyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
987  : SyntheticChildrenFrontEnd(*valobj_sp.get()), m_pair(nullptr) {}
988 
991  static const ConstString g_zero("[0]");
992  return name == g_zero ? 0 : UINT32_MAX;
993 }
994 
997  return 1;
998 }
999 
1001  m_pair.reset();
1002  return false;
1003 }
1004 
1007  return true;
1008 }
1009 
1010 lldb::ValueObjectSP
1012  size_t idx) {
1013  if (idx != 0)
1014  return lldb::ValueObjectSP();
1015 
1016  if (m_pair.get())
1017  return m_pair;
1018 
1019  auto process_sp(m_backend.GetProcessSP());
1020  if (!process_sp)
1021  return nullptr;
1022 
1023  auto ptr_size = process_sp->GetAddressByteSize();
1024 
1025  lldb::addr_t key_ptr =
1026  m_backend.GetValueAsUnsigned(LLDB_INVALID_ADDRESS) + ptr_size;
1027  lldb::addr_t value_ptr = key_ptr + ptr_size;
1028 
1029  Status error;
1030 
1031  lldb::addr_t value_at_idx = process_sp->ReadPointerFromMemory(key_ptr, error);
1032  if (error.Fail())
1033  return nullptr;
1034  lldb::addr_t key_at_idx = process_sp->ReadPointerFromMemory(value_ptr, error);
1035  if (error.Fail())
1036  return nullptr;
1037 
1038  auto pair_type =
1039  GetLLDBNSPairType(process_sp->GetTarget().shared_from_this());
1040 
1041  WritableDataBufferSP buffer_sp(new DataBufferHeap(2 * ptr_size, 0));
1042 
1043  if (ptr_size == 8) {
1044  uint64_t *data_ptr = (uint64_t *)buffer_sp->GetBytes();
1045  *data_ptr = key_at_idx;
1046  *(data_ptr + 1) = value_at_idx;
1047  } else {
1048  uint32_t *data_ptr = (uint32_t *)buffer_sp->GetBytes();
1049  *data_ptr = key_at_idx;
1050  *(data_ptr + 1) = value_at_idx;
1051  }
1052 
1053  DataExtractor data(buffer_sp, process_sp->GetByteOrder(), ptr_size);
1054  m_pair = CreateValueObjectFromData(
1055  "[0]", data, m_backend.GetExecutionContextRef(), pair_type);
1056 
1057  return m_pair;
1058 }
1059 
1060 template <typename D32, typename D64>
1062  GenericNSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
1063  : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(),
1064  m_data_32(nullptr), m_data_64(nullptr), m_pair_type() {}
1065 
1066 template <typename D32, typename D64>
1069  delete m_data_32;
1070  m_data_32 = nullptr;
1071  delete m_data_64;
1072  m_data_64 = nullptr;
1073 }
1074 
1075 template <typename D32, typename D64>
1077  D32, D64>::GetIndexOfChildWithName(ConstString name) {
1078  const char *item_name = name.GetCString();
1079  uint32_t idx = ExtractIndexFromString(item_name);
1080  if (idx < UINT32_MAX && idx >= CalculateNumChildren())
1081  return UINT32_MAX;
1082  return idx;
1083 }
1084 
1085 template <typename D32, typename D64>
1086 size_t
1088  if (!m_data_32 && !m_data_64)
1089  return 0;
1090  return (m_data_32 ? m_data_32->_used : m_data_64->_used);
1091 }
1092 
1093 template <typename D32, typename D64>
1094 bool
1097  m_children.clear();
1098  ValueObjectSP valobj_sp = m_backend.GetSP();
1099  m_ptr_size = 0;
1100  delete m_data_32;
1101  m_data_32 = nullptr;
1102  delete m_data_64;
1103  m_data_64 = nullptr;
1104  if (!valobj_sp)
1105  return false;
1106  m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
1107  Status error;
1108  error.Clear();
1109  lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
1110  if (!process_sp)
1111  return false;
1112  m_ptr_size = process_sp->GetAddressByteSize();
1113  m_order = process_sp->GetByteOrder();
1114  uint64_t data_location = valobj_sp->GetValueAsUnsigned(0) + m_ptr_size;
1115  if (m_ptr_size == 4) {
1116  m_data_32 = new D32();
1117  process_sp->ReadMemory(data_location, m_data_32, sizeof(D32),
1118  error);
1119  } else {
1120  m_data_64 = new D64();
1121  process_sp->ReadMemory(data_location, m_data_64, sizeof(D64),
1122  error);
1123  }
1124 
1125  return error.Success();
1126 }
1127 
1128 template <typename D32, typename D64>
1129 bool
1132  return true;
1133 }
1134 
1135 template <typename D32, typename D64>
1136 lldb::ValueObjectSP
1138  D32, D64>::GetChildAtIndex(size_t idx) {
1139  lldb::addr_t m_keys_ptr;
1140  lldb::addr_t m_values_ptr;
1141  if (m_data_32) {
1142  uint32_t size = m_data_32->GetSize();
1143  m_keys_ptr = m_data_32->_buffer;
1144  m_values_ptr = m_data_32->_buffer + (m_ptr_size * size);
1145  } else {
1146  uint32_t size = m_data_64->GetSize();
1147  m_keys_ptr = m_data_64->_buffer;
1148  m_values_ptr = m_data_64->_buffer + (m_ptr_size * size);
1149  }
1150 
1151  uint32_t num_children = CalculateNumChildren();
1152 
1153  if (idx >= num_children)
1154  return lldb::ValueObjectSP();
1155 
1156  if (m_children.empty()) {
1157  // do the scan phase
1158  lldb::addr_t key_at_idx = 0, val_at_idx = 0;
1159 
1160  uint32_t tries = 0;
1161  uint32_t test_idx = 0;
1162 
1163  while (tries < num_children) {
1164  key_at_idx = m_keys_ptr + (test_idx * m_ptr_size);
1165  val_at_idx = m_values_ptr + (test_idx * m_ptr_size);
1166  ;
1167  ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
1168  if (!process_sp)
1169  return lldb::ValueObjectSP();
1170  Status error;
1171  key_at_idx = process_sp->ReadPointerFromMemory(key_at_idx, error);
1172  if (error.Fail())
1173  return lldb::ValueObjectSP();
1174  val_at_idx = process_sp->ReadPointerFromMemory(val_at_idx, error);
1175  if (error.Fail())
1176  return lldb::ValueObjectSP();
1177 
1178  test_idx++;
1179 
1180  if (!key_at_idx || !val_at_idx)
1181  continue;
1182  tries++;
1183 
1184  DictionaryItemDescriptor descriptor = {key_at_idx, val_at_idx,
1185  lldb::ValueObjectSP()};
1186 
1187  m_children.push_back(descriptor);
1188  }
1189  }
1190 
1191  if (idx >= m_children.size()) // should never happen
1192  return lldb::ValueObjectSP();
1193 
1194  DictionaryItemDescriptor &dict_item = m_children[idx];
1195  if (!dict_item.valobj_sp) {
1196  if (!m_pair_type.IsValid()) {
1197  TargetSP target_sp(m_backend.GetTargetSP());
1198  if (!target_sp)
1199  return ValueObjectSP();
1200  m_pair_type = GetLLDBNSPairType(target_sp);
1201  }
1202  if (!m_pair_type.IsValid())
1203  return ValueObjectSP();
1204 
1205  WritableDataBufferSP buffer_sp(new DataBufferHeap(2 * m_ptr_size, 0));
1206 
1207  if (m_ptr_size == 8) {
1208  uint64_t *data_ptr = (uint64_t *)buffer_sp->GetBytes();
1209  *data_ptr = dict_item.key_ptr;
1210  *(data_ptr + 1) = dict_item.val_ptr;
1211  } else {
1212  uint32_t *data_ptr = (uint32_t *)buffer_sp->GetBytes();
1213  *data_ptr = dict_item.key_ptr;
1214  *(data_ptr + 1) = dict_item.val_ptr;
1215  }
1216 
1217  StreamString idx_name;
1218  idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
1219  DataExtractor data(buffer_sp, m_order, m_ptr_size);
1220  dict_item.valobj_sp = CreateValueObjectFromData(idx_name.GetString(), data,
1221  m_exe_ctx_ref, m_pair_type);
1222  }
1223  return dict_item.valobj_sp;
1224 }
1225 
1227  NSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
1228  : SyntheticChildrenFrontEnd(*valobj_sp), m_exe_ctx_ref(), m_pair_type() {}
1229 
1232  delete m_data_32;
1233  m_data_32 = nullptr;
1234  delete m_data_64;
1235  m_data_64 = nullptr;
1236 }
1237 
1238 size_t
1241  const char *item_name = name.GetCString();
1242  uint32_t idx = ExtractIndexFromString(item_name);
1243  if (idx < UINT32_MAX && idx >= CalculateNumChildren())
1244  return UINT32_MAX;
1245  return idx;
1246 }
1247 
1248 size_t
1251  if (!m_data_32 && !m_data_64)
1252  return 0;
1253  return (m_data_32 ? m_data_32->_used : m_data_64->_used);
1254 }
1255 
1256 bool
1259  m_children.clear();
1260  ValueObjectSP valobj_sp = m_backend.GetSP();
1261  m_ptr_size = 0;
1262  delete m_data_32;
1263  m_data_32 = nullptr;
1264  delete m_data_64;
1265  m_data_64 = nullptr;
1266  if (!valobj_sp)
1267  return false;
1268  m_exe_ctx_ref = valobj_sp->GetExecutionContextRef();
1269  Status error;
1270  error.Clear();
1271  lldb::ProcessSP process_sp(valobj_sp->GetProcessSP());
1272  if (!process_sp)
1273  return false;
1274  m_ptr_size = process_sp->GetAddressByteSize();
1275  m_order = process_sp->GetByteOrder();
1276  uint64_t data_location = valobj_sp->GetValueAsUnsigned(0) + m_ptr_size;
1277  if (m_ptr_size == 4) {
1278  m_data_32 = new DataDescriptor_32();
1279  process_sp->ReadMemory(data_location, m_data_32, sizeof(DataDescriptor_32),
1280  error);
1281  } else {
1282  m_data_64 = new DataDescriptor_64();
1283  process_sp->ReadMemory(data_location, m_data_64, sizeof(DataDescriptor_64),
1284  error);
1285  }
1286 
1287  return error.Success();
1288 }
1289 
1290 bool
1293  return true;
1294 }
1295 
1296 lldb::ValueObjectSP
1299  lldb::addr_t m_keys_ptr =
1300  (m_data_32 ? m_data_32->_keys_addr : m_data_64->_keys_addr);
1301  lldb::addr_t m_values_ptr =
1302  (m_data_32 ? m_data_32->_objs_addr : m_data_64->_objs_addr);
1303 
1304  uint32_t num_children = CalculateNumChildren();
1305 
1306  if (idx >= num_children)
1307  return lldb::ValueObjectSP();
1308 
1309  if (m_children.empty()) {
1310  // do the scan phase
1311  lldb::addr_t key_at_idx = 0, val_at_idx = 0;
1312 
1313  uint32_t tries = 0;
1314  uint32_t test_idx = 0;
1315 
1316  while (tries < num_children) {
1317  key_at_idx = m_keys_ptr + (test_idx * m_ptr_size);
1318  val_at_idx = m_values_ptr + (test_idx * m_ptr_size);
1319  ;
1320  ProcessSP process_sp = m_exe_ctx_ref.GetProcessSP();
1321  if (!process_sp)
1322  return lldb::ValueObjectSP();
1323  Status error;
1324  key_at_idx = process_sp->ReadPointerFromMemory(key_at_idx, error);
1325  if (error.Fail())
1326  return lldb::ValueObjectSP();
1327  val_at_idx = process_sp->ReadPointerFromMemory(val_at_idx, error);
1328  if (error.Fail())
1329  return lldb::ValueObjectSP();
1330 
1331  test_idx++;
1332 
1333  if (!key_at_idx || !val_at_idx)
1334  continue;
1335  tries++;
1336 
1337  DictionaryItemDescriptor descriptor = {key_at_idx, val_at_idx,
1338  lldb::ValueObjectSP()};
1339 
1340  m_children.push_back(descriptor);
1341  }
1342  }
1343 
1344  if (idx >= m_children.size()) // should never happen
1345  return lldb::ValueObjectSP();
1346 
1347  DictionaryItemDescriptor &dict_item = m_children[idx];
1348  if (!dict_item.valobj_sp) {
1349  if (!m_pair_type.IsValid()) {
1350  TargetSP target_sp(m_backend.GetTargetSP());
1351  if (!target_sp)
1352  return ValueObjectSP();
1353  m_pair_type = GetLLDBNSPairType(target_sp);
1354  }
1355  if (!m_pair_type.IsValid())
1356  return ValueObjectSP();
1357 
1358  WritableDataBufferSP buffer_sp(new DataBufferHeap(2 * m_ptr_size, 0));
1359 
1360  if (m_ptr_size == 8) {
1361  uint64_t *data_ptr = (uint64_t *)buffer_sp->GetBytes();
1362  *data_ptr = dict_item.key_ptr;
1363  *(data_ptr + 1) = dict_item.val_ptr;
1364  } else {
1365  uint32_t *data_ptr = (uint32_t *)buffer_sp->GetBytes();
1366  *data_ptr = dict_item.key_ptr;
1367  *(data_ptr + 1) = dict_item.val_ptr;
1368  }
1369 
1370  StreamString idx_name;
1371  idx_name.Printf("[%" PRIu64 "]", (uint64_t)idx);
1372  DataExtractor data(buffer_sp, m_order, m_ptr_size);
1373  dict_item.valobj_sp = CreateValueObjectFromData(idx_name.GetString(), data,
1374  m_exe_ctx_ref, m_pair_type);
1375  }
1376  return dict_item.valobj_sp;
1377 }
1378 
1380  ValueObject &, Stream &, const TypeSummaryOptions &);
1381 
1383  ValueObject &, Stream &, const TypeSummaryOptions &);
lldb_private::formatters::Foundation1437::NSDictionaryCapacities
static const uint64_t NSDictionaryCapacities[]
Definition: NSDictionary.cpp:337
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::NSConstantDictionarySyntheticFrontEnd
NSConstantDictionarySyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: NSDictionary.cpp:872
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: NSDictionary.cpp:656
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd
Definition: NSDictionary.cpp:262
lldb_private::ValueObject::GetValueAsUnsigned
virtual uint64_t GetValueAsUnsigned(uint64_t fail_value, bool *success=nullptr)
Definition: ValueObject.cpp:1090
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: NSDictionary.cpp:921
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::m_data_32
D32 * m_data_32
Definition: NSDictionary.cpp:255
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: NSDictionary.cpp:885
lldb_private::ObjCLanguageRuntime::GetNonKVOClassDescriptor
ClassDescriptorSP GetNonKVOClassDescriptor(ValueObject &in_value)
Definition: ObjCLanguageRuntime.cpp:281
lldb_private::Process::ReadMemory
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:1922
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: NSDictionary.cpp:1298
lldb_private::ObjCLanguageRuntime
Definition: ObjCLanguageRuntime.h:35
lldb_private::ObjCLanguageRuntime::ClassDescriptorSP
std::shared_ptr< ClassDescriptor > ClassDescriptorSP
Definition: ObjCLanguageRuntime.h:45
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DataDescriptor_64::_used
uint64_t _used
Definition: NSDictionary.cpp:125
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: NSDictionary.cpp:1131
lldb_private::CFBasicHash
Definition: CFBasicHash.h:17
lldb_private::CXXSyntheticChildren::CreateFrontEndCallback
std::function< SyntheticChildrenFrontEnd *(CXXSyntheticChildren *, lldb::ValueObjectSP)> CreateFrontEndCallback
Definition: TypeSynthetic.h:362
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::DictionaryItemDescriptor
Definition: NSDictionary.cpp:192
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: NSDictionary.cpp:606
lldb_private::ObjCLanguageRuntime::Get
static ObjCLanguageRuntime * Get(Process &process)
Definition: ObjCLanguageRuntime.h:214
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::m_pair_type
CompilerType m_pair_type
Definition: NSDictionary.cpp:308
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_32::_objs_addr
uint32_t _objs_addr
Definition: NSDictionary.cpp:284
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::Update
bool Update() override
Definition: NSDictionary.cpp:758
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DictionaryItemDescriptor::key_ptr
lldb::addr_t key_ptr
Definition: NSDictionary.cpp:130
lldb_private::formatters::NSDictionary_Additionals::AdditionalFormatterMatching::Full::Full
Full(ConstString n)
Definition: NSDictionary.cpp:43
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor::val_ptr
lldb::addr_t val_ptr
Definition: NSDictionary.cpp:299
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::m_exe_ctx_ref
ExecutionContextRef m_exe_ctx_ref
Definition: NSDictionary.cpp:252
lldb_private::Process
Definition: Process.h:338
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DictionaryItemDescriptor::valobj_sp
lldb::ValueObjectSP valobj_sp
Definition: NSDictionary.cpp:132
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::DictionaryItemDescriptor::key_ptr
lldb::addr_t key_ptr
Definition: NSDictionary.cpp:193
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_64
Definition: NSDictionary.cpp:288
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: NSDictionary.cpp:775
CalculateNumChildren
static size_t CalculateNumChildren(CompilerType container_type, CompilerType element_type, lldb_private::ExecutionContextScope *exe_scope=nullptr)
Definition: VectorType.cpp:169
lldb_private::Flags
Definition: Flags.h:22
lldb_private::SyntheticChildrenFrontEnd
Definition: TypeSynthetic.h:27
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::m_exe_ctx_ref
ExecutionContextRef m_exe_ctx_ref
Definition: NSDictionary.cpp:303
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::NSDictionaryMSyntheticFrontEnd
NSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: NSDictionary.cpp:1227
lldb_private::TypeSystemClang::GetTypeForIdentifier
CompilerType GetTypeForIdentifier(ConstString type_name, clang::DeclContext *decl_context=nullptr)
Definition: TypeSystemClang.h:254
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::DictionaryItemDescriptor::val_ptr
lldb::addr_t val_ptr
Definition: NSDictionary.cpp:170
_szidx
uint32_t _szidx
Definition: NSDictionary.cpp:354
StackFrame.h
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_32
Definition: NSDictionary.cpp:279
lldb_private::Stream
Definition: Stream.h:28
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::DictionaryItemDescriptor::valobj_sp
lldb::ValueObjectSP valobj_sp
Definition: NSDictionary.cpp:195
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
Language.h
lldb_private::formatters::NSDictionary1SyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: NSDictionary.cpp:996
CFBasicHash.h
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::DictionaryItemDescriptor::key_ptr
lldb::addr_t key_ptr
Definition: NSDictionary.cpp:169
lldb_private::formatters::NSDictionaryISyntheticFrontEnd
Definition: NSDictionary.cpp:102
lldb_private::formatters::NSDictionarySyntheticFrontEndCreator
SyntheticChildrenFrontEnd * NSDictionarySyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: NSDictionary.cpp:520
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::DictionaryItemDescriptor::valobj_sp
lldb::ValueObjectSP valobj_sp
Definition: NSDictionary.cpp:171
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_64::_size
uint64_t _size
Definition: NSDictionary.cpp:291
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd
Definition: NSDictionary.cpp:229
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_64::_keys_addr
uint64_t _keys_addr
Definition: NSDictionary.cpp:294
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DataDescriptor_32
Definition: NSDictionary.cpp:119
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: NSDictionary.cpp:661
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DataDescriptor_32::_used
uint32_t _used
Definition: NSDictionary.cpp:120
Target.h
lldb_private::ValueObject::GetProcessSP
lldb::ProcessSP GetProcessSP() const
Definition: ValueObject.h:338
lldb_private::formatters::NSDictionary_Additionals::AdditionalFormatterMatching::Prefix::Match
bool Match(ConstString class_name) override
Definition: NSDictionary.cpp:38
lldb_private::TypeSummaryOptions::GetLanguage
lldb::LanguageType GetLanguage() const
Definition: TypeSummary.cpp:31
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::m_children
std::vector< DictionaryItemDescriptor > m_children
Definition: NSDictionary.cpp:174
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::Update
bool Update() override
Definition: NSDictionary.cpp:621
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: NSDictionary.cpp:780
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_64::_used
uint64_t _used
Definition: NSDictionary.cpp:289
lldb_private::formatters::Foundation1437::NSDictionaryNumSizeBuckets
static const size_t NSDictionaryNumSizeBuckets
Definition: NSDictionary.cpp:345
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::ConstString::GetStringRef
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
Definition: ConstString.h:201
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor::valobj_sp
lldb::ValueObjectSP valobj_sp
Definition: NSDictionary.cpp:249
lldb_private::formatters::NSDictionary_Additionals::GetAdditionalSummaries
static AdditionalFormatters< CXXFunctionSummaryFormat::Callback > & GetAdditionalSummaries()
Definition: NSDictionary.cpp:53
TypeSystemClang.h
lldb_private::ConstString::IsEmpty
bool IsEmpty() const
Test for empty string.
Definition: ConstString.h:303
_kvo
uint32_t _kvo
Definition: NSDictionary.cpp:317
lldb_private::TypeSystemClang::AddFieldToRecordType
static clang::FieldDecl * AddFieldToRecordType(const CompilerType &type, llvm::StringRef name, const CompilerType &field_type, lldb::AccessType access, uint32_t bitfield_bit_size)
Definition: TypeSystemClang.cpp:7318
lldb_private::formatters::NSDictionary1SyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: NSDictionary.cpp:1011
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_32::_size
uint32_t _size
Definition: NSDictionary.cpp:282
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DataDescriptor_64
Definition: NSDictionary.cpp:124
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: NSDictionary.cpp:743
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: NSDictionary.cpp:752
lldb_private::ObjCLanguageRuntime::GetClassDescriptor
virtual ClassDescriptorSP GetClassDescriptor(ValueObject &in_value)
Definition: ObjCLanguageRuntime.cpp:258
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: NSDictionary.cpp:1292
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::NSCFDictionarySyntheticFrontEnd
NSCFDictionarySyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: NSDictionary.cpp:738
lldb_private::formatters::NSDictionary1SyntheticFrontEnd::NSDictionary1SyntheticFrontEnd
NSDictionary1SyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: NSDictionary.cpp:986
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor
Definition: NSDictionary.cpp:246
lldb_private::Process::GetAddressByteSize
uint32_t GetAddressByteSize() const
Definition: Process.cpp:3366
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::Update
bool Update() override
Definition: NSDictionary.cpp:1258
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: NSDictionary.cpp:1250
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::formatters::NSDictionary1SyntheticFrontEnd::Update
bool Update() override
Definition: NSDictionary.cpp:1000
lldb_private::formatters::NSDictionarySummaryProvider< false >
template bool NSDictionarySummaryProvider< false >(ValueObject &, Stream &, const TypeSummaryOptions &)
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor
Definition: NSDictionary.cpp:297
lldb_private::AppleObjCRuntime
Definition: AppleObjCRuntime.h:23
lldb_private::formatters::NSDictionary1SyntheticFrontEnd
Definition: NSDictionary.cpp:208
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd
Definition: NSDictionary.cpp:145
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::formatters::NSDictionarySummaryProvider
bool NSDictionarySummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: NSDictionary.cpp:411
_muts
uint32_t _muts
Definition: NSDictionary.cpp:351
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor::val_ptr
lldb::addr_t val_ptr
Definition: NSDictionary.cpp:248
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::DictionaryItemDescriptor::val_ptr
lldb::addr_t val_ptr
Definition: NSDictionary.cpp:194
lldb_private::formatters::NSDictionary_Additionals::AdditionalFormatterMatching::Full::Match
bool Match(ConstString class_name) override
Definition: NSDictionary.cpp:46
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: NSDictionary.cpp:1240
lldb_private::formatters::NSDictionary_Additionals::AdditionalFormatters
std::vector< AdditionalFormatter< FormatterType > > AdditionalFormatters
Definition: NSDictionary.h:82
lldb_private::Language::FindPlugin
static Language * FindPlugin(lldb::LanguageType language)
Definition: Language.cpp:53
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DataDescriptor_64::_szidx
uint32_t _szidx
Definition: NSDictionary.cpp:126
ValueObject.h
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: NSDictionary.cpp:1087
lldb_private::formatters::NSDictionarySummaryProvider< true >
template bool NSDictionarySummaryProvider< true >(ValueObject &, Stream &, const TypeSummaryOptions &)
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::m_exe_ctx_ref
ExecutionContextRef m_exe_ctx_ref
Definition: NSDictionary.cpp:160
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::m_data_64
D64 * m_data_64
Definition: NSDictionary.cpp:256
ValueObjectConstResult.h
lldb::eAccessPublic
@ eAccessPublic
Definition: lldb-enumerations.h:509
lldb::eBasicTypeObjCID
@ eBasicTypeObjCID
Definition: lldb-enumerations.h:777
lldbassert
#define lldbassert(x)
Definition: LLDBAssert.h:15
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DictionaryItemDescriptor
Definition: NSDictionary.cpp:129
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor::key_ptr
lldb::addr_t key_ptr
Definition: NSDictionary.cpp:247
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::DictionaryItemDescriptor
Definition: NSDictionary.cpp:168
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: NSDictionary.cpp:916
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_32::_keys_addr
uint32_t _keys_addr
Definition: NSDictionary.cpp:285
lldb_private::Status
Definition: Status.h:44
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::m_hashtable
CFBasicHash m_hashtable
Definition: NSDictionary.cpp:202
lldb_private::formatters::NSDictionary1SyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: NSDictionary.cpp:990
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::m_pair_type
CompilerType m_pair_type
Definition: NSDictionary.cpp:141
lldb_private::OptionalClangModuleID
A Clang module ID.
Definition: TypeSystemClang.h:56
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::m_pair_type
CompilerType m_pair_type
Definition: NSDictionary.cpp:257
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::m_exe_ctx_ref
ExecutionContextRef m_exe_ctx_ref
Definition: NSDictionary.cpp:135
lldb::eByteOrderInvalid
@ eByteOrderInvalid
Definition: lldb-enumerations.h:139
uint32_t
lldb_private::Language
Definition: Language.h:29
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::NSDictionaryISyntheticFrontEnd
NSDictionaryISyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: NSDictionary.cpp:594
lldb_private::AppleObjCRuntime::GetFoundationVersion
uint32_t GetFoundationVersion()
Definition: AppleObjCRuntime.cpp:321
lldb_private::CompilerType::GetTypeInfo
uint32_t GetTypeInfo(CompilerType *pointee_or_element_compiler_type=nullptr) const
Definition: CompilerType.cpp:290
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DictionaryItemDescriptor::val_ptr
lldb::addr_t val_ptr
Definition: NSDictionary.cpp:131
NSDictionary.h
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_64::_kvo
uint32_t _kvo
Definition: NSDictionary.cpp:290
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb_private::CXXFunctionSummaryFormat::Callback
std::function< bool(ValueObject &, Stream &, const TypeSummaryOptions &)> Callback
Definition: TypeSummary.h:311
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::Update
bool Update() override
Definition: NSDictionary.cpp:1096
lldb_private::TypeSummaryOptions
Definition: TypeSummary.h:26
lldb_private::CFBasicHash::GetCount
size_t GetCount() const
Definition: CFBasicHash.cpp:75
lldb_private::ScratchTypeSystemClang::GetForTarget
static TypeSystemClang * GetForTarget(Target &target, llvm::Optional< IsolatedASTKind > ast_kind=DefaultAST, bool create_on_demand=true)
Returns the scratch TypeSystemClang for the given target.
Definition: TypeSystemClang.cpp:9841
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd
Definition: NSDictionary.cpp:177
_size
uint32_t _size
Definition: NSDictionary.cpp:318
LLDB_INVALID_ADDRESS
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:74
lldb_private::ConstString::GetCString
const char * GetCString() const
Get the string value as a C string.
Definition: ConstString.h:215
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor::valobj_sp
lldb::ValueObjectSP valobj_sp
Definition: NSDictionary.cpp:300
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::m_children
std::vector< DictionaryItemDescriptor > m_children
Definition: NSDictionary.cpp:309
lldb_private::TypeSystemClang::CreateRecordType
CompilerType CreateRecordType(clang::DeclContext *decl_ctx, OptionalClangModuleID owning_module, lldb::AccessType access_type, llvm::StringRef name, int kind, lldb::LanguageType language, ClangASTMetadata *metadata=nullptr, bool exports_symbols=false)
Definition: TypeSystemClang.cpp:1270
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_64::_mutations
uint64_t _mutations
Definition: NSDictionary.cpp:292
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:33
lldb_private::Stream::Printf
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
Definition: Stream.cpp:107
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_64::_objs_addr
uint64_t _objs_addr
Definition: NSDictionary.cpp:293
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DictionaryItemDescriptor::key_ptr
lldb::addr_t key_ptr
Definition: NSDictionary.cpp:298
lldb_private::formatters::NSDictionary_Additionals::GetAdditionalSynthetics
static AdditionalFormatters< CXXSyntheticChildren::CreateFrontEndCallback > & GetAdditionalSynthetics()
Definition: NSDictionary.cpp:60
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: NSDictionary.cpp:876
Status.h
lldb_private::TypeSystemClang::StartTagDeclarationDefinition
static bool StartTagDeclarationDefinition(const CompilerType &type)
Definition: TypeSystemClang.cpp:8265
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::m_exe_ctx_ref
ExecutionContextRef m_exe_ctx_ref
Definition: NSDictionary.cpp:198
lldb_private::formatters::Foundation1437::__NSDictionaryMSize
uint64_t __NSDictionaryMSize(lldb_private::Process &process, lldb::addr_t valobj_addr, Status &error)
Definition: NSDictionary.cpp:395
lldb_private::formatters
Definition: CXXFunctionPointer.h:15
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::Update
bool Update() override
Definition: NSDictionary.cpp:889
lldb::eLanguageTypeC
@ eLanguageTypeC
Non-standardized C, such as K&R.
Definition: lldb-enumerations.h:439
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
GetLLDBNSPairType
static CompilerType GetLLDBNSPairType(TargetSP target_sp)
Definition: NSDictionary.cpp:66
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::DataDescriptor_32::_szidx
uint32_t _szidx
Definition: NSDictionary.cpp:121
lldb_private::CFBasicHash::Update
bool Update(lldb::addr_t addr, ExecutionContextRef exe_ctx_rf)
Definition: CFBasicHash.cpp:20
lldb_private::TypeSystemClang::GetBasicType
CompilerType GetBasicType(lldb::BasicType type)
Definition: TypeSystemClang.cpp:930
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::m_children
std::vector< DictionaryItemDescriptor > m_children
Definition: NSDictionary.cpp:142
_buffer
uint32_t _buffer
Definition: NSDictionary.cpp:319
lldb_private::formatters::Foundation1437::NSDictionaryMSyntheticFrontEnd
GenericNSDictionaryMSyntheticFrontEnd< DataDescriptor_32, DataDescriptor_64 > NSDictionaryMSyntheticFrontEnd
Definition: NSDictionary.cpp:377
lldb_private::TypeSystemClang
A TypeSystem implementation based on Clang.
Definition: TypeSystemClang.h:105
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::m_pair_type
CompilerType m_pair_type
Definition: NSDictionary.cpp:204
lldb_private::formatters::NSDictionary1SyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: NSDictionary.cpp:1006
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::m_children
std::vector< DictionaryItemDescriptor > m_children
Definition: NSDictionary.cpp:258
lldb_private::formatters::NSDictionary1SyntheticFrontEnd::m_pair
ValueObjectSP m_pair
Definition: NSDictionary.cpp:225
lldb_private::formatters::Foundation1437::__NSDictionaryMSize_Impl
uint64_t __NSDictionaryMSize_Impl(lldb_private::Process &process, lldb::addr_t valobj_addr, Status &error)
Definition: NSDictionary.cpp:381
Stream.h
lldb_private::CXXSyntheticChildren
Definition: TypeSynthetic.h:358
lldb_private::formatters::GenericNSDictionaryMSyntheticFrontEnd::GenericNSDictionaryMSyntheticFrontEnd
GenericNSDictionaryMSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: NSDictionary.cpp:1062
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_32::_kvo
uint32_t _kvo
Definition: NSDictionary.cpp:281
_used
uint32_t _used
Definition: NSDictionary.cpp:316
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::~NSDictionaryMSyntheticFrontEnd
~NSDictionaryMSyntheticFrontEnd() override
Definition: NSDictionary.cpp:1231
FormattersHelpers.h
lldb_private::DataBufferHeap
Definition: DataBufferHeap.h:30
lldb_private::TypeSystemClang::CompleteTagDeclarationDefinition
static bool CompleteTagDeclarationDefinition(const CompilerType &type)
Definition: TypeSystemClang.cpp:8290
lldb
Definition: SBAddress.h:15
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::~NSDictionaryISyntheticFrontEnd
~NSDictionaryISyntheticFrontEnd() override
Definition: NSDictionary.cpp:598
Endian.h
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: NSDictionary.cpp:615
lldb_private::Flags::IsClear
bool IsClear(ValueType bit) const
Test a single flag bit to see if it is clear (zero).
Definition: Flags.h:111
lldb_private::ExecutionContextRef
Execution context objects refer to objects in the execution of the program that is being debugged.
Definition: ExecutionContext.h:72
lldb_private::formatters::ExtractIndexFromString
size_t ExtractIndexFromString(const char *item_name)
Definition: FormattersHelpers.cpp:119
AppleObjCRuntime.h
lldb_private::formatters::NSCFDictionarySyntheticFrontEnd::m_children
std::vector< DictionaryItemDescriptor > m_children
Definition: NSDictionary.cpp:205
DataBufferHeap.h
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_32::_used
uint32_t _used
Definition: NSDictionary.cpp:280
lldb::ByteOrder
ByteOrder
Byte ordering definitions.
Definition: lldb-enumerations.h:138
lldb_private::formatters::NSConstantDictionarySyntheticFrontEnd::m_pair_type
CompilerType m_pair_type
Definition: NSDictionary.cpp:161
lldb_private::formatters::Foundation1100::NSDictionaryMSyntheticFrontEnd::DataDescriptor_32::_mutations
uint32_t _mutations
Definition: NSDictionary.cpp:283