LLDB  mainline
DumpValueObjectOptions.cpp
Go to the documentation of this file.
1 //===-- DumpValueObjectOptions.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/ValueObject.h"
12 
13 using namespace lldb;
14 using namespace lldb_private;
15 
16 DumpValueObjectOptions::DumpValueObjectOptions()
17  : m_summary_sp(), m_root_valobj_name(),
18  m_max_ptr_depth(PointerDepth{PointerDepth::Mode::Default, 0}),
20  m_scope_already_checked(false), m_flat_output(false), m_ignore_cap(false),
21  m_show_types(false), m_show_location(false), m_use_objc(false),
22  m_hide_root_type(false), m_hide_name(false), m_hide_value(false),
26 
30  m_use_synthetic = valobj.IsSynthetic();
32 }
33 
36  m_max_ptr_depth = depth;
37  return *this;
38 }
39 
42  m_max_depth = depth;
43  return *this;
44 }
45 
48  m_decl_printing_helper = helper;
49  return *this;
50 }
51 
53  m_show_types = show;
54  return *this;
55 }
56 
58  m_show_location = show;
59  return *this;
60 }
61 
63  m_use_objc = use;
64  return *this;
65 }
66 
68  if (!show)
70  else
72  return *this;
73 }
74 
77  m_use_dynamic = dyn;
78  return *this;
79 }
80 
83  m_use_synthetic = use_synthetic;
84  return *this;
85 }
86 
89  return *this;
90 }
91 
93  m_flat_output = flat;
94  return *this;
95 }
96 
99  m_omit_summary_depth = depth;
100  return *this;
101 }
102 
104  m_ignore_cap = ignore;
105  return *this;
106 }
107 
109  SetUseSyntheticValue(false);
111  SetIgnoreCap(true);
112  SetHideName(false);
113  SetHideValue(false);
114  SetUseTypeDisplayName(false);
115  SetAllowOnelinerMode(false);
116  return *this;
117 }
118 
120  m_format = format;
121  return *this;
122 }
123 
125 DumpValueObjectOptions::SetSummary(lldb::TypeSummaryImplSP summary) {
126  m_summary_sp = summary;
127  return *this;
128 }
129 
132  if (name)
133  m_root_valobj_name.assign(name);
134  else
135  m_root_valobj_name.clear();
136  return *this;
137 }
138 
141  m_hide_root_type = hide_root_type;
142  return *this;
143 }
144 
146  m_hide_name = hide_name;
147  return *this;
148 }
149 
151  m_hide_value = hide_value;
152  return *this;
153 }
154 
156  m_hide_pointer_value = hide;
157  return *this;
158 }
159 
162  lldb::LanguageType lang) {
163  m_varformat_language = lang;
164  return *this;
165 }
166 
168  m_run_validator = run;
169  return *this;
170 }
171 
175  return *this;
176 }
177 
180  m_allow_oneliner_mode = oneliner;
181  return *this;
182 }
183 
186  m_reveal_empty_aggregates = reveal;
187  return *this;
188 }
189 
193  return *this;
194 }
195 
197  const PointerAsArraySettings &ptr_array) {
198  m_pointer_as_array = ptr_array;
199  return *this;
200 }
A class that represents a running process on the host machine.
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)
Format
Display format definitions.
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:582
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)