LLDB mainline
SBVariablesOptions.cpp
Go to the documentation of this file.
1//===-- SBVariablesOptions.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#include "lldb/API/SBTarget.h"
11#include "lldb/Target/Target.h"
13
14#include "lldb/lldb-private.h"
15
16using namespace lldb;
17using namespace lldb_private;
18
20public:
25
27
29
31
33
35
36 bool GetIncludeRecognizedArguments(const lldb::TargetSP &target_sp) const {
39 return target_sp ? target_sp->GetDisplayRecognizedArguments() : false;
40 }
41
45
46 bool GetIncludeLocals() const { return m_include_locals; }
47
48 void SetIncludeLocals(bool b) { m_include_locals = b; }
49
50 bool GetIncludeStatics() const { return m_include_statics; }
51
53
55
57
58 bool GetInScopeOnly() const { return m_in_scope_only; }
59
60 void SetInScopeOnly(bool b) { m_in_scope_only = b; }
61
65
69
71
73
74private:
82 eLazyBoolCalculate; // can be overridden with a setting
84};
85
90
95
97operator=(const SBVariablesOptions &options) {
98 LLDB_INSTRUMENT_VA(this, options);
99
100 m_opaque_up = std::make_unique<VariablesOptionsImpl>(options.ref());
101 return *this;
102}
103
105
107 LLDB_INSTRUMENT_VA(this);
108 return this->operator bool();
109}
110SBVariablesOptions::operator bool() const {
111 LLDB_INSTRUMENT_VA(this);
112
113 return m_opaque_up != nullptr;
114}
115
117 LLDB_INSTRUMENT_VA(this);
118
119 return m_opaque_up->GetIncludeArguments();
120}
121
123 LLDB_INSTRUMENT_VA(this, arguments);
124
125 m_opaque_up->SetIncludeArguments(arguments);
126}
127
129 const lldb::SBTarget &target) const {
130 LLDB_INSTRUMENT_VA(this, target);
131
132 return m_opaque_up->GetIncludeRecognizedArguments(target.GetSP());
133}
134
136 LLDB_INSTRUMENT_VA(this, arguments);
137
138 m_opaque_up->SetIncludeRecognizedArguments(arguments);
139}
140
142 LLDB_INSTRUMENT_VA(this);
143
144 return m_opaque_up->GetIncludeLocals();
145}
146
148 LLDB_INSTRUMENT_VA(this, locals);
149
150 m_opaque_up->SetIncludeLocals(locals);
151}
152
154 LLDB_INSTRUMENT_VA(this);
155
156 return m_opaque_up->GetIncludeStatics();
157}
158
160 LLDB_INSTRUMENT_VA(this, statics);
161
162 m_opaque_up->SetIncludeStatics(statics);
163}
164
166 LLDB_INSTRUMENT_VA(this);
167
168 return m_opaque_up->GetIncludeSynthetic();
169}
170
172 LLDB_INSTRUMENT_VA(this, synthetic);
173
174 m_opaque_up->SetIncludeSynthetic(synthetic);
175}
176
178 LLDB_INSTRUMENT_VA(this);
179
180 return m_opaque_up->GetInScopeOnly();
181}
182
183void SBVariablesOptions::SetInScopeOnly(bool in_scope_only) {
184 LLDB_INSTRUMENT_VA(this, in_scope_only);
185
186 m_opaque_up->SetInScopeOnly(in_scope_only);
187}
188
190 LLDB_INSTRUMENT_VA(this);
191
192 return m_opaque_up->GetIncludeRuntimeSupportValues();
193}
194
196 bool runtime_support_values) {
197 LLDB_INSTRUMENT_VA(this, runtime_support_values);
198
199 m_opaque_up->SetIncludeRuntimeSupportValues(runtime_support_values);
200}
201
203 LLDB_INSTRUMENT_VA(this);
204
205 return m_opaque_up->GetUseDynamic();
206}
207
209 LLDB_INSTRUMENT_VA(this, dynamic);
210
211 m_opaque_up->SetUseDynamic(dynamic);
212}
213
217
219 return m_opaque_up.operator->();
220}
221
223
225
229
231 : m_opaque_up(std::move(lldb_object_ptr)) {}
232
234 m_opaque_up.reset(std::move(lldb_object_ptr));
235}
#define LLDB_INSTRUMENT_VA(...)
VariablesOptionsImpl(const VariablesOptionsImpl &)=default
bool GetIncludeRuntimeSupportValues() const
void SetIncludeRecognizedArguments(bool b)
void SetUseDynamic(lldb::DynamicValueType d)
lldb::DynamicValueType m_use_dynamic
VariablesOptionsImpl & operator=(const VariablesOptionsImpl &)=default
~VariablesOptionsImpl()=default
bool GetIncludeRecognizedArguments(const lldb::TargetSP &target_sp) const
void SetIncludeRuntimeSupportValues(bool b)
lldb::DynamicValueType GetUseDynamic() const
lldb::TargetSP GetSP() const
Definition SBTarget.cpp:592
SBVariablesOptions & operator=(const SBVariablesOptions &options)
void SetOptions(VariablesOptionsImpl *lldb_object_ptr)
std::unique_ptr< VariablesOptionsImpl > m_opaque_up
lldb::DynamicValueType GetUseDynamic() const
VariablesOptionsImpl & ref()
VariablesOptionsImpl * operator->()
void SetUseDynamic(lldb::DynamicValueType)
VariablesOptionsImpl * get()
bool GetIncludeRecognizedArguments(const lldb::SBTarget &) const
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::Target > TargetSP