1 //===-- DumpValueObjectOptions.h --------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef lldb_DumpValueObjectOptions_h_
11 #define lldb_DumpValueObjectOptions_h_
17 // Other libraries and framework includes
19 #include "lldb/lldb-private.h"
20 #include "lldb/lldb-public.h"
25 namespace lldb_private {
27 class DumpValueObjectOptions
45 return PointerDepth {m_mode,m_count-1};
46 return PointerDepth {m_mode,m_count};
50 CanAllowExpansion () const;
53 CanAllowExpansion (bool is_root,
54 TypeSummaryImpl* entry,
56 const std::string& summary);
59 typedef std::function<bool(ConstString,
61 const DumpValueObjectOptions &,
62 Stream&)> DeclPrintingHelper;
64 static const DumpValueObjectOptions
67 static DumpValueObjectOptions g_default_options;
69 return g_default_options;
72 DumpValueObjectOptions();
74 DumpValueObjectOptions (const DumpValueObjectOptions& rhs) = default;
76 DumpValueObjectOptions (ValueObject& valobj);
78 DumpValueObjectOptions&
79 SetMaximumPointerDepth(PointerDepth depth = {PointerDepth::Mode::Never,0});
81 DumpValueObjectOptions&
82 SetMaximumDepth(uint32_t depth = 0);
84 DumpValueObjectOptions&
85 SetDeclPrintingHelper(DeclPrintingHelper helper);
87 DumpValueObjectOptions&
88 SetShowTypes(bool show = false);
90 DumpValueObjectOptions&
91 SetShowLocation(bool show = false);
93 DumpValueObjectOptions&
94 SetUseObjectiveC(bool use = false);
96 DumpValueObjectOptions&
97 SetShowSummary(bool show = true);
99 DumpValueObjectOptions&
100 SetUseDynamicType(lldb::DynamicValueType dyn = lldb::eNoDynamicValues);
102 DumpValueObjectOptions&
103 SetUseSyntheticValue(bool use_synthetic = true);
105 DumpValueObjectOptions&
106 SetScopeChecked(bool check = true);
108 DumpValueObjectOptions&
109 SetFlatOutput(bool flat = false);
111 DumpValueObjectOptions&
112 SetOmitSummaryDepth(uint32_t depth = 0);
114 DumpValueObjectOptions&
115 SetIgnoreCap(bool ignore = false);
117 DumpValueObjectOptions&
120 DumpValueObjectOptions&
121 SetFormat (lldb::Format format = lldb::eFormatDefault);
123 DumpValueObjectOptions&
124 SetSummary (lldb::TypeSummaryImplSP summary = lldb::TypeSummaryImplSP());
126 DumpValueObjectOptions&
127 SetRootValueObjectName(const char* name = nullptr);
129 DumpValueObjectOptions&
130 SetHideRootType (bool hide_root_type = false);
132 DumpValueObjectOptions&
133 SetHideName (bool hide_name = false);
135 DumpValueObjectOptions&
136 SetHideValue (bool hide_value = false);
138 DumpValueObjectOptions&
139 SetHidePointerValue (bool hide = false);
141 DumpValueObjectOptions&
142 SetVariableFormatDisplayLanguage (lldb::LanguageType lang = lldb::eLanguageTypeUnknown);
144 DumpValueObjectOptions&
145 SetRunValidator (bool run = true);
147 DumpValueObjectOptions&
148 SetUseTypeDisplayName (bool dis = false);
150 DumpValueObjectOptions&
151 SetAllowOnelinerMode (bool oneliner = false);
153 DumpValueObjectOptions&
154 SetRevealEmptyAggregates (bool reveal = true);
156 DumpValueObjectOptions&
157 SetElementCount (uint32_t element_count = 0);
160 uint32_t m_max_depth = UINT32_MAX;
161 lldb::DynamicValueType m_use_dynamic = lldb::eNoDynamicValues;
162 uint32_t m_omit_summary_depth = 0;
163 lldb::Format m_format = lldb::eFormatDefault;
164 lldb::TypeSummaryImplSP m_summary_sp;
165 std::string m_root_valobj_name;
166 lldb::LanguageType m_varformat_language = lldb::eLanguageTypeUnknown;
167 PointerDepth m_max_ptr_depth;
168 DeclPrintingHelper m_decl_printing_helper;
169 uint32_t m_element_count = 0;
170 bool m_use_synthetic : 1;
171 bool m_scope_already_checked : 1;
172 bool m_flat_output : 1;
173 bool m_ignore_cap : 1;
174 bool m_show_types : 1;
175 bool m_show_location : 1;
177 bool m_hide_root_type : 1;
178 bool m_hide_name : 1;
179 bool m_hide_value : 1;
180 bool m_run_validator : 1;
181 bool m_use_type_display_name : 1;
182 bool m_allow_oneliner_mode : 1;
183 bool m_hide_pointer_value : 1;
184 bool m_reveal_empty_aggregates : 1;
187 } // namespace lldb_private
189 #endif // lldb_DumpValueObjectOptions_h_