LLDB  mainline
LibCxx.cpp
Go to the documentation of this file.
1 //===-- LibCxx.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 "LibCxx.h"
10 
11 #include "lldb/Core/Debugger.h"
12 #include "lldb/Core/FormatEntity.h"
13 #include "lldb/Core/ValueObject.h"
21 #include "lldb/Target/Target.h"
24 #include "lldb/Utility/Endian.h"
25 #include "lldb/Utility/Status.h"
26 #include "lldb/Utility/Stream.h"
27 
30 #include <tuple>
31 
32 using namespace lldb;
33 using namespace lldb_private;
34 using namespace lldb_private::formatters;
35 
37  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
38  ValueObjectSP valobj_sp(valobj.GetNonSyntheticValue());
39  if (!valobj_sp)
40  return false;
41 
42  // An optional either contains a value or not, the member __engaged_ is
43  // a bool flag, it is true if the optional has a value and false otherwise.
44  ValueObjectSP engaged_sp(
45  valobj_sp->GetChildMemberWithName(ConstString("__engaged_"), true));
46 
47  if (!engaged_sp)
48  return false;
49 
50  llvm::StringRef engaged_as_cstring(
51  engaged_sp->GetValueAsUnsigned(0) == 1 ? "true" : "false");
52 
53  stream.Printf(" Has Value=%s ", engaged_as_cstring.data());
54 
55  return true;
56 }
57 
59  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
60 
61  ValueObjectSP valobj_sp(valobj.GetNonSyntheticValue());
62 
63  if (!valobj_sp)
64  return false;
65 
66  ExecutionContext exe_ctx(valobj_sp->GetExecutionContextRef());
67  Process *process = exe_ctx.GetProcessPtr();
68 
69  if (process == nullptr)
70  return false;
71 
72  CPPLanguageRuntime *cpp_runtime = CPPLanguageRuntime::Get(*process);
73 
74  if (!cpp_runtime)
75  return false;
76 
78  cpp_runtime->FindLibCppStdFunctionCallableInfo(valobj_sp);
79 
80  switch (callable_info.callable_case) {
81  case CPPLanguageRuntime::LibCppStdFunctionCallableCase::Invalid:
82  stream.Printf(" __f_ = %" PRIu64, callable_info.member_f_pointer_value);
83  return false;
84  break;
85  case CPPLanguageRuntime::LibCppStdFunctionCallableCase::Lambda:
86  stream.Printf(
87  " Lambda in File %s at Line %u",
89  callable_info.callable_line_entry.line);
90  break;
91  case CPPLanguageRuntime::LibCppStdFunctionCallableCase::CallableObject:
92  stream.Printf(
93  " Function in File %s at Line %u",
95  callable_info.callable_line_entry.line);
96  break;
97  case CPPLanguageRuntime::LibCppStdFunctionCallableCase::FreeOrMemberFunction:
98  stream.Printf(" Function = %s ",
99  callable_info.callable_symbol.GetName().GetCString());
100  break;
101  }
102 
103  return true;
104 }
105 
107  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
108  ValueObjectSP valobj_sp(valobj.GetNonSyntheticValue());
109  if (!valobj_sp)
110  return false;
111  ValueObjectSP ptr_sp(
112  valobj_sp->GetChildMemberWithName(ConstString("__ptr_"), true));
113  ValueObjectSP count_sp(valobj_sp->GetChildAtNamePath(
114  {ConstString("__cntrl_"), ConstString("__shared_owners_")}));
115  ValueObjectSP weakcount_sp(valobj_sp->GetChildAtNamePath(
116  {ConstString("__cntrl_"), ConstString("__shared_weak_owners_")}));
117 
118  if (!ptr_sp)
119  return false;
120 
121  if (ptr_sp->GetValueAsUnsigned(0) == 0) {
122  stream.Printf("nullptr");
123  return true;
124  } else {
125  bool print_pointee = false;
126  Status error;
127  ValueObjectSP pointee_sp = ptr_sp->Dereference(error);
128  if (pointee_sp && error.Success()) {
129  if (pointee_sp->DumpPrintableRepresentation(
130  stream, ValueObject::eValueObjectRepresentationStyleSummary,
132  ValueObject::PrintableRepresentationSpecialCases::eDisable,
133  false))
134  print_pointee = true;
135  }
136  if (!print_pointee)
137  stream.Printf("ptr = 0x%" PRIx64, ptr_sp->GetValueAsUnsigned(0));
138  }
139 
140  if (count_sp)
141  stream.Printf(" strong=%" PRIu64, 1 + count_sp->GetValueAsUnsigned(0));
142 
143  if (weakcount_sp)
144  stream.Printf(" weak=%" PRIu64, 1 + weakcount_sp->GetValueAsUnsigned(0));
145 
146  return true;
147 }
148 
150  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
151  ValueObjectSP valobj_sp(valobj.GetNonSyntheticValue());
152  if (!valobj_sp)
153  return false;
154 
155  ValueObjectSP ptr_sp(
156  valobj_sp->GetChildMemberWithName(ConstString("__ptr_"), true));
157  if (!ptr_sp)
158  return false;
159 
160  ptr_sp = GetValueOfLibCXXCompressedPair(*ptr_sp);
161  if (!ptr_sp)
162  return false;
163 
164  if (ptr_sp->GetValueAsUnsigned(0) == 0) {
165  stream.Printf("nullptr");
166  return true;
167  } else {
168  bool print_pointee = false;
169  Status error;
170  ValueObjectSP pointee_sp = ptr_sp->Dereference(error);
171  if (pointee_sp && error.Success()) {
172  if (pointee_sp->DumpPrintableRepresentation(
173  stream, ValueObject::eValueObjectRepresentationStyleSummary,
175  ValueObject::PrintableRepresentationSpecialCases::eDisable,
176  false))
177  print_pointee = true;
178  }
179  if (!print_pointee)
180  stream.Printf("ptr = 0x%" PRIx64, ptr_sp->GetValueAsUnsigned(0));
181  }
182 
183  return true;
184 }
185 
186 /*
187  (lldb) fr var ibeg --raw --ptr-depth 1
188  (std::__1::__map_iterator<std::__1::__tree_iterator<std::__1::pair<int,
189  std::__1::basic_string<char, std::__1::char_traits<char>,
190  std::__1::allocator<char> > >, std::__1::__tree_node<std::__1::pair<int,
191  std::__1::basic_string<char, std::__1::char_traits<char>,
192  std::__1::allocator<char> > >, void *> *, long> >) ibeg = {
193  __i_ = {
194  __ptr_ = 0x0000000100103870 {
195  std::__1::__tree_node_base<void *> = {
196  std::__1::__tree_end_node<std::__1::__tree_node_base<void *> *> = {
197  __left_ = 0x0000000000000000
198  }
199  __right_ = 0x0000000000000000
200  __parent_ = 0x00000001001038b0
201  __is_black_ = true
202  }
203  __value_ = {
204  first = 0
205  second = { std::string }
206  */
207 
209  LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
210  : SyntheticChildrenFrontEnd(*valobj_sp), m_pair_ptr(), m_pair_sp() {
211  if (valobj_sp)
212  Update();
213 }
214 
216  m_pair_sp.reset();
217  m_pair_ptr = nullptr;
218 
219  ValueObjectSP valobj_sp = m_backend.GetSP();
220  if (!valobj_sp)
221  return false;
222 
223  TargetSP target_sp(valobj_sp->GetTargetSP());
224 
225  if (!target_sp)
226  return false;
227 
228  if (!valobj_sp)
229  return false;
230 
231  static ConstString g_i_("__i_");
232 
233  // this must be a ValueObject* because it is a child of the ValueObject we
234  // are producing children for it if were a ValueObjectSP, we would end up
235  // with a loop (iterator -> synthetic -> child -> parent == iterator) and
236  // that would in turn leak memory by never allowing the ValueObjects to die
237  // and free their memory
238  m_pair_ptr = valobj_sp
239  ->GetValueForExpressionPath(
240  ".__i_.__ptr_->__value_", nullptr, nullptr,
242  .DontCheckDotVsArrowSyntax()
243  .SetSyntheticChildrenTraversal(
245  SyntheticChildrenTraversal::None),
246  nullptr)
247  .get();
248 
249  if (!m_pair_ptr) {
250  m_pair_ptr = valobj_sp
251  ->GetValueForExpressionPath(
252  ".__i_.__ptr_", nullptr, nullptr,
254  .DontCheckDotVsArrowSyntax()
255  .SetSyntheticChildrenTraversal(
257  SyntheticChildrenTraversal::None),
258  nullptr)
259  .get();
260  if (m_pair_ptr) {
261  auto __i_(valobj_sp->GetChildMemberWithName(g_i_, true));
262  if (!__i_) {
263  m_pair_ptr = nullptr;
264  return false;
265  }
266  CompilerType pair_type(
267  __i_->GetCompilerType().GetTypeTemplateArgument(0));
268  std::string name;
269  uint64_t bit_offset_ptr;
270  uint32_t bitfield_bit_size_ptr;
271  bool is_bitfield_ptr;
272  pair_type = pair_type.GetFieldAtIndex(
273  0, name, &bit_offset_ptr, &bitfield_bit_size_ptr, &is_bitfield_ptr);
274  if (!pair_type) {
275  m_pair_ptr = nullptr;
276  return false;
277  }
278 
279  auto addr(m_pair_ptr->GetValueAsUnsigned(LLDB_INVALID_ADDRESS));
280  m_pair_ptr = nullptr;
281  if (addr && addr != LLDB_INVALID_ADDRESS) {
282  TypeSystemClang *ast_ctx =
283  llvm::dyn_cast_or_null<TypeSystemClang>(pair_type.GetTypeSystem());
284  if (!ast_ctx)
285  return false;
286  CompilerType tree_node_type = ast_ctx->CreateStructForIdentifier(
287  ConstString(),
288  {{"ptr0",
289  ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType()},
290  {"ptr1",
291  ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType()},
292  {"ptr2",
293  ast_ctx->GetBasicType(lldb::eBasicTypeVoid).GetPointerType()},
294  {"cw", ast_ctx->GetBasicType(lldb::eBasicTypeBool)},
295  {"payload", pair_type}});
296  llvm::Optional<uint64_t> size = tree_node_type.GetByteSize(nullptr);
297  if (!size)
298  return false;
299  WritableDataBufferSP buffer_sp(new DataBufferHeap(*size, 0));
300  ProcessSP process_sp(target_sp->GetProcessSP());
301  Status error;
302  process_sp->ReadMemory(addr, buffer_sp->GetBytes(),
303  buffer_sp->GetByteSize(), error);
304  if (error.Fail())
305  return false;
306  DataExtractor extractor(buffer_sp, process_sp->GetByteOrder(),
307  process_sp->GetAddressByteSize());
308  auto pair_sp = CreateValueObjectFromData(
309  "pair", extractor, valobj_sp->GetExecutionContextRef(),
310  tree_node_type);
311  if (pair_sp)
312  m_pair_sp = pair_sp->GetChildAtIndex(4, true);
313  }
314  }
315  }
316 
317  return false;
318 }
319 
322  return 2;
323 }
324 
325 lldb::ValueObjectSP
327  size_t idx) {
328  if (m_pair_ptr)
329  return m_pair_ptr->GetChildAtIndex(idx, true);
330  if (m_pair_sp)
331  return m_pair_sp->GetChildAtIndex(idx, true);
332  return lldb::ValueObjectSP();
333 }
334 
337  return true;
338 }
339 
342  if (name == "first")
343  return 0;
344  if (name == "second")
345  return 1;
346  return UINT32_MAX;
347 }
348 
351  // this will be deleted when its parent dies (since it's a child object)
352  // delete m_pair_ptr;
353 }
354 
357  CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) {
358  return (valobj_sp ? new LibCxxMapIteratorSyntheticFrontEnd(valobj_sp)
359  : nullptr);
360 }
361 
362 /*
363  (lldb) fr var ibeg --raw --ptr-depth 1 -T
364  (std::__1::__wrap_iter<int *>) ibeg = {
365  (std::__1::__wrap_iter<int *>::iterator_type) __i = 0x00000001001037a0 {
366  (int) *__i = 1
367  }
368  }
369 */
370 
373  CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) {
374  static ConstString g_item_name;
375  if (!g_item_name)
376  g_item_name.SetCString("__i");
377  return (valobj_sp
378  ? new VectorIteratorSyntheticFrontEnd(valobj_sp, g_item_name)
379  : nullptr);
380 }
381 
383  LibcxxSharedPtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
384  : SyntheticChildrenFrontEnd(*valobj_sp), m_cntrl(nullptr) {
385  if (valobj_sp)
386  Update();
387 }
388 
391  return (m_cntrl ? 1 : 0);
392 }
393 
394 lldb::ValueObjectSP
396  size_t idx) {
397  if (!m_cntrl)
398  return lldb::ValueObjectSP();
399 
400  ValueObjectSP valobj_sp = m_backend.GetSP();
401  if (!valobj_sp)
402  return lldb::ValueObjectSP();
403 
404  if (idx == 0)
405  return valobj_sp->GetChildMemberWithName(ConstString("__ptr_"), true);
406 
407  if (idx == 1) {
408  if (auto ptr_sp =
409  valobj_sp->GetChildMemberWithName(ConstString("__ptr_"), true)) {
410  Status status;
411  auto value_sp = ptr_sp->Dereference(status);
412  if (status.Success()) {
413  auto value_type_sp =
414  valobj_sp->GetCompilerType().GetTypeTemplateArgument(0);
415  return value_sp->Cast(value_type_sp);
416  }
417  }
418  }
419 
420  return lldb::ValueObjectSP();
421 }
422 
424  m_cntrl = nullptr;
425 
426  ValueObjectSP valobj_sp = m_backend.GetSP();
427  if (!valobj_sp)
428  return false;
429 
430  TargetSP target_sp(valobj_sp->GetTargetSP());
431  if (!target_sp)
432  return false;
433 
434  lldb::ValueObjectSP cntrl_sp(
435  valobj_sp->GetChildMemberWithName(ConstString("__cntrl_"), true));
436 
437  m_cntrl = cntrl_sp.get(); // need to store the raw pointer to avoid a circular
438  // dependency
439  return false;
440 }
441 
444  return true;
445 }
446 
449  if (name == "__ptr_")
450  return 0;
451  if (name == "$$dereference$$")
452  return 1;
453  return UINT32_MAX;
454 }
455 
458 
461  CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) {
462  return (valobj_sp ? new LibcxxSharedPtrSyntheticFrontEnd(valobj_sp)
463  : nullptr);
464 }
465 
467  LibcxxUniquePtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
468  : SyntheticChildrenFrontEnd(*valobj_sp) {
469  if (valobj_sp)
470  Update();
471 }
472 
475 
478  CXXSyntheticChildren *, lldb::ValueObjectSP valobj_sp) {
479  return (valobj_sp ? new LibcxxUniquePtrSyntheticFrontEnd(valobj_sp)
480  : nullptr);
481 }
482 
485  return (m_value_ptr_sp ? 1 : 0);
486 }
487 
488 lldb::ValueObjectSP
490  size_t idx) {
491  if (!m_value_ptr_sp)
492  return lldb::ValueObjectSP();
493 
494  if (idx == 0)
495  return m_value_ptr_sp;
496 
497  if (idx == 1) {
498  Status status;
499  auto value_sp = m_value_ptr_sp->Dereference(status);
500  if (status.Success()) {
501  return value_sp;
502  }
503  }
504 
505  return lldb::ValueObjectSP();
506 }
507 
509  ValueObjectSP valobj_sp = m_backend.GetSP();
510  if (!valobj_sp)
511  return false;
512 
513  ValueObjectSP ptr_sp(
514  valobj_sp->GetChildMemberWithName(ConstString("__ptr_"), true));
515  if (!ptr_sp)
516  return false;
517 
518  m_value_ptr_sp = GetValueOfLibCXXCompressedPair(*ptr_sp);
519 
520  return false;
521 }
522 
525  return true;
526 }
527 
530  if (name == "__value_")
531  return 0;
532  if (name == "$$dereference$$")
533  return 1;
534  return UINT32_MAX;
535 }
536 
538  ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options) {
539  if (valobj.IsPointerType()) {
540  uint64_t value = valobj.GetValueAsUnsigned(0);
541  if (!value)
542  return false;
543  stream.Printf("0x%016" PRIx64 " ", value);
544  }
545  return FormatEntity::FormatStringRef("size=${svar%#}", stream, nullptr,
546  nullptr, nullptr, &valobj, false, false);
547 }
548 
549 /// The field layout in a libc++ string (cap, side, data or data, size, cap).
554 };
555 
556 /// Determine the size in bytes of \p valobj (a libc++ std::string object) and
557 /// extract its data payload. Return the size + payload pair.
558 // TODO: Support big-endian architectures.
559 static llvm::Optional<std::pair<uint64_t, ValueObjectSP>>
561  ValueObjectSP dataval_sp(valobj.GetChildAtIndexPath({0, 0, 0, 0}));
562  if (!dataval_sp)
563  return {};
564  if (!dataval_sp->GetError().Success())
565  return {};
566 
567  ValueObjectSP layout_decider(
568  dataval_sp->GetChildAtIndexPath(llvm::ArrayRef<size_t>({0, 0})));
569 
570  // this child should exist
571  if (!layout_decider)
572  return {};
573 
574  ConstString g_data_name("__data_");
575  ConstString g_size_name("__size_");
576  bool short_mode = false; // this means the string is in short-mode and the
577  // data is stored inline
578  bool using_bitmasks = true; // Whether the class uses bitmasks for the mode
579  // flag (pre-D123580).
580  uint64_t size;
581  LibcxxStringLayoutMode layout = (layout_decider->GetName() == g_data_name)
584  uint64_t size_mode_value = 0;
585 
586  if (ValueObjectSP is_long = dataval_sp->GetChildAtNamePath(
587  {ConstString("__s"), ConstString("__is_long_")})) {
588  using_bitmasks = false;
589  short_mode = !is_long->GetValueAsUnsigned(/*fail_value=*/0);
590  if (ValueObjectSP size_member =
591  dataval_sp->GetChildAtNamePath({ConstString("__s"), ConstString("__size_")}))
592  size = size_member->GetValueAsUnsigned(/*fail_value=*/0);
593  else
594  return {};
595  } else if (layout == eLibcxxStringLayoutModeDSC) {
596  llvm::SmallVector<size_t, 3> size_mode_locations[] = {
597  {1, 2}, // Post-c3d0205ee771 layout. This was in use for only a brief
598  // period, so we can delete it if it becomes a burden.
599  {1, 1, 0},
600  {1, 1, 1},
601  };
602  ValueObjectSP size_mode;
603  for (llvm::ArrayRef<size_t> loc : size_mode_locations) {
604  size_mode = dataval_sp->GetChildAtIndexPath(loc);
605  if (size_mode && size_mode->GetName() == g_size_name)
606  break;
607  }
608 
609  if (!size_mode)
610  return {};
611 
612  size_mode_value = (size_mode->GetValueAsUnsigned(0));
613  short_mode = ((size_mode_value & 0x80) == 0);
614  } else {
615  ValueObjectSP size_mode(dataval_sp->GetChildAtIndexPath({1, 0, 0}));
616  if (!size_mode)
617  return {};
618 
619  size_mode_value = (size_mode->GetValueAsUnsigned(0));
620  short_mode = ((size_mode_value & 1) == 0);
621  }
622 
623  if (short_mode) {
624  ValueObjectSP short_sp(dataval_sp->GetChildAtIndex(1, true));
625  if (!short_sp)
626  return {};
627  ValueObjectSP location_sp = short_sp->GetChildAtIndex(
628  (layout == eLibcxxStringLayoutModeDSC) ? 0 : 1, true);
629  // After D125496, there is a flat layout.
630  if (location_sp->GetName() == g_size_name)
631  location_sp = short_sp->GetChildAtIndex(3, true);
632  if (using_bitmasks)
633  size = (layout == eLibcxxStringLayoutModeDSC)
634  ? size_mode_value
635  : ((size_mode_value >> 1) % 256);
636 
637  // When the small-string optimization takes place, the data must fit in the
638  // inline string buffer (23 bytes on x86_64/Darwin). If it doesn't, it's
639  // likely that the string isn't initialized and we're reading garbage.
640  ExecutionContext exe_ctx(location_sp->GetExecutionContextRef());
641  const llvm::Optional<uint64_t> max_bytes =
642  location_sp->GetCompilerType().GetByteSize(
643  exe_ctx.GetBestExecutionContextScope());
644  if (!max_bytes || size > *max_bytes || !location_sp)
645  return {};
646 
647  return std::make_pair(size, location_sp);
648  }
649 
650  ValueObjectSP l(dataval_sp->GetChildAtIndex(0, true));
651  if (!l)
652  return {};
653  // we can use the layout_decider object as the data pointer
654  ValueObjectSP location_sp =
655  l->GetChildMemberWithName(ConstString("__data_"), /*can_create=*/true);
656  ValueObjectSP size_vo =
657  l->GetChildMemberWithName(ConstString("__size_"), /*can_create=*/true);
658  ValueObjectSP capacity_vo =
659  l->GetChildMemberWithName(ConstString("__cap_"), /*can_create=*/true);
660  if (!size_vo || !location_sp || !capacity_vo)
661  return {};
662  size = size_vo->GetValueAsUnsigned(LLDB_INVALID_OFFSET);
663  uint64_t capacity = capacity_vo->GetValueAsUnsigned(LLDB_INVALID_OFFSET);
664  if (!using_bitmasks && layout == eLibcxxStringLayoutModeCSD)
665  capacity *= 2;
666  if (size == LLDB_INVALID_OFFSET || capacity == LLDB_INVALID_OFFSET ||
667  capacity < size)
668  return {};
669  return std::make_pair(size, location_sp);
670 }
671 
672 static bool
674  const TypeSummaryOptions &summary_options,
675  ValueObjectSP location_sp, size_t size) {
676  if (size == 0) {
677  stream.Printf("L\"\"");
678  return true;
679  }
680  if (!location_sp)
681  return false;
682 
684  if (summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryCapped) {
685  const auto max_size = valobj.GetTargetSP()->GetMaximumSizeOfStringSummary();
686  if (size > max_size) {
687  size = max_size;
688  options.SetIsTruncated(true);
689  }
690  }
691 
692  DataExtractor extractor;
693  const size_t bytes_read = location_sp->GetPointeeData(extractor, 0, size);
694  if (bytes_read < size)
695  return false;
696 
697  // std::wstring::size() is measured in 'characters', not bytes
698  TypeSystemClang *ast_context =
700  if (!ast_context)
701  return false;
702 
703  auto wchar_t_size =
704  ast_context->GetBasicType(lldb::eBasicTypeWChar).GetByteSize(nullptr);
705  if (!wchar_t_size)
706  return false;
707 
708  options.SetData(std::move(extractor));
709  options.SetStream(&stream);
710  options.SetPrefixToken("L");
711  options.SetQuote('"');
712  options.SetSourceSize(size);
713  options.SetBinaryZeroIsTerminator(false);
714 
715  switch (*wchar_t_size) {
716  case 1:
719  options);
720  break;
721 
722  case 2:
725  options);
726  break;
727 
728  case 4:
731  options);
732  }
733  return false;
734 }
735 
737  ValueObject &valobj, Stream &stream,
738  const TypeSummaryOptions &summary_options) {
739  auto string_info = ExtractLibcxxStringInfo(valobj);
740  if (!string_info)
741  return false;
742  uint64_t size;
743  ValueObjectSP location_sp;
744  std::tie(size, location_sp) = *string_info;
745 
746  return ::LibcxxWStringSummaryProvider(valobj, stream, summary_options,
747  location_sp, size);
748 }
749 
750 template <StringPrinter::StringElementType element_type>
751 static bool
753  const TypeSummaryOptions &summary_options,
754  std::string prefix_token, ValueObjectSP location_sp,
755  uint64_t size) {
756 
757  if (size == 0) {
758  stream.Printf("\"\"");
759  return true;
760  }
761 
762  if (!location_sp)
763  return false;
764 
766 
767  if (summary_options.GetCapping() == TypeSummaryCapping::eTypeSummaryCapped) {
768  const auto max_size = valobj.GetTargetSP()->GetMaximumSizeOfStringSummary();
769  if (size > max_size) {
770  size = max_size;
771  options.SetIsTruncated(true);
772  }
773  }
774 
775  {
776  DataExtractor extractor;
777  const size_t bytes_read = location_sp->GetPointeeData(extractor, 0, size);
778  if (bytes_read < size)
779  return false;
780 
781  options.SetData(std::move(extractor));
782  }
783  options.SetStream(&stream);
784  if (prefix_token.empty())
785  options.SetPrefixToken(nullptr);
786  else
787  options.SetPrefixToken(prefix_token);
788  options.SetQuote('"');
789  options.SetSourceSize(size);
790  options.SetBinaryZeroIsTerminator(false);
791  return StringPrinter::ReadBufferAndDumpToStream<element_type>(options);
792 }
793 
794 template <StringPrinter::StringElementType element_type>
795 static bool
797  const TypeSummaryOptions &summary_options,
798  std::string prefix_token) {
799  auto string_info = ExtractLibcxxStringInfo(valobj);
800  if (!string_info)
801  return false;
802  uint64_t size;
803  ValueObjectSP location_sp;
804  std::tie(size, location_sp) = *string_info;
805 
806  return LibcxxStringSummaryProvider<element_type>(
807  valobj, stream, summary_options, prefix_token, location_sp, size);
808 }
809 template <StringPrinter::StringElementType element_type>
810 static bool formatStringImpl(ValueObject &valobj, Stream &stream,
811  const TypeSummaryOptions &summary_options,
812  std::string prefix_token) {
813  StreamString scratch_stream;
814  const bool success = LibcxxStringSummaryProvider<element_type>(
815  valobj, scratch_stream, summary_options, prefix_token);
816  if (success)
817  stream << scratch_stream.GetData();
818  else
819  stream << "Summary Unavailable";
820  return true;
821 }
822 
824  ValueObject &valobj, Stream &stream,
825  const TypeSummaryOptions &summary_options) {
826  return formatStringImpl<StringPrinter::StringElementType::ASCII>(
827  valobj, stream, summary_options, "");
828 }
829 
831  ValueObject &valobj, Stream &stream,
832  const TypeSummaryOptions &summary_options) {
833  return formatStringImpl<StringPrinter::StringElementType::UTF16>(
834  valobj, stream, summary_options, "u");
835 }
836 
838  ValueObject &valobj, Stream &stream,
839  const TypeSummaryOptions &summary_options) {
840  return formatStringImpl<StringPrinter::StringElementType::UTF32>(
841  valobj, stream, summary_options, "U");
842 }
843 
844 static std::tuple<bool, ValueObjectSP, size_t>
846  ConstString g_data_name("__data");
847  ConstString g_size_name("__size");
848  auto dataobj = valobj.GetChildMemberWithName(g_data_name, true);
849  auto sizeobj = valobj.GetChildMemberWithName(g_size_name, true);
850 
851  if (!dataobj || !sizeobj)
852  return std::make_tuple<bool,ValueObjectSP,size_t>(false, {}, {});
853 
854  if (!dataobj->GetError().Success() || !sizeobj->GetError().Success())
855  return std::make_tuple<bool,ValueObjectSP,size_t>(false, {}, {});
856 
857  bool success{false};
858  uint64_t size = sizeobj->GetValueAsUnsigned(0, &success);
859  if (!success)
860  return std::make_tuple<bool,ValueObjectSP,size_t>(false, {}, {});
861 
862  return std::make_tuple(true,dataobj,size);
863 }
864 
865 template <StringPrinter::StringElementType element_type>
866 static bool formatStringViewImpl(ValueObject &valobj, Stream &stream,
867  const TypeSummaryOptions &summary_options,
868  std::string prefix_token) {
869 
870  bool success;
871  ValueObjectSP dataobj;
872  size_t size;
873  std::tie(success, dataobj, size) = LibcxxExtractStringViewData(valobj);
874 
875  if (!success) {
876  stream << "Summary Unavailable";
877  return true;
878  }
879 
880  return LibcxxStringSummaryProvider<element_type>(
881  valobj, stream, summary_options, prefix_token, dataobj, size);
882 }
883 
885  ValueObject &valobj, Stream &stream,
886  const TypeSummaryOptions &summary_options) {
887  return formatStringViewImpl<StringPrinter::StringElementType::ASCII>(
888  valobj, stream, summary_options, "");
889 }
890 
892  ValueObject &valobj, Stream &stream,
893  const TypeSummaryOptions &summary_options) {
894  return formatStringViewImpl<StringPrinter::StringElementType::UTF16>(
895  valobj, stream, summary_options, "u");
896 }
897 
899  ValueObject &valobj, Stream &stream,
900  const TypeSummaryOptions &summary_options) {
901  return formatStringViewImpl<StringPrinter::StringElementType::UTF32>(
902  valobj, stream, summary_options, "U");
903 }
904 
906  ValueObject &valobj, Stream &stream,
907  const TypeSummaryOptions &summary_options) {
908 
909  bool success;
910  ValueObjectSP dataobj;
911  size_t size;
912  std::tie( success, dataobj, size ) = LibcxxExtractStringViewData(valobj);
913 
914  if (!success) {
915  stream << "Summary Unavailable";
916  return true;
917  }
918 
919 
920  return ::LibcxxWStringSummaryProvider(valobj, stream, summary_options,
921  dataobj, size);
922 }
eLibcxxStringLayoutModeInvalid
@ eLibcxxStringLayoutModeInvalid
Definition: LibCxx.cpp:553
lldb_private::formatters::StringPrinter::StringElementType::UTF16
@ UTF16
lldb_private::formatters::StringPrinter::DumpToStreamOptions::SetPrefixToken
void SetPrefixToken(const std::string &p)
Definition: StringPrinter.h:37
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::FormatEntity::FormatStringRef
static bool FormatStringRef(const llvm::StringRef &format, Stream &s, const SymbolContext *sc, const ExecutionContext *exe_ctx, const Address *addr, ValueObject *valobj, bool function_changed, bool initial_function)
Definition: FormatEntity.cpp:1045
lldb_private::ValueObject::GetChildAtIndexPath
lldb::ValueObjectSP GetChildAtIndexPath(llvm::ArrayRef< size_t > idxs, size_t *index_of_error=nullptr)
Definition: ValueObject.cpp:396
lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_symbol
Symbol callable_symbol
Definition: CPPLanguageRuntime.h:32
lldb_private::LineEntry::file
FileSpec file
The source file, possibly mapped by the target.source-map setting.
Definition: LineEntry.h:140
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::~LibCxxMapIteratorSyntheticFrontEnd
~LibCxxMapIteratorSyntheticFrontEnd() override
Definition: LibCxx.cpp:350
lldb_private::formatters::LibcxxStringSummaryProviderUTF16
bool LibcxxStringSummaryProviderUTF16(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:830
lldb_private::ValueObject::GetValueForExpressionPathOptions
Definition: ValueObject.h:196
lldb::eBasicTypeBool
@ eBasicTypeBool
Definition: lldb-enumerations.h:763
formatStringViewImpl
static bool formatStringViewImpl(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, std::string prefix_token)
Definition: LibCxx.cpp:866
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:448
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: LibCxx.cpp:321
lldb_private::ExecutionContext::GetProcessPtr
Process * GetProcessPtr() const
Returns a pointer to the process object.
Definition: ExecutionContext.cpp:206
formatStringImpl
static bool formatStringImpl(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, std::string prefix_token)
Definition: LibCxx.cpp:810
lldb_private::formatters::LibcxxStringSummaryProviderUTF32
bool LibcxxStringSummaryProviderUTF32(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:837
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:326
lldb_private::Process
Definition: Process.h:338
lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStreamOptions
Definition: StringPrinter.h:127
lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStream
static bool ReadBufferAndDumpToStream(const ReadBufferAndDumpToStreamOptions &options)
VectorIterator.h
lldb_private::SyntheticChildrenFrontEnd
Definition: TypeSynthetic.h:27
lldb_private::ConstString::SetCString
void SetCString(const char *cstr)
Set the C string value.
Definition: ConstString.cpp:301
SectionLoadList.h
lldb_private::CompilerType::GetByteSize
llvm::Optional< uint64_t > GetByteSize(ExecutionContextScope *exe_scope) const
Return the size of the type in bytes.
Definition: CompilerType.cpp:489
lldb_private::ValueObject::IsPointerType
virtual bool IsPointerType()
Definition: ValueObject.h:382
lldb_private::Stream
Definition: Stream.h:28
lldb_private::formatters::StringPrinter::DumpToStreamOptions::SetSourceSize
void SetSourceSize(uint32_t s)
Definition: StringPrinter.h:53
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::LibcxxUniquePtrSyntheticFrontEnd
LibcxxUniquePtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:467
lldb_private::formatters::VectorIteratorSyntheticFrontEnd
Definition: VectorIterator.h:21
Debugger.h
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibCxxMapIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:356
lldb_private::formatters::StringPrinter::DumpToStreamOptions::SetBinaryZeroIsTerminator
void SetBinaryZeroIsTerminator(bool e)
Definition: StringPrinter.h:61
Target.h
lldb_private::TypeSystemClang::CreateStructForIdentifier
CompilerType CreateStructForIdentifier(ConstString type_name, const std::initializer_list< std::pair< const char *, CompilerType >> &type_fields, bool packed=false)
Definition: TypeSystemClang.cpp:2269
lldb::eTypeSummaryCapped
@ eTypeSummaryCapped
Definition: lldb-enumerations.h:1118
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: LibCxx.cpp:390
lldb_private::formatters::LibcxxWStringSummaryProvider
bool LibcxxWStringSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:736
error
static llvm::raw_ostream & error(Stream &strm)
Definition: CommandReturnObject.cpp:17
LibcxxExtractStringViewData
static std::tuple< bool, ValueObjectSP, size_t > LibcxxExtractStringViewData(ValueObject &valobj)
Definition: LibCxx.cpp:845
ExtractLibcxxStringInfo
static llvm::Optional< std::pair< uint64_t, ValueObjectSP > > ExtractLibcxxStringInfo(ValueObject &valobj)
Determine the size in bytes of valobj (a libc++ std::string object) and extract its data payload.
Definition: LibCxx.cpp:560
lldb_private::Status::Success
bool Success() const
Test for success condition.
Definition: Status.cpp:287
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::LibcxxSharedPtrSyntheticFrontEnd
LibcxxSharedPtrSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:383
lldb_private::formatters::LibcxxStringViewSummaryProviderASCII
bool LibcxxStringViewSummaryProviderASCII(ValueObject &valueObj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:884
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::Update
bool Update() override
Definition: LibCxx.cpp:423
LLDB_INVALID_OFFSET
#define LLDB_INVALID_OFFSET
Definition: lldb-defines.h:85
lldb_private::DataExtractor
Definition: DataExtractor.h:48
lldb_private::formatters::StringPrinter::DumpToStreamOptions::SetQuote
void SetQuote(char q)
Definition: StringPrinter.h:49
lldb_private::formatters::LibcxxFunctionSummaryProvider
bool LibcxxFunctionSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:58
TypeSystemClang.h
lldb_private::ValueObject::GetChildMemberWithName
virtual lldb::ValueObjectSP GetChildMemberWithName(ConstString name, bool can_create)
Definition: ValueObject.cpp:468
lldb_private::formatters::LibcxxSmartPointerSummaryProvider
bool LibcxxSmartPointerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:106
lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStreamOptions::SetIsTruncated
void SetIsTruncated(bool t)
Definition: StringPrinter.h:140
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:395
lldb_private::StreamString::GetData
const char * GetData() const
Definition: StreamString.h:43
LibcxxWStringSummaryProvider
static bool LibcxxWStringSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, ValueObjectSP location_sp, size_t size)
Definition: LibCxx.cpp:673
lldb_private::ValueObject::GetNonSyntheticValue
virtual lldb::ValueObjectSP GetNonSyntheticValue()
Definition: ValueObject.h:592
LibcxxStringSummaryProvider
static bool LibcxxStringSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options, std::string prefix_token, ValueObjectSP location_sp, uint64_t size)
Definition: LibCxx.cpp:752
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::~LibcxxUniquePtrSyntheticFrontEnd
~LibcxxUniquePtrSyntheticFrontEnd() override
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::Update
bool Update() override
Definition: LibCxx.cpp:215
lldb_private::formatters::GetValueOfLibCXXCompressedPair
lldb::ValueObjectSP GetValueOfLibCXXCompressedPair(ValueObject &pair)
Definition: FormattersHelpers.cpp:150
lldb_private::ConstString
Definition: ConstString.h:40
lldb_private::StreamString
Definition: StreamString.h:23
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd
Definition: LibCxx.h:126
eLibcxxStringLayoutModeCSD
@ eLibcxxStringLayoutModeCSD
Definition: LibCxx.cpp:551
lldb::eBasicTypeVoid
@ eBasicTypeVoid
Definition: lldb-enumerations.h:743
lldb_private::formatters::StringPrinter::StringElementType::UTF32
@ UTF32
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
lldb_private::formatters::LibcxxStringSummaryProviderASCII
bool LibcxxStringSummaryProviderASCII(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:823
lldb_private::CPPLanguageRuntime::FindLibCppStdFunctionCallableInfo
LibCppStdFunctionCallableInfo FindLibCppStdFunctionCallableInfo(lldb::ValueObjectSP &valobj_sp)
Definition: CPPLanguageRuntime.cpp:100
CPPLanguageRuntime.h
ValueObject.h
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::Update
bool Update() override
Definition: LibCxx.cpp:508
lldb_private::LineEntry::line
uint32_t line
The source line number, or zero if there is no line number information.
Definition: LineEntry.h:143
lldb_private::formatters::LibcxxStringViewSummaryProviderUTF16
bool LibcxxStringViewSummaryProviderUTF16(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:891
ValueObjectConstResult.h
lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_case
LibCppStdFunctionCallableCase callable_case
Definition: CPPLanguageRuntime.h:36
lldb_private::Symbol::GetName
ConstString GetName() const
Definition: Symbol.cpp:501
ProcessStructReader.h
lldb_private::Status
Definition: Status.h:44
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::formatters::LibcxxContainerSummaryProvider
bool LibcxxContainerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:537
TypeSummary.h
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::~LibcxxSharedPtrSyntheticFrontEnd
~LibcxxSharedPtrSyntheticFrontEnd() override
uint32_t
lldb_private::ExecutionContext::GetBestExecutionContextScope
ExecutionContextScope * GetBestExecutionContextScope() const
Definition: ExecutionContext.cpp:214
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxUniquePtrSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:477
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibcxxSharedPtrSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:460
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:341
lldb_private::CompilerType::GetTypeSystem
TypeSystem * GetTypeSystem() const
Accessors.
Definition: CompilerType.h:162
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: LibCxx.cpp:524
lldb_private::formatters::LibcxxStringViewSummaryProviderUTF32
bool LibcxxStringViewSummaryProviderUTF32(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &summary_options)
Definition: LibCxx.cpp:898
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb_private::formatters::StringPrinter::StringElementType::UTF8
@ UTF8
FormatEntity.h
lldb_private::TypeSummaryOptions
Definition: TypeSummary.h:26
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:9797
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:216
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::GetIndexOfChildWithName
size_t GetIndexOfChildWithName(ConstString name) override
Definition: LibCxx.cpp:529
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
eLibcxxStringLayoutModeDSC
@ eLibcxxStringLayoutModeDSC
Definition: LibCxx.cpp:552
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::GetChildAtIndex
lldb::ValueObjectSP GetChildAtIndex(size_t idx) override
Definition: LibCxx.cpp:489
lldb_private::formatters::LibcxxUniquePointerSummaryProvider
bool LibcxxUniquePointerSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:149
Status.h
lldb_private::formatters
Definition: CXXFunctionPointer.h:15
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::TypeSummaryOptions::GetCapping
lldb::TypeSummaryCapping GetCapping() const
Definition: TypeSummary.cpp:33
LibCxx.h
lldb_private::TypeSystemClang::GetBasicType
CompilerType GetBasicType(lldb::BasicType type)
Definition: TypeSystemClang.cpp:930
lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo
Definition: CPPLanguageRuntime.h:31
lldb_private::TypeSystemClang
A TypeSystem implementation based on Clang.
Definition: TypeSystemClang.h:105
ConstString.h
lldb_private::ValueObject::GetTargetSP
lldb::TargetSP GetTargetSP() const
Definition: ValueObject.h:334
lldb_private::formatters::StringPrinter::ReadBufferAndDumpToStreamOptions::SetData
void SetData(DataExtractor &&d)
Definition: StringPrinter.h:136
StringPrinter.h
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: LibCxx.cpp:336
lldb_private::formatters::LibCxxVectorIteratorSyntheticFrontEndCreator
SyntheticChildrenFrontEnd * LibCxxVectorIteratorSyntheticFrontEndCreator(CXXSyntheticChildren *, lldb::ValueObjectSP)
Definition: LibCxx.cpp:372
Stream.h
lldb_private::CompilerType::GetFieldAtIndex
CompilerType GetFieldAtIndex(size_t idx, std::string &name, uint64_t *bit_offset_ptr, uint32_t *bitfield_bit_size_ptr, bool *is_bitfield_ptr) const
Definition: CompilerType.cpp:543
lldb_private::formatters::LibcxxWStringViewSummaryProvider
bool LibcxxWStringViewSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:905
lldb_private::formatters::LibcxxUniquePtrSyntheticFrontEnd::CalculateNumChildren
size_t CalculateNumChildren() override
Definition: LibCxx.cpp:484
lldb_private::CXXSyntheticChildren
Definition: TypeSynthetic.h:358
lldb_private::formatters::LibcxxOptionalSummaryProvider
bool LibcxxOptionalSummaryProvider(ValueObject &valobj, Stream &stream, const TypeSummaryOptions &options)
Definition: LibCxx.cpp:36
lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::callable_line_entry
LineEntry callable_line_entry
Definition: CPPLanguageRuntime.h:34
lldb_private::formatters::StringPrinter::DumpToStreamOptions::SetStream
void SetStream(Stream *s)
Definition: StringPrinter.h:33
FormattersHelpers.h
lldb_private::CPPLanguageRuntime
Definition: CPPLanguageRuntime.h:22
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd
Definition: LibCxx.h:106
lldb_private::DataBufferHeap
Definition: DataBufferHeap.h:30
lldb
Definition: SBAddress.h:15
Endian.h
lldb::eBasicTypeWChar
@ eBasicTypeWChar
Definition: lldb-enumerations.h:747
lldb_private::FileSpec::GetFilename
ConstString & GetFilename()
Filename string get accessor.
Definition: FileSpec.cpp:340
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd
Definition: LibCxx.h:77
DataBufferHeap.h
LibcxxStringLayoutMode
LibcxxStringLayoutMode
The field layout in a libc++ string (cap, side, data or data, size, cap).
Definition: LibCxx.cpp:550
lldb_private::formatters::LibcxxSharedPtrSyntheticFrontEnd::MightHaveChildren
bool MightHaveChildren() override
Definition: LibCxx.cpp:443
lldb::eFormatInvalid
@ eFormatInvalid
Definition: lldb-enumerations.h:157
lldb_private::CPPLanguageRuntime::LibCppStdFunctionCallableInfo::member_f_pointer_value
lldb::addr_t member_f_pointer_value
Definition: CPPLanguageRuntime.h:35
lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::LibCxxMapIteratorSyntheticFrontEnd
LibCxxMapIteratorSyntheticFrontEnd(lldb::ValueObjectSP valobj_sp)
Definition: LibCxx.cpp:209