LLDB mainline
DataVisualization.cpp
Go to the documentation of this file.
1//===-- DataVisualization.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
12using namespace lldb;
13using namespace lldb_private;
14
16 static FormatManager g_format_manager;
17 return g_format_manager;
18}
19
21
25
29
32 lldb::DynamicValueType use_dynamic) {
33 return GetFormatManager().GetFormat(valobj, use_dynamic);
34}
35
40
43 lldb::DynamicValueType use_dynamic) {
44 return GetFormatManager().GetSummaryFormat(valobj, use_dynamic);
45}
46
51
57
62
67
70 bool allow_create) {
71 entry = GetFormatManager().GetCategory(category, allow_create);
72 return (entry.get() != nullptr);
73}
74
77 if (LanguageCategory *lang_category =
78 GetFormatManager().GetCategoryForLanguage(language))
79 entry = lang_category->GetCategory();
80 return (entry.get() != nullptr);
81}
82
86
91
95
99
102 if (GetFormatManager().GetCategory(category)->IsEnabled())
104 GetFormatManager().EnableCategory(category, pos, {});
105}
106
108 if (LanguageCategory *lang_category =
109 GetFormatManager().GetCategoryForLanguage(lang_type))
110 lang_category->Enable();
111}
112
114 if (GetFormatManager().GetCategory(category)->IsEnabled())
116}
117
119 if (LanguageCategory *lang_category =
120 GetFormatManager().GetCategoryForLanguage(lang_type))
121 lang_category->Disable();
122}
123
126 if (category.get()) {
127 if (category->IsEnabled())
129 GetFormatManager().EnableCategory(category, pos);
130 }
131}
132
134 const lldb::TypeCategoryImplSP &category) {
135 if (category.get() && category->IsEnabled())
137}
138
142
146
151
155
160
165
170
174
178
180 std::function<bool(const TypeMatcher &, const lldb::TypeSummaryImplSP &)>
181 callback) {
183}
184
static FormatManager & GetFormatManager()
A uniqued constant string class.
Definition ConstString.h:40
static bool Delete(ConstString category)
static void Add(ConstString category)
static void Disable(ConstString category)
static lldb::TypeCategoryImplSP GetCategoryAtIndex(size_t)
static void ForEach(TypeCategoryMap::ForEachCallback callback)
static void Enable(ConstString category, TypeCategoryMap::Position=TypeCategoryMap::Default)
static bool GetCategory(ConstString category, lldb::TypeCategoryImplSP &entry, bool allow_create=true)
static void Add(ConstString type, const lldb::TypeSummaryImplSP &entry)
static bool GetSummaryFormat(ConstString type, lldb::TypeSummaryImplSP &entry)
static void ForEach(std::function< bool(const TypeMatcher &, const lldb::TypeSummaryImplSP &)> callback)
static lldb::ScriptedSyntheticChildrenSP GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp)
static lldb::TypeFilterImplSP GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp)
static bool ShouldPrintAsOneLiner(ValueObject &valobj)
static lldb::TypeSummaryImplSP GetSummaryFormat(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
static lldb::TypeFormatImplSP GetFormat(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
static lldb::TypeFormatImplSP GetFormatForType(lldb::TypeNameSpecifierImplSP type_sp)
static lldb::SyntheticChildrenSP GetSyntheticChildren(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
static lldb::TypeSummaryImplSP GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp)
NamedSummariesMap & GetNamedSummaryContainer()
void EnableCategory(ConstString category_name, TypeCategoryMap::Position pos=TypeCategoryMap::Default)
lldb::TypeFormatImplSP GetFormatForType(lldb::TypeNameSpecifierImplSP type_sp)
lldb::TypeFormatImplSP GetFormat(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
lldb::TypeFilterImplSP GetFilterForType(lldb::TypeNameSpecifierImplSP type_sp)
bool ShouldPrintAsOneLiner(ValueObject &valobj)
lldb::TypeCategoryImplSP GetCategory(ConstString category_name, bool can_create=true)
lldb::TypeSummaryImplSP GetSummaryFormat(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
void ForEachCategory(TypeCategoryMap::ForEachCallback callback)
lldb::ScriptedSyntheticChildrenSP GetSyntheticForType(lldb::TypeNameSpecifierImplSP type_sp)
bool DeleteCategory(ConstString category_name)
lldb::TypeSummaryImplSP GetSummaryForType(lldb::TypeNameSpecifierImplSP type_sp)
lldb::SyntheticChildrenSP GetSyntheticChildren(ValueObject &valobj, lldb::DynamicValueType use_dynamic)
lldb::TypeCategoryImplSP GetCategoryAtIndex(size_t index)
uint32_t GetCurrentRevision() override
void DisableCategory(ConstString category_name)
void Add(TypeMatcher matcher, const ValueSP &entry)
bool GetExact(TypeMatcher matcher, ValueSP &entry)
void ForEach(ForEachCallback callback)
std::function< bool(const lldb::TypeCategoryImplSP &)> ForEachCallback
Class for matching type names.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::TypeSummaryImpl > TypeSummaryImplSP
std::shared_ptr< lldb_private::TypeFormatImpl > TypeFormatImplSP
std::shared_ptr< lldb_private::TypeNameSpecifierImpl > TypeNameSpecifierImplSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::SyntheticChildren > SyntheticChildrenSP
std::shared_ptr< lldb_private::TypeCategoryImpl > TypeCategoryImplSP
std::shared_ptr< lldb_private::ScriptedSyntheticChildren > ScriptedSyntheticChildrenSP
std::shared_ptr< lldb_private::TypeFilterImpl > TypeFilterImplSP