LLDB  mainline
FormatManager.cpp
Go to the documentation of this file.
1 //===-- FormatManager.cpp -------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
11 #include "lldb/Core/Debugger.h"
16 #include "lldb/Target/Language.h"
17 #include "lldb/Utility/LLDBLog.h"
18 #include "lldb/Utility/Log.h"
19 #include "llvm/ADT/STLExtras.h"
20 
21 using namespace lldb;
22 using namespace lldb_private;
23 using namespace lldb_private::formatters;
24 
25 struct FormatInfo {
27  const char format_char; // One or more format characters that can be used for
28  // this format.
29  const char *format_name; // Long format name that can be used to specify the
30  // current format
31 };
32 
33 static constexpr FormatInfo g_format_infos[] = {
34  {eFormatDefault, '\0', "default"},
35  {eFormatBoolean, 'B', "boolean"},
36  {eFormatBinary, 'b', "binary"},
37  {eFormatBytes, 'y', "bytes"},
38  {eFormatBytesWithASCII, 'Y', "bytes with ASCII"},
39  {eFormatChar, 'c', "character"},
40  {eFormatCharPrintable, 'C', "printable character"},
41  {eFormatComplexFloat, 'F', "complex float"},
42  {eFormatCString, 's', "c-string"},
43  {eFormatDecimal, 'd', "decimal"},
44  {eFormatEnum, 'E', "enumeration"},
45  {eFormatHex, 'x', "hex"},
46  {eFormatHexUppercase, 'X', "uppercase hex"},
47  {eFormatFloat, 'f', "float"},
48  {eFormatOctal, 'o', "octal"},
49  {eFormatOSType, 'O', "OSType"},
50  {eFormatUnicode16, 'U', "unicode16"},
51  {eFormatUnicode32, '\0', "unicode32"},
52  {eFormatUnsigned, 'u', "unsigned decimal"},
53  {eFormatPointer, 'p', "pointer"},
54  {eFormatVectorOfChar, '\0', "char[]"},
55  {eFormatVectorOfSInt8, '\0', "int8_t[]"},
56  {eFormatVectorOfUInt8, '\0', "uint8_t[]"},
57  {eFormatVectorOfSInt16, '\0', "int16_t[]"},
58  {eFormatVectorOfUInt16, '\0', "uint16_t[]"},
59  {eFormatVectorOfSInt32, '\0', "int32_t[]"},
60  {eFormatVectorOfUInt32, '\0', "uint32_t[]"},
61  {eFormatVectorOfSInt64, '\0', "int64_t[]"},
62  {eFormatVectorOfUInt64, '\0', "uint64_t[]"},
63  {eFormatVectorOfFloat16, '\0', "float16[]"},
64  {eFormatVectorOfFloat32, '\0', "float32[]"},
65  {eFormatVectorOfFloat64, '\0', "float64[]"},
66  {eFormatVectorOfUInt128, '\0', "uint128_t[]"},
67  {eFormatComplexInteger, 'I', "complex integer"},
68  {eFormatCharArray, 'a', "character array"},
69  {eFormatAddressInfo, 'A', "address"},
70  {eFormatHexFloat, '\0', "hex float"},
71  {eFormatInstruction, 'i', "instruction"},
72  {eFormatVoid, 'v', "void"},
73  {eFormatUnicode8, 'u', "unicode8"},
74 };
75 
76 static_assert((sizeof(g_format_infos) / sizeof(g_format_infos[0])) ==
78  "All formats must have a corresponding info entry.");
79 
81 
82 static bool GetFormatFromFormatChar(char format_char, Format &format) {
83  for (uint32_t i = 0; i < g_num_format_infos; ++i) {
84  if (g_format_infos[i].format_char == format_char) {
85  format = g_format_infos[i].format;
86  return true;
87  }
88  }
89  format = eFormatInvalid;
90  return false;
91 }
92 
93 static bool GetFormatFromFormatName(llvm::StringRef format_name,
94  bool partial_match_ok, Format &format) {
95  uint32_t i;
96  for (i = 0; i < g_num_format_infos; ++i) {
97  if (format_name.equals_insensitive(g_format_infos[i].format_name)) {
98  format = g_format_infos[i].format;
99  return true;
100  }
101  }
102 
103  if (partial_match_ok) {
104  for (i = 0; i < g_num_format_infos; ++i) {
105  if (llvm::StringRef(g_format_infos[i].format_name)
106  .startswith_insensitive(format_name)) {
107  format = g_format_infos[i].format;
108  return true;
109  }
110  }
111  }
112  format = eFormatInvalid;
113  return false;
114 }
115 
116 void FormatManager::Changed() {
117  ++m_last_revision;
118  m_format_cache.Clear();
119  std::lock_guard<std::recursive_mutex> guard(m_language_categories_mutex);
120  for (auto &iter : m_language_categories_map) {
121  if (iter.second)
122  iter.second->GetFormatCache().Clear();
123  }
124 }
125 
126 bool FormatManager::GetFormatFromCString(const char *format_cstr,
127  bool partial_match_ok,
128  lldb::Format &format) {
129  bool success = false;
130  if (format_cstr && format_cstr[0]) {
131  if (format_cstr[1] == '\0') {
132  success = GetFormatFromFormatChar(format_cstr[0], format);
133  if (success)
134  return true;
135  }
136 
137  success = GetFormatFromFormatName(format_cstr, partial_match_ok, format);
138  }
139  if (!success)
140  format = eFormatInvalid;
141  return success;
142 }
143 
144 char FormatManager::GetFormatAsFormatChar(lldb::Format format) {
145  for (uint32_t i = 0; i < g_num_format_infos; ++i) {
146  if (g_format_infos[i].format == format)
147  return g_format_infos[i].format_char;
148  }
149  return '\0';
150 }
151 
152 const char *FormatManager::GetFormatAsCString(Format format) {
153  if (format >= eFormatDefault && format < kNumFormats)
154  return g_format_infos[format].format_name;
155  return nullptr;
156 }
157 
158 void FormatManager::EnableAllCategories() {
159  m_categories_map.EnableAllCategories();
160  std::lock_guard<std::recursive_mutex> guard(m_language_categories_mutex);
161  for (auto &iter : m_language_categories_map) {
162  if (iter.second)
163  iter.second->Enable();
164  }
165 }
166 
167 void FormatManager::DisableAllCategories() {
168  m_categories_map.DisableAllCategories();
169  std::lock_guard<std::recursive_mutex> guard(m_language_categories_mutex);
170  for (auto &iter : m_language_categories_map) {
171  if (iter.second)
172  iter.second->Disable();
173  }
174 }
175 
176 void FormatManager::GetPossibleMatches(
177  ValueObject &valobj, CompilerType compiler_type,
178  lldb::DynamicValueType use_dynamic, FormattersMatchVector &entries,
179  FormattersMatchCandidate::Flags current_flags, bool root_level) {
180  compiler_type = compiler_type.GetTypeForFormatters();
181  ConstString type_name(compiler_type.GetTypeName());
182  ScriptInterpreter *script_interpreter =
183  valobj.GetTargetSP()->GetDebugger().GetScriptInterpreter();
184  if (valobj.GetBitfieldBitSize() > 0) {
185  StreamString sstring;
186  sstring.Printf("%s:%d", type_name.AsCString(), valobj.GetBitfieldBitSize());
187  ConstString bitfieldname(sstring.GetString());
188  entries.push_back({bitfieldname, script_interpreter,
189  TypeImpl(compiler_type), current_flags});
190  }
191 
192  if (!compiler_type.IsMeaninglessWithoutDynamicResolution()) {
193  entries.push_back({type_name, script_interpreter, TypeImpl(compiler_type),
194  current_flags});
195 
196  ConstString display_type_name(compiler_type.GetTypeName());
197  if (display_type_name != type_name)
198  entries.push_back({display_type_name, script_interpreter,
199  TypeImpl(compiler_type), current_flags});
200  }
201 
202  for (bool is_rvalue_ref = true, j = true;
203  j && compiler_type.IsReferenceType(nullptr, &is_rvalue_ref); j = false) {
204  CompilerType non_ref_type = compiler_type.GetNonReferenceType();
205  GetPossibleMatches(valobj, non_ref_type, use_dynamic, entries,
206  current_flags.WithStrippedReference());
207  if (non_ref_type.IsTypedefType()) {
208  CompilerType deffed_referenced_type = non_ref_type.GetTypedefedType();
209  deffed_referenced_type =
210  is_rvalue_ref ? deffed_referenced_type.GetRValueReferenceType()
211  : deffed_referenced_type.GetLValueReferenceType();
212  // this is not exactly the usual meaning of stripping typedefs
213  GetPossibleMatches(
214  valobj, deffed_referenced_type,
215  use_dynamic, entries, current_flags.WithStrippedTypedef());
216  }
217  }
218 
219  if (compiler_type.IsPointerType()) {
220  CompilerType non_ptr_type = compiler_type.GetPointeeType();
221  GetPossibleMatches(valobj, non_ptr_type, use_dynamic, entries,
222  current_flags.WithStrippedPointer());
223  if (non_ptr_type.IsTypedefType()) {
224  CompilerType deffed_pointed_type =
225  non_ptr_type.GetTypedefedType().GetPointerType();
226  // this is not exactly the usual meaning of stripping typedefs
227  GetPossibleMatches(valobj, deffed_pointed_type, use_dynamic, entries,
228  current_flags.WithStrippedTypedef());
229  }
230  }
231 
232  // For arrays with typedef-ed elements, we add a candidate with the typedef
233  // stripped.
234  uint64_t array_size;
235  if (compiler_type.IsArrayType(nullptr, &array_size, nullptr)) {
236  ExecutionContext exe_ctx(valobj.GetExecutionContextRef());
237  CompilerType element_type = compiler_type.GetArrayElementType(
238  exe_ctx.GetBestExecutionContextScope());
239  if (element_type.IsTypedefType()) {
240  // Get the stripped element type and compute the stripped array type
241  // from it.
242  CompilerType deffed_array_type =
243  element_type.GetTypedefedType().GetArrayType(array_size);
244  // this is not exactly the usual meaning of stripping typedefs
245  GetPossibleMatches(
246  valobj, deffed_array_type,
247  use_dynamic, entries, current_flags.WithStrippedTypedef());
248  }
249  }
250 
251  for (lldb::LanguageType language_type :
252  GetCandidateLanguages(valobj.GetObjectRuntimeLanguage())) {
253  if (Language *language = Language::FindPlugin(language_type)) {
254  for (const FormattersMatchCandidate& candidate :
255  language->GetPossibleFormattersMatches(valobj, use_dynamic)) {
256  entries.push_back(candidate);
257  }
258  }
259  }
260 
261  // try to strip typedef chains
262  if (compiler_type.IsTypedefType()) {
263  CompilerType deffed_type = compiler_type.GetTypedefedType();
264  GetPossibleMatches(valobj, deffed_type, use_dynamic, entries,
265  current_flags.WithStrippedTypedef());
266  }
267 
268  if (root_level) {
269  do {
270  if (!compiler_type.IsValid())
271  break;
272 
273  CompilerType unqual_compiler_ast_type =
274  compiler_type.GetFullyUnqualifiedType();
275  if (!unqual_compiler_ast_type.IsValid())
276  break;
277  if (unqual_compiler_ast_type.GetOpaqueQualType() !=
278  compiler_type.GetOpaqueQualType())
279  GetPossibleMatches(valobj, unqual_compiler_ast_type, use_dynamic,
280  entries, current_flags);
281  } while (false);
282 
283  // if all else fails, go to static type
284  if (valobj.IsDynamic()) {
285  lldb::ValueObjectSP static_value_sp(valobj.GetStaticValue());
286  if (static_value_sp)
287  GetPossibleMatches(*static_value_sp.get(),
288  static_value_sp->GetCompilerType(), use_dynamic,
289  entries, current_flags, true);
290  }
291  }
292 }
293 
294 lldb::TypeFormatImplSP
295 FormatManager::GetFormatForType(lldb::TypeNameSpecifierImplSP type_sp) {
296  if (!type_sp)
297  return lldb::TypeFormatImplSP();
298  lldb::TypeFormatImplSP format_chosen_sp;
299  uint32_t num_categories = m_categories_map.GetCount();
300  lldb::TypeCategoryImplSP category_sp;
301  uint32_t prio_category = UINT32_MAX;
302  for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
303  category_sp = GetCategoryAtIndex(category_id);
304  if (!category_sp->IsEnabled())
305  continue;
306  lldb::TypeFormatImplSP format_current_sp =
307  category_sp->GetFormatForType(type_sp);
308  if (format_current_sp &&
309  (format_chosen_sp.get() == nullptr ||
310  (prio_category > category_sp->GetEnabledPosition()))) {
311  prio_category = category_sp->GetEnabledPosition();
312  format_chosen_sp = format_current_sp;
313  }
314  }
315  return format_chosen_sp;
316 }
317 
318 lldb::TypeSummaryImplSP
319 FormatManager::GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp) {
320  if (!type_sp)
321  return lldb::TypeSummaryImplSP();
322  lldb::TypeSummaryImplSP summary_chosen_sp;
323  uint32_t num_categories = m_categories_map.GetCount();
324  lldb::TypeCategoryImplSP category_sp;
325  uint32_t prio_category = UINT32_MAX;
326  for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
327  category_sp = GetCategoryAtIndex(category_id);
328  if (!category_sp->IsEnabled())
329  continue;
330  lldb::TypeSummaryImplSP summary_current_sp =
331  category_sp->GetSummaryForType(type_sp);
332  if (summary_current_sp &&
333  (summary_chosen_sp.get() == nullptr ||
334  (prio_category > category_sp->GetEnabledPosition()))) {
335  prio_category = category_sp->GetEnabledPosition();
336  summary_chosen_sp = summary_current_sp;
337  }
338  }
339  return summary_chosen_sp;
340 }
341 
342 lldb::TypeFilterImplSP
343 FormatManager::GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp) {
344  if (!type_sp)
345  return lldb::TypeFilterImplSP();
346  lldb::TypeFilterImplSP filter_chosen_sp;
347  uint32_t num_categories = m_categories_map.GetCount();
348  lldb::TypeCategoryImplSP category_sp;
349  uint32_t prio_category = UINT32_MAX;
350  for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
351  category_sp = GetCategoryAtIndex(category_id);
352  if (!category_sp->IsEnabled())
353  continue;
354  lldb::TypeFilterImplSP filter_current_sp(
355  (TypeFilterImpl *)category_sp->GetFilterForType(type_sp).get());
356  if (filter_current_sp &&
357  (filter_chosen_sp.get() == nullptr ||
358  (prio_category > category_sp->GetEnabledPosition()))) {
359  prio_category = category_sp->GetEnabledPosition();
360  filter_chosen_sp = filter_current_sp;
361  }
362  }
363  return filter_chosen_sp;
364 }
365 
366 lldb::ScriptedSyntheticChildrenSP
367 FormatManager::GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp) {
368  if (!type_sp)
369  return lldb::ScriptedSyntheticChildrenSP();
370  lldb::ScriptedSyntheticChildrenSP synth_chosen_sp;
371  uint32_t num_categories = m_categories_map.GetCount();
372  lldb::TypeCategoryImplSP category_sp;
373  uint32_t prio_category = UINT32_MAX;
374  for (uint32_t category_id = 0; category_id < num_categories; category_id++) {
375  category_sp = GetCategoryAtIndex(category_id);
376  if (!category_sp->IsEnabled())
377  continue;
378  lldb::ScriptedSyntheticChildrenSP synth_current_sp(
379  (ScriptedSyntheticChildren *)category_sp->GetSyntheticForType(type_sp)
380  .get());
381  if (synth_current_sp &&
382  (synth_chosen_sp.get() == nullptr ||
383  (prio_category > category_sp->GetEnabledPosition()))) {
384  prio_category = category_sp->GetEnabledPosition();
385  synth_chosen_sp = synth_current_sp;
386  }
387  }
388  return synth_chosen_sp;
389 }
390 
391 void FormatManager::ForEachCategory(TypeCategoryMap::ForEachCallback callback) {
392  m_categories_map.ForEach(callback);
393  std::lock_guard<std::recursive_mutex> guard(m_language_categories_mutex);
394  for (const auto &entry : m_language_categories_map) {
395  if (auto category_sp = entry.second->GetCategory()) {
396  if (!callback(category_sp))
397  break;
398  }
399  }
400 }
401 
402 lldb::TypeCategoryImplSP
403 FormatManager::GetCategory(ConstString category_name, bool can_create) {
404  if (!category_name)
405  return GetCategory(m_default_category_name);
406  lldb::TypeCategoryImplSP category;
407  if (m_categories_map.Get(category_name, category))
408  return category;
409 
410  if (!can_create)
411  return lldb::TypeCategoryImplSP();
412 
413  m_categories_map.Add(
414  category_name,
415  lldb::TypeCategoryImplSP(new TypeCategoryImpl(this, category_name)));
416  return GetCategory(category_name);
417 }
418 
419 lldb::Format FormatManager::GetSingleItemFormat(lldb::Format vector_format) {
420  switch (vector_format) {
421  case eFormatVectorOfChar:
422  return eFormatCharArray;
423 
428  return eFormatDecimal;
429 
435  return eFormatHex;
436 
440  return eFormatFloat;
441 
442  default:
443  return lldb::eFormatInvalid;
444  }
445 }
446 
447 bool FormatManager::ShouldPrintAsOneLiner(ValueObject &valobj) {
448  // if settings say no oneline whatsoever
449  if (valobj.GetTargetSP().get() &&
450  !valobj.GetTargetSP()->GetDebugger().GetAutoOneLineSummaries())
451  return false; // then don't oneline
452 
453  // if this object has a summary, then ask the summary
454  if (valobj.GetSummaryFormat().get() != nullptr)
455  return valobj.GetSummaryFormat()->IsOneLiner();
456 
457  // no children, no party
458  if (valobj.GetNumChildren() == 0)
459  return false;
460 
461  // ask the type if it has any opinion about this eLazyBoolCalculate == no
462  // opinion; other values should be self explanatory
463  CompilerType compiler_type(valobj.GetCompilerType());
464  if (compiler_type.IsValid()) {
465  switch (compiler_type.ShouldPrintAsOneLiner(&valobj)) {
466  case eLazyBoolNo:
467  return false;
468  case eLazyBoolYes:
469  return true;
470  case eLazyBoolCalculate:
471  break;
472  }
473  }
474 
475  size_t total_children_name_len = 0;
476 
477  for (size_t idx = 0; idx < valobj.GetNumChildren(); idx++) {
478  bool is_synth_val = false;
479  ValueObjectSP child_sp(valobj.GetChildAtIndex(idx, true));
480  // something is wrong here - bail out
481  if (!child_sp)
482  return false;
483 
484  // also ask the child's type if it has any opinion
485  CompilerType child_compiler_type(child_sp->GetCompilerType());
486  if (child_compiler_type.IsValid()) {
487  switch (child_compiler_type.ShouldPrintAsOneLiner(child_sp.get())) {
488  case eLazyBoolYes:
489  // an opinion of yes is only binding for the child, so keep going
490  case eLazyBoolCalculate:
491  break;
492  case eLazyBoolNo:
493  // but if the child says no, then it's a veto on the whole thing
494  return false;
495  }
496  }
497 
498  // if we decided to define synthetic children for a type, we probably care
499  // enough to show them, but avoid nesting children in children
500  if (child_sp->GetSyntheticChildren().get() != nullptr) {
501  ValueObjectSP synth_sp(child_sp->GetSyntheticValue());
502  // wait.. wat? just get out of here..
503  if (!synth_sp)
504  return false;
505  // but if we only have them to provide a value, keep going
506  if (!synth_sp->MightHaveChildren() &&
507  synth_sp->DoesProvideSyntheticValue())
508  is_synth_val = true;
509  else
510  return false;
511  }
512 
513  total_children_name_len += child_sp->GetName().GetLength();
514 
515  // 50 itself is a "randomly" chosen number - the idea is that
516  // overly long structs should not get this treatment
517  // FIXME: maybe make this a user-tweakable setting?
518  if (total_children_name_len > 50)
519  return false;
520 
521  // if a summary is there..
522  if (child_sp->GetSummaryFormat()) {
523  // and it wants children, then bail out
524  if (child_sp->GetSummaryFormat()->DoesPrintChildren(child_sp.get()))
525  return false;
526  }
527 
528  // if this child has children..
529  if (child_sp->GetNumChildren()) {
530  // ...and no summary...
531  // (if it had a summary and the summary wanted children, we would have
532  // bailed out anyway
533  // so this only makes us bail out if this has no summary and we would
534  // then print children)
535  if (!child_sp->GetSummaryFormat() && !is_synth_val) // but again only do
536  // that if not a
537  // synthetic valued
538  // child
539  return false; // then bail out
540  }
541  }
542  return true;
543 }
544 
545 ConstString FormatManager::GetTypeForCache(ValueObject &valobj,
546  lldb::DynamicValueType use_dynamic) {
547  ValueObjectSP valobj_sp = valobj.GetQualifiedRepresentationIfAvailable(
548  use_dynamic, valobj.IsSynthetic());
549  if (valobj_sp && valobj_sp->GetCompilerType().IsValid()) {
550  if (!valobj_sp->GetCompilerType().IsMeaninglessWithoutDynamicResolution())
551  return valobj_sp->GetQualifiedTypeName();
552  }
553  return ConstString();
554 }
555 
556 std::vector<lldb::LanguageType>
557 FormatManager::GetCandidateLanguages(lldb::LanguageType lang_type) {
558  switch (lang_type) {
568  default:
569  return {lang_type};
570  }
571  llvm_unreachable("Fully covered switch");
572 }
573 
575 FormatManager::GetCategoryForLanguage(lldb::LanguageType lang_type) {
576  std::lock_guard<std::recursive_mutex> guard(m_language_categories_mutex);
577  auto iter = m_language_categories_map.find(lang_type),
578  end = m_language_categories_map.end();
579  if (iter != end)
580  return iter->second.get();
581  LanguageCategory *lang_category = new LanguageCategory(lang_type);
582  m_language_categories_map[lang_type] =
583  LanguageCategory::UniquePointer(lang_category);
584  return lang_category;
585 }
586 
587 template <typename ImplSP>
588 ImplSP FormatManager::GetHardcoded(FormattersMatchData &match_data) {
589  ImplSP retval_sp;
590  for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
591  if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
592  if (lang_category->GetHardcoded(*this, match_data, retval_sp))
593  return retval_sp;
594  }
595  }
596  return retval_sp;
597 }
598 
599 template <typename ImplSP>
600 ImplSP FormatManager::Get(ValueObject &valobj,
601  lldb::DynamicValueType use_dynamic) {
602  FormattersMatchData match_data(valobj, use_dynamic);
603  if (ImplSP retval_sp = GetCached<ImplSP>(match_data))
604  return retval_sp;
605 
606  Log *log = GetLog(LLDBLog::DataFormatters);
607 
608  LLDB_LOGF(log, "[%s] Search failed. Giving language a chance.", __FUNCTION__);
609  for (lldb::LanguageType lang_type : match_data.GetCandidateLanguages()) {
610  if (LanguageCategory *lang_category = GetCategoryForLanguage(lang_type)) {
611  ImplSP retval_sp;
612  if (lang_category->Get(match_data, retval_sp))
613  if (retval_sp) {
614  LLDB_LOGF(log, "[%s] Language search success. Returning.",
615  __FUNCTION__);
616  return retval_sp;
617  }
618  }
619  }
620 
621  LLDB_LOGF(log, "[%s] Search failed. Giving hardcoded a chance.",
622  __FUNCTION__);
623  return GetHardcoded<ImplSP>(match_data);
624 }
625 
626 template <typename ImplSP>
627 ImplSP FormatManager::GetCached(FormattersMatchData &match_data) {
628  ImplSP retval_sp;
629  Log *log = GetLog(LLDBLog::DataFormatters);
630  if (match_data.GetTypeForCache()) {
631  LLDB_LOGF(log, "\n\n[%s] Looking into cache for type %s", __FUNCTION__,
632  match_data.GetTypeForCache().AsCString("<invalid>"));
633  if (m_format_cache.Get(match_data.GetTypeForCache(), retval_sp)) {
634  if (log) {
635  LLDB_LOGF(log, "[%s] Cache search success. Returning.", __FUNCTION__);
636  LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
637  m_format_cache.GetCacheHits(),
638  m_format_cache.GetCacheMisses());
639  }
640  return retval_sp;
641  }
642  LLDB_LOGF(log, "[%s] Cache search failed. Going normal route",
643  __FUNCTION__);
644  }
645 
646  m_categories_map.Get(match_data, retval_sp);
647  if (match_data.GetTypeForCache() && (!retval_sp || !retval_sp->NonCacheable())) {
648  LLDB_LOGF(log, "[%s] Caching %p for type %s", __FUNCTION__,
649  static_cast<void *>(retval_sp.get()),
650  match_data.GetTypeForCache().AsCString("<invalid>"));
651  m_format_cache.Set(match_data.GetTypeForCache(), retval_sp);
652  }
653  LLDB_LOGV(log, "Cache hits: {0} - Cache Misses: {1}",
654  m_format_cache.GetCacheHits(), m_format_cache.GetCacheMisses());
655  return retval_sp;
656 }
657 
658 lldb::TypeFormatImplSP
659 FormatManager::GetFormat(ValueObject &valobj,
660  lldb::DynamicValueType use_dynamic) {
661  return Get<lldb::TypeFormatImplSP>(valobj, use_dynamic);
662 }
663 
664 lldb::TypeSummaryImplSP
665 FormatManager::GetSummaryFormat(ValueObject &valobj,
666  lldb::DynamicValueType use_dynamic) {
667  return Get<lldb::TypeSummaryImplSP>(valobj, use_dynamic);
668 }
669 
670 lldb::SyntheticChildrenSP
671 FormatManager::GetSyntheticChildren(ValueObject &valobj,
672  lldb::DynamicValueType use_dynamic) {
673  return Get<lldb::SyntheticChildrenSP>(valobj, use_dynamic);
674 }
675 
676 FormatManager::FormatManager()
677  : m_last_revision(0), m_format_cache(), m_language_categories_mutex(),
678  m_language_categories_map(), m_named_summaries_map(this),
679  m_categories_map(this), m_default_category_name(ConstString("default")),
680  m_system_category_name(ConstString("system")),
681  m_vectortypes_category_name(ConstString("VectorTypes")) {
684 
689 }
690 
692  TypeSummaryImpl::Flags string_flags;
693  string_flags.SetCascades(true)
694  .SetSkipPointers(true)
695  .SetSkipReferences(false)
696  .SetDontShowChildren(true)
697  .SetDontShowValue(false)
698  .SetShowMembersOneLiner(false)
699  .SetHideItemNames(false);
700 
701  TypeSummaryImpl::Flags string_array_flags;
702  string_array_flags.SetCascades(true)
703  .SetSkipPointers(true)
704  .SetSkipReferences(false)
705  .SetDontShowChildren(true)
706  .SetDontShowValue(true)
707  .SetShowMembersOneLiner(false)
708  .SetHideItemNames(false);
709 
710  lldb::TypeSummaryImplSP string_format(
711  new StringSummaryFormat(string_flags, "${var%s}"));
712 
713  lldb::TypeSummaryImplSP string_array_format(
714  new StringSummaryFormat(string_array_flags, "${var%char[]}"));
715 
716  TypeCategoryImpl::SharedPointer sys_category_sp =
718 
719  sys_category_sp->AddTypeSummary(R"(^(unsigned )?char ?(\*|\[\])$)",
720  eFormatterMatchRegex, string_format);
721 
722  sys_category_sp->AddTypeSummary(R"(^((un)?signed )?char ?\[[0-9]+\]$)",
723  eFormatterMatchRegex, string_array_format);
724 
725  lldb::TypeSummaryImplSP ostype_summary(
727  .SetCascades(false)
728  .SetSkipPointers(true)
729  .SetSkipReferences(true)
730  .SetDontShowChildren(true)
731  .SetDontShowValue(false)
732  .SetShowMembersOneLiner(false)
733  .SetHideItemNames(false),
734  "${var%O}"));
735 
736  sys_category_sp->AddTypeSummary("OSType", eFormatterMatchExact,
737  ostype_summary);
738 
739  TypeFormatImpl::Flags fourchar_flags;
740  fourchar_flags.SetCascades(true).SetSkipPointers(true).SetSkipReferences(
741  true);
742 
743  AddFormat(sys_category_sp, lldb::eFormatOSType, ConstString("FourCharCode"),
744  fourchar_flags);
745 }
746 
748  TypeCategoryImpl::SharedPointer vectors_category_sp =
750 
751  TypeSummaryImpl::Flags vector_flags;
752  vector_flags.SetCascades(true)
753  .SetSkipPointers(true)
754  .SetSkipReferences(false)
755  .SetDontShowChildren(true)
756  .SetDontShowValue(false)
758  .SetHideItemNames(true);
759 
760  AddStringSummary(vectors_category_sp, "${var.uint128}",
761  ConstString("builtin_type_vec128"), vector_flags);
762  AddStringSummary(vectors_category_sp, "", ConstString("float[4]"),
763  vector_flags);
764  AddStringSummary(vectors_category_sp, "", ConstString("int32_t[4]"),
765  vector_flags);
766  AddStringSummary(vectors_category_sp, "", ConstString("int16_t[8]"),
767  vector_flags);
768  AddStringSummary(vectors_category_sp, "", ConstString("vDouble"),
769  vector_flags);
770  AddStringSummary(vectors_category_sp, "", ConstString("vFloat"),
771  vector_flags);
772  AddStringSummary(vectors_category_sp, "", ConstString("vSInt8"),
773  vector_flags);
774  AddStringSummary(vectors_category_sp, "", ConstString("vSInt16"),
775  vector_flags);
776  AddStringSummary(vectors_category_sp, "", ConstString("vSInt32"),
777  vector_flags);
778  AddStringSummary(vectors_category_sp, "", ConstString("vUInt16"),
779  vector_flags);
780  AddStringSummary(vectors_category_sp, "", ConstString("vUInt8"),
781  vector_flags);
782  AddStringSummary(vectors_category_sp, "", ConstString("vUInt16"),
783  vector_flags);
784  AddStringSummary(vectors_category_sp, "", ConstString("vUInt32"),
785  vector_flags);
786  AddStringSummary(vectors_category_sp, "", ConstString("vBool32"),
787  vector_flags);
788 }
lldb_private::FormattersMatchData
Definition: FormatClasses.h:124
lldb_private::CompilerType::GetNonReferenceType
CompilerType GetNonReferenceType() const
If this type is a reference to a type (L value or R value reference), return a new type with the refe...
Definition: CompilerType.cpp:459
lldb::eFormatVectorOfUInt64
@ eFormatVectorOfUInt64
Definition: lldb-enumerations.h:188
lldb::eFormatOSType
@ eFormatOSType
OS character codes encoded into an integer 'PICT' 'text' etc...
Definition: lldb-enumerations.h:174
lldb_private::ScriptedSyntheticChildren
Definition: TypeSynthetic.h:387
lldb::eFormatPointer
@ eFormatPointer
Definition: lldb-enumerations.h:179
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
g_format_infos
static constexpr FormatInfo g_format_infos[]
Definition: FormatManager.cpp:33
lldb_private::FormatManager::LoadVectorFormatters
void LoadVectorFormatters()
Definition: FormatManager.cpp:747
lldb::eFormatVectorOfChar
@ eFormatVectorOfChar
Definition: lldb-enumerations.h:180
lldb::eFormatVectorOfUInt128
@ eFormatVectorOfUInt128
Definition: lldb-enumerations.h:192
lldb::Format
Format
Display format definitions.
Definition: lldb-enumerations.h:156
lldb_private::ValueObject::IsDynamic
virtual bool IsDynamic()
Definition: ValueObject.h:637
lldb_private::FormattersMatchCandidate::Flags::WithStrippedReference
Flags WithStrippedReference()
Definition: FormatClasses.h:63
lldb_private::TypeSummaryImpl::Flags::SetDontShowChildren
Flags & SetDontShowChildren(bool value=true)
Definition: TypeSummary.h:121
lldb_private::ValueObject::IsSynthetic
virtual bool IsSynthetic()
Definition: ValueObject.h:598
FormatManager.h
lldb::eLanguageTypeC99
@ eLanguageTypeC99
ISO C:1999.
Definition: lldb-enumerations.h:456
lldb_private::TypeSummaryImpl::Flags
Definition: TypeSummary.h:53
lldb_private::CompilerType::GetTypeName
ConstString GetTypeName(bool BaseOnly=false) const
Definition: CompilerType.cpp:322
lldb_private::eLazyBoolYes
@ eLazyBoolYes
Definition: lldb-private-enumerations.h:115
LLDB_LOGF
#define LLDB_LOGF(log,...)
Definition: Log.h:344
lldb::eFormatInstruction
@ eFormatInstruction
Disassemble an opcode.
Definition: lldb-enumerations.h:200
lldb_private::FormattersMatchCandidate::Flags::WithStrippedTypedef
Flags WithStrippedTypedef()
Definition: FormatClasses.h:70
lldb::eFormatVectorOfSInt16
@ eFormatVectorOfSInt16
Definition: lldb-enumerations.h:183
lldb::eFormatVectorOfSInt32
@ eFormatVectorOfSInt32
Definition: lldb-enumerations.h:185
lldb_private::formatters::AddFormat
void AddFormat(TypeCategoryImpl::SharedPointer category_sp, lldb::Format format, ConstString type_name, TypeFormatImpl::Flags flags, bool regex=false)
Definition: FormattersHelpers.cpp:24
lldb_private::ValueObject::GetQualifiedRepresentationIfAvailable
lldb::ValueObjectSP GetQualifiedRepresentationIfAvailable(lldb::DynamicValueType dynValue, bool synthValue)
Definition: ValueObject.cpp:2607
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:443
lldb_private::TypeFilterImpl
Definition: TypeSynthetic.h:277
lldb::eFormatBoolean
@ eFormatBoolean
Definition: lldb-enumerations.h:159
lldb_private::ConstString::AsCString
const char * AsCString(const char *value_if_empty=nullptr) const
Get the string value as a C string.
Definition: ConstString.h:192
lldb_private::CompilerType::GetOpaqueQualType
lldb::opaque_compiler_type_t GetOpaqueQualType() const
Definition: CompilerType.h:232
lldb_private::ValueObject::GetBitfieldBitSize
virtual uint32_t GetBitfieldBitSize()
Definition: ValueObject.h:424
lldb_private::FormatManager::GetCategory
lldb::TypeCategoryImplSP GetCategory(const char *category_name=nullptr, bool can_create=true)
Definition: FormatManager.h:99
lldb::eFormatBytesWithASCII
@ eFormatBytesWithASCII
Definition: lldb-enumerations.h:162
Language.h
Debugger.h
LLDB_LOGV
#define LLDB_LOGV(log,...)
Definition: Log.h:351
lldb_private::StreamString::GetString
llvm::StringRef GetString() const
Definition: StreamString.cpp:51
lldb::eLanguageTypeC_plus_plus_11
@ eLanguageTypeC_plus_plus_11
ISO C++:2011.
Definition: lldb-enumerations.h:472
lldb::eFormatVectorOfSInt8
@ eFormatVectorOfSInt8
Definition: lldb-enumerations.h:181
lldb_private::formatters::AddStringSummary
void AddStringSummary(TypeCategoryImpl::SharedPointer category_sp, const char *string, ConstString type_name, TypeSummaryImpl::Flags flags, bool regex=false)
Definition: FormattersHelpers.cpp:42
lldb_private::ValueObject::GetChildAtIndex
virtual lldb::ValueObjectSP GetChildAtIndex(size_t idx, bool can_create)
Definition: ValueObject.cpp:376
lldb::eFormatBytes
@ eFormatBytes
Definition: lldb-enumerations.h:161
lldb_private::CompilerType::GetPointeeType
CompilerType GetPointeeType() const
If this type is a pointer type, return the type that the pointer points to, else return an invalid ty...
Definition: CompilerType.cpp:466
lldb_private::CompilerType::IsMeaninglessWithoutDynamicResolution
bool IsMeaninglessWithoutDynamicResolution() const
Definition: CompilerType.cpp:794
lldb::eFormatVectorOfFloat64
@ eFormatVectorOfFloat64
Definition: lldb-enumerations.h:191
lldb_private::ValueObject::GetSummaryFormat
lldb::TypeSummaryImplSP GetSummaryFormat()
Definition: ValueObject.h:717
lldb_private::TypeFormatImpl::Flags::SetSkipReferences
Flags & SetSkipReferences(bool value=true)
Definition: TypeFormat.h:81
lldb::eFormatUnicode8
@ eFormatUnicode8
Definition: lldb-enumerations.h:202
lldb::eFormatVectorOfUInt32
@ eFormatVectorOfUInt32
Definition: lldb-enumerations.h:186
lldb::eLanguageTypeC_plus_plus_03
@ eLanguageTypeC_plus_plus_03
ISO C++:2003.
Definition: lldb-enumerations.h:471
lldb_private::LanguageCategory::UniquePointer
std::unique_ptr< LanguageCategory > UniquePointer
Definition: LanguageCategory.h:23
lldb_private::FormatManager::m_vectortypes_category_name
ConstString m_vectortypes_category_name
Definition: FormatManager.h:194
lldb_private::TypeCategoryMap::ForEachCallback
std::function< bool(const ValueSP &)> ForEachCallback
Definition: TypeCategoryMap.h:36
lldb_private::ValueObject::GetStaticValue
virtual lldb::ValueObjectSP GetStaticValue()
Definition: ValueObject.h:590
Log.h
lldb_private::TypeSummaryImpl::Flags::SetShowMembersOneLiner
Flags & SetShowMembersOneLiner(bool value=true)
Definition: TypeSummary.h:160
lldb_private::FormattersMatchVector
std::vector< FormattersMatchCandidate > FormattersMatchVector
Definition: FormatClasses.h:121
lldb_private::FormattersMatchData::GetTypeForCache
ConstString GetTypeForCache()
Definition: FormatClasses.cpp:39
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::StreamString
Definition: StreamString.h:23
lldb::eLanguageTypeC89
@ eLanguageTypeC89
ISO C:1989.
Definition: lldb-enumerations.h:445
lldb_private::FormattersMatchData::GetCandidateLanguages
CandidateLanguagesVector GetCandidateLanguages()
Definition: FormatClasses.cpp:41
lldb_private::CompilerType::GetArrayElementType
CompilerType GetArrayElementType(ExecutionContextScope *exe_scope) const
Creating related types.
Definition: CompilerType.cpp:382
lldb::eFormatDecimal
@ eFormatDecimal
Definition: lldb-enumerations.h:168
lldb::eLanguageTypeC11
@ eLanguageTypeC11
ISO C:2011.
Definition: lldb-enumerations.h:475
lldb_private::FormattersMatchCandidate
Definition: FormatClasses.h:45
lldb_private::CompilerType::IsReferenceType
bool IsReferenceType(CompilerType *pointee_type=nullptr, bool *is_rvalue=nullptr) const
Definition: CompilerType.cpp:203
lldb::DynamicValueType
DynamicValueType
Definition: lldb-enumerations.h:501
lldb_private::ValueObject::GetExecutionContextRef
const ExecutionContextRef & GetExecutionContextRef() const
Definition: ValueObject.h:330
lldb_private::CompilerType::IsTypedefType
bool IsTypedefType() const
Definition: CompilerType.cpp:271
lldb::eFormatVectorOfUInt16
@ eFormatVectorOfUInt16
Definition: lldb-enumerations.h:184
lldb::eLanguageTypeObjC
@ eLanguageTypeObjC
Objective-C.
Definition: lldb-enumerations.h:460
lldb::kNumFormats
@ kNumFormats
Definition: lldb-enumerations.h:203
lldb::eFormatterMatchExact
@ eFormatterMatchExact
Definition: lldb-enumerations.h:843
lldb::eLanguageTypeObjC_plus_plus
@ eLanguageTypeObjC_plus_plus
Objective-C++.
Definition: lldb-enumerations.h:461
lldb_private::LanguageCategory
Definition: LanguageCategory.h:21
lldb_private::TypeCategoryImpl::SharedPointer
std::shared_ptr< TypeCategoryImpl > SharedPointer
Definition: TypeCategory.h:357
lldb_private::CompilerType::IsValid
bool IsValid() const
Definition: CompilerType.h:124
lldb_private::CompilerType::GetLValueReferenceType
CompilerType GetLValueReferenceType() const
Return a new CompilerType that is a L value reference to this type if this type is valid and the type...
Definition: CompilerType.cpp:482
lldb_private::TypeSummaryImpl::Flags::SetCascades
Flags & SetCascades(bool value=true)
Definition: TypeSummary.h:82
lldb::eFormatVectorOfFloat16
@ eFormatVectorOfFloat16
Definition: lldb-enumerations.h:189
lldb::eFormatChar
@ eFormatChar
Definition: lldb-enumerations.h:163
GetFormatFromFormatName
static bool GetFormatFromFormatName(llvm::StringRef format_name, bool partial_match_ok, Format &format)
Definition: FormatManager.cpp:93
lldb::eFormatHexFloat
@ eFormatHexFloat
ISO C99 hex float string.
Definition: lldb-enumerations.h:199
lldb::eFormatVoid
@ eFormatVoid
Do not print this.
Definition: lldb-enumerations.h:201
lldb_private::ValueObject::GetNumChildren
size_t GetNumChildren(uint32_t max=UINT32_MAX)
Definition: ValueObject.cpp:497
lldb_private::TypeSummaryImpl::Flags::SetSkipPointers
Flags & SetSkipPointers(bool value=true)
Definition: TypeSummary.h:95
lldb_private::TypeSummaryImpl::Flags::SetDontShowValue
Flags & SetDontShowValue(bool value=true)
Definition: TypeSummary.h:147
lldb::eFormatUnicode16
@ eFormatUnicode16
Definition: lldb-enumerations.h:176
lldb::eFormatUnsigned
@ eFormatUnsigned
Definition: lldb-enumerations.h:178
FormatInfo::format
Format format
Definition: FormatManager.cpp:26
lldb_private::CompilerType::ShouldPrintAsOneLiner
LazyBool ShouldPrintAsOneLiner(ValueObject *valobj) const
Definition: CompilerType.cpp:787
lldb_private::ValueObject
ValueObject:
Definition: ValueObject.h:105
lldb_private::CompilerType::GetPointerType
CompilerType GetPointerType() const
Return a new CompilerType that is a pointer to this type.
Definition: CompilerType.cpp:474
LanguageCategory.h
uint32_t
lldb_private::eLazyBoolNo
@ eLazyBoolNo
Definition: lldb-private-enumerations.h:115
lldb_private::TypeFormatImpl::Flags
Definition: TypeFormat.h:26
lldb_private::FormatManager::LoadSystemFormatters
void LoadSystemFormatters()
Definition: FormatManager.cpp:691
lldb_private::ExecutionContext::GetBestExecutionContextScope
ExecutionContextScope * GetBestExecutionContextScope() const
Definition: ExecutionContext.cpp:214
lldb_private::Language
Definition: Language.h:29
lldb_private::CompilerType::IsPointerType
bool IsPointerType(CompilerType *pointee_type=nullptr) const
Definition: CompilerType.cpp:183
lldb::eFormatCString
@ eFormatCString
NULL terminated C strings.
Definition: lldb-enumerations.h:167
lldb::eFormatVectorOfSInt64
@ eFormatVectorOfSInt64
Definition: lldb-enumerations.h:187
lldb_private::CompilerType::IsArrayType
bool IsArrayType(CompilerType *element_type=nullptr, uint64_t *size=nullptr, bool *is_incomplete=nullptr) const
Definition: CompilerType.cpp:53
UINT32_MAX
#define UINT32_MAX
Definition: lldb-defines.h:19
lldb_private::ValueObject::GetCompilerType
CompilerType GetCompilerType()
Definition: ValueObject.h:352
lldb::eFormatCharPrintable
@ eFormatCharPrintable
Only printable characters, '.' if not printable.
Definition: lldb-enumerations.h:164
lldb::eLanguageTypeC_plus_plus_14
@ eLanguageTypeC_plus_plus_14
ISO C++:2014.
Definition: lldb-enumerations.h:479
GetFormatFromFormatChar
static bool GetFormatFromFormatChar(char format_char, Format &format)
Definition: FormatManager.cpp:82
lldb::eFormatCharArray
@ eFormatCharArray
Print characters with no single quotes, used for character arrays that can contain non printable char...
Definition: lldb-enumerations.h:194
lldb_private::ScriptInterpreter
Definition: ScriptInterpreter.h:128
lldb_private::CompilerType::GetTypedefedType
CompilerType GetTypedefedType() const
If the current object represents a typedef type, get the underlying type.
Definition: CompilerType.cpp:533
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
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::FormatManager::m_system_category_name
ConstString m_system_category_name
Definition: FormatManager.h:193
lldb::eFormatBinary
@ eFormatBinary
Definition: lldb-enumerations.h:160
g_num_format_infos
static uint32_t g_num_format_infos
Definition: FormatManager.cpp:80
lldb::eFormatComplexInteger
@ eFormatComplexInteger
Integer complex type.
Definition: lldb-enumerations.h:193
FormatInfo::format_char
const char format_char
Definition: FormatManager.cpp:27
lldb_private::formatters
Definition: CXXFunctionPointer.h:15
lldb::eLanguageTypeC
@ eLanguageTypeC
Non-standardized C, such as K&R.
Definition: lldb-enumerations.h:446
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb::eFormatHex
@ eFormatHex
Definition: lldb-enumerations.h:170
lldb_private::TypeImpl
Definition: Type.h:257
lldb_private::eLazyBoolCalculate
@ eLazyBoolCalculate
Definition: lldb-private-enumerations.h:115
lldb::eFormatUnicode32
@ eFormatUnicode32
Definition: lldb-enumerations.h:177
lldb::eFormatEnum
@ eFormatEnum
Definition: lldb-enumerations.h:169
lldb_private::TypeCategoryMap::Last
static const Position Last
Definition: TypeCategoryMap.h:42
lldb_private::ValueObject::GetTargetSP
lldb::TargetSP GetTargetSP() const
Definition: ValueObject.h:334
FormatInfo::format_name
const char * format_name
Definition: FormatManager.cpp:29
lldb_private::TypeFormatImpl::Flags::SetCascades
Flags & SetCascades(bool value=true)
Definition: TypeFormat.h:55
lldb_private::StringSummaryFormat
Definition: TypeSummary.h:278
lldb_private::TypeCategoryImpl
Definition: TypeCategory.h:167
lldb_private::FormattersMatchCandidate::Flags
Definition: FormatClasses.h:50
lldb_private::Log
Definition: Log.h:115
lldb::eFormatVectorOfFloat32
@ eFormatVectorOfFloat32
Definition: lldb-enumerations.h:190
lldb::eFormatComplexFloat
@ eFormatComplexFloat
Definition: lldb-enumerations.h:166
lldb_private::GetLog
Log * GetLog(Cat mask)
Retrieve the Log object for the channel associated with the given log enum.
Definition: Log.h:309
lldb::eFormatFloat
@ eFormatFloat
Definition: lldb-enumerations.h:172
lldb_private::TypeSummaryImpl::Flags::SetHideItemNames
Flags & SetHideItemNames(bool value=true)
Definition: TypeSummary.h:173
lldb_private::TypeFormatImpl::Flags::SetSkipPointers
Flags & SetSkipPointers(bool value=true)
Definition: TypeFormat.h:68
FormattersHelpers.h
lldb_private::CompilerType::GetTypeForFormatters
CompilerType GetTypeForFormatters() const
Definition: CompilerType.cpp:780
ScriptInterpreter.h
lldb
Definition: SBAddress.h:15
FormatInfo
Definition: FormatManager.cpp:25
lldb::eFormatAddressInfo
@ eFormatAddressInfo
Describe what an address points to (func + offset.
Definition: lldb-enumerations.h:197
LLDBLog.h
lldb::eFormatVectorOfUInt8
@ eFormatVectorOfUInt8
Definition: lldb-enumerations.h:182
lldb::eFormatDefault
@ eFormatDefault
Definition: lldb-enumerations.h:157
lldb_private::FormatManager::EnableCategory
void EnableCategory(ConstString category_name, TypeCategoryMap::Position pos=TypeCategoryMap::Default)
Definition: FormatManager.h:53
ExecutionContext.h
lldb_private::CompilerType::GetRValueReferenceType
CompilerType GetRValueReferenceType() const
Return a new CompilerType that is a R value reference to this type if this type is valid and the type...
Definition: CompilerType.cpp:489
lldb::eFormatterMatchRegex
@ eFormatterMatchRegex
Definition: lldb-enumerations.h:844
lldb_private::CompilerType::GetFullyUnqualifiedType
CompilerType GetFullyUnqualifiedType() const
Definition: CompilerType.cpp:405
lldb::eFormatOctal
@ eFormatOctal
Definition: lldb-enumerations.h:173
lldb_private::FormattersMatchCandidate::Flags::WithStrippedPointer
Flags WithStrippedPointer()
Definition: FormatClasses.h:56
lldb_private::ValueObject::GetObjectRuntimeLanguage
virtual lldb::LanguageType GetObjectRuntimeLanguage()
Definition: ValueObject.h:373
lldb::eFormatHexUppercase
@ eFormatHexUppercase
Definition: lldb-enumerations.h:171
lldb_private::CompilerType::GetArrayType
CompilerType GetArrayType(uint64_t size) const
Definition: CompilerType.cpp:390
lldb::eFormatInvalid
@ eFormatInvalid
Definition: lldb-enumerations.h:158
lldb_private::TypeSummaryImpl::Flags::SetSkipReferences
Flags & SetSkipReferences(bool value=true)
Definition: TypeSummary.h:108
lldb::eLanguageTypeC_plus_plus
@ eLanguageTypeC_plus_plus
ISO C++:1998.
Definition: lldb-enumerations.h:448