LLDB  mainline
DumpValueObjectOptions.cpp
Go to the documentation of this file.
1 //===-- DumpValueObjectOptions.cpp -----------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9 
11 
12 #include "lldb/Core/ValueObject.h"
13 
14 using namespace lldb;
15 using namespace lldb_private;
16 
17 DumpValueObjectOptions::DumpValueObjectOptions()
18  : m_summary_sp(), m_root_valobj_name(),
19  m_max_ptr_depth(PointerDepth{PointerDepth::Mode::Default, 0}),
21  m_scope_already_checked(false), m_flat_output(false), m_ignore_cap(false),
22  m_show_types(false), m_show_location(false), m_use_objc(false),
23  m_hide_root_type(false), m_hide_name(false), m_hide_value(false),
27 
31  m_use_synthetic = valobj.IsSynthetic();
33 }
34 
37  m_max_ptr_depth = depth;
38  return *this;
39 }
40 
43  m_max_depth = depth;
44  return *this;
45 }
46 
49  m_decl_printing_helper = helper;
50  return *this;
51 }
52 
54  m_show_types = show;
55  return *this;
56 }
57 
59  m_show_location = show;
60  return *this;
61 }
62 
64  m_use_objc = use;
65  return *this;
66 }
67 
69  if (!show)
71  else
73  return *this;
74 }
75 
78  m_use_dynamic = dyn;
79  return *this;
80 }
81 
84  m_use_synthetic = use_synthetic;
85  return *this;
86 }
87 
90  return *this;
91 }
92 
94  m_flat_output = flat;
95  return *this;
96 }
97 
100  m_omit_summary_depth = depth;
101  return *this;
102 }
103 
105  m_ignore_cap = ignore;
106  return *this;
107 }
108 
110  SetUseSyntheticValue(false);
112  SetIgnoreCap(true);
113  SetHideName(false);
114  SetHideValue(false);
115  SetUseTypeDisplayName(false);
116  SetAllowOnelinerMode(false);
117  return *this;
118 }
119 
121  m_format = format;
122  return *this;
123 }
124 
126 DumpValueObjectOptions::SetSummary(lldb::TypeSummaryImplSP summary) {
127  m_summary_sp = summary;
128  return *this;
129 }
130 
133  if (name)
134  m_root_valobj_name.assign(name);
135  else
136  m_root_valobj_name.clear();
137  return *this;
138 }
139 
142  m_hide_root_type = hide_root_type;
143  return *this;
144 }
145 
147  m_hide_name = hide_name;
148  return *this;
149 }
150 
152  m_hide_value = hide_value;
153  return *this;
154 }
155 
157  m_hide_pointer_value = hide;
158  return *this;
159 }
160 
163  lldb::LanguageType lang) {
164  m_varformat_language = lang;
165  return *this;
166 }
167 
169  m_run_validator = run;
170  return *this;
171 }
172 
176  return *this;
177 }
178 
181  m_allow_oneliner_mode = oneliner;
182  return *this;
183 }
184 
187  m_reveal_empty_aggregates = reveal;
188  return *this;
189 }
190 
194  return *this;
195 }
196 
198  const PointerAsArraySettings &ptr_array) {
199  m_pointer_as_array = ptr_array;
200  return *this;
201 }
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
virtual lldb::LanguageType GetPreferredDisplayLanguage()
DumpValueObjectOptions & SetMaximumDepth(uint32_t depth=0)
DumpValueObjectOptions & SetHideValue(bool hide_value=false)
DumpValueObjectOptions & SetSummary(lldb::TypeSummaryImplSP summary=lldb::TypeSummaryImplSP())
DumpValueObjectOptions & SetHideName(bool hide_name=false)
DumpValueObjectOptions & SetShowLocation(bool show=false)
DumpValueObjectOptions & SetElementCount(uint32_t element_count=0)
DumpValueObjectOptions & SetPointerAsArray(const PointerAsArraySettings &ptr_array)
DumpValueObjectOptions & SetScopeChecked(bool check=true)
DumpValueObjectOptions & SetUseObjectiveC(bool use=false)
DumpValueObjectOptions & SetShowSummary(bool show=true)
DumpValueObjectOptions & SetRootValueObjectName(const char *name=nullptr)
DumpValueObjectOptions & SetRunValidator(bool run=true)
#define UINT32_MAX
Definition: lldb-defines.h:31
DumpValueObjectOptions & SetUseDynamicType(lldb::DynamicValueType dyn=lldb::eNoDynamicValues)
LanguageType
Programming language type.
DumpValueObjectOptions & SetShowTypes(bool show=false)
DumpValueObjectOptions & SetIgnoreCap(bool ignore=false)
virtual bool IsSynthetic()
Definition: ValueObject.h:608
DumpValueObjectOptions & SetDeclPrintingHelper(DeclPrintingHelper helper)
DumpValueObjectOptions & SetHideRootType(bool hide_root_type=false)
DumpValueObjectOptions & SetMaximumPointerDepth(PointerDepth depth={PointerDepth::Mode::Never, 0})
lldb::DynamicValueType GetDynamicValueType()
DumpValueObjectOptions & SetAllowOnelinerMode(bool oneliner=false)
Definition: SBAddress.h:15
DumpValueObjectOptions & SetUseSyntheticValue(bool use_synthetic=true)
std::function< bool(ConstString, ConstString, const DumpValueObjectOptions &, Stream &)> DeclPrintingHelper
DumpValueObjectOptions & SetHidePointerValue(bool hide=false)
DumpValueObjectOptions & SetFlatOutput(bool flat=false)
DumpValueObjectOptions & SetFormat(lldb::Format format=lldb::eFormatDefault)
DumpValueObjectOptions & SetRevealEmptyAggregates(bool reveal=true)
DumpValueObjectOptions & SetOmitSummaryDepth(uint32_t depth=0)
DumpValueObjectOptions & SetUseTypeDisplayName(bool dis=false)
DumpValueObjectOptions & SetVariableFormatDisplayLanguage(lldb::LanguageType lang=lldb::eLanguageTypeUnknown)