LLDB  mainline
SBCommandInterpreterRunOptions.cpp
Go to the documentation of this file.
1 //===-- SBCommandInterpreterRunOptions.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 
9 #include "lldb/lldb-types.h"
10 
11 #include "SBReproducerPrivate.h"
12 
15 
16 #include <memory>
17 
18 using namespace lldb;
19 using namespace lldb_private;
20 
23 
24  m_opaque_up = std::make_unique<CommandInterpreterRunOptions>();
25 }
26 
29  : m_opaque_up() {
32 
33  m_opaque_up = std::make_unique<CommandInterpreterRunOptions>(rhs.ref());
34 }
35 
37 
39  const SBCommandInterpreterRunOptions &rhs) {
43 
44  if (this == &rhs)
45  return LLDB_RECORD_RESULT(*this);
46  *m_opaque_up = *rhs.m_opaque_up;
47  return LLDB_RECORD_RESULT(*this);
48 }
49 
53 
54  return m_opaque_up->GetStopOnContinue();
55 }
56 
59  (bool), stop_on_continue);
60 
61  m_opaque_up->SetStopOnContinue(stop_on_continue);
62 }
63 
67 
68  return m_opaque_up->GetStopOnError();
69 }
70 
73  (bool), stop_on_error);
74 
75  m_opaque_up->SetStopOnError(stop_on_error);
76 }
77 
81 
82  return m_opaque_up->GetStopOnCrash();
83 }
84 
87  (bool), stop_on_crash);
88 
89  m_opaque_up->SetStopOnCrash(stop_on_crash);
90 }
91 
95 
96  return m_opaque_up->GetEchoCommands();
97 }
98 
101  (bool), echo_commands);
102 
103  m_opaque_up->SetEchoCommands(echo_commands);
104 }
105 
109 
110  return m_opaque_up->GetEchoCommentCommands();
111 }
112 
115  SetEchoCommentCommands, (bool), echo);
116 
117  m_opaque_up->SetEchoCommentCommands(echo);
118 }
119 
123 
124  return m_opaque_up->GetPrintResults();
125 }
126 
129  (bool), print_results);
130 
131  m_opaque_up->SetPrintResults(print_results);
132 }
133 
137 
138  return m_opaque_up->GetPrintErrors();
139 }
140 
143  (bool), print_errors);
144 
145  m_opaque_up->SetPrintErrors(print_errors);
146 }
147 
151 
152  return m_opaque_up->GetAddToHistory();
153 }
154 
157  (bool), add_to_history);
158 
159  m_opaque_up->SetAddToHistory(add_to_history);
160 }
161 
165 
166  return m_opaque_up->GetAutoHandleEvents();
167 }
168 
170  bool auto_handle_events) {
172  (bool), auto_handle_events);
173 
174  m_opaque_up->SetAutoHandleEvents(auto_handle_events);
175 }
176 
180 
181  return m_opaque_up->GetSpawnThread();
182 }
183 
186  (bool), spawn_thread);
187 
188  m_opaque_up->SetSpawnThread(spawn_thread);
189 }
190 
193  return m_opaque_up.get();
194 }
195 
198  return *m_opaque_up;
199 }
200 
202  : m_opaque_up(new CommandInterpreterRunResult())
203 
204 {
206 }
207 
210  : m_opaque_up(new CommandInterpreterRunResult()) {
212  (const lldb::SBCommandInterpreterRunResult &), rhs);
213 
214  *m_opaque_up = *rhs.m_opaque_up;
215 }
216 
218  const CommandInterpreterRunResult &rhs)
219  : m_opaque_up() {
220  m_opaque_up = std::make_unique<CommandInterpreterRunResult>(rhs);
221 }
222 
224 
226  const SBCommandInterpreterRunResult &rhs) {
229  (const lldb::SBCommandInterpreterRunResult &), rhs);
230 
231  if (this == &rhs)
232  return LLDB_RECORD_RESULT(*this);
233  *m_opaque_up = *rhs.m_opaque_up;
234  return LLDB_RECORD_RESULT(*this);
235 }
236 
240 
241  return m_opaque_up->GetNumErrors();
242 }
243 
248 
249  return m_opaque_up->GetResult();
250 }
251 
252 namespace lldb_private {
253 namespace repro {
254 
263  GetStopOnContinue, ());
264  LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnContinue,
265  (bool));
267  GetStopOnError, ());
269  (bool));
271  GetStopOnCrash, ());
273  (bool));
275  GetEchoCommands, ());
277  (bool));
279  GetEchoCommentCommands, ());
281  SetEchoCommentCommands, (bool));
283  GetPrintResults, ());
285  (bool));
287  GetPrintErrors, ());
289  (bool));
291  GetAddToHistory, ());
293  (bool));
295  GetAutoHandleEvents, ());
297  SetAutoHandleEvents, (bool));
299  GetSpawnThread, ());
301  (bool));
309  GetNumberOfErrors, ());
311  SBCommandInterpreterRunResult, GetResult, ());
312 }
313 
314 } // namespace repro
315 } // namespace lldb_private
lldb::SBCommandInterpreterRunOptions::operator=
SBCommandInterpreterRunOptions & operator=(const SBCommandInterpreterRunOptions &rhs)
Definition: SBCommandInterpreterRunOptions.cpp:38
lldb::SBCommandInterpreterRunOptions::SetSpawnThread
void SetSpawnThread(bool)
Definition: SBCommandInterpreterRunOptions.cpp:184
SBCommandInterpreterRunOptions.h
lldb::SBCommandInterpreterRunResult
Definition: SBCommandInterpreterRunOptions.h:85
lldb::SBCommandInterpreterRunOptions::GetStopOnContinue
bool GetStopOnContinue() const
Definition: SBCommandInterpreterRunOptions.cpp:50
lldb::SBCommandInterpreterRunOptions::GetEchoCommands
bool GetEchoCommands() const
Definition: SBCommandInterpreterRunOptions.cpp:92
lldb::SBCommandInterpreterRunResult::~SBCommandInterpreterRunResult
~SBCommandInterpreterRunResult()
LLDB_RECORD_RESULT
#define LLDB_RECORD_RESULT(Result)
Definition: ReproducerInstrumentation.h:211
LLDB_RECORD_METHOD_CONST_NO_ARGS
#define LLDB_RECORD_METHOD_CONST_NO_ARGS(Result, Class, Method)
Definition: ReproducerInstrumentation.h:168
lldb::SBCommandInterpreterRunResult::GetResult
lldb::CommandInterpreterResult GetResult() const
Definition: SBCommandInterpreterRunOptions.cpp:245
lldb_private::CommandInterpreterRunResult
Definition: CommandInterpreter.h:34
lldb::SBCommandInterpreterRunOptions::GetPrintResults
bool GetPrintResults() const
Definition: SBCommandInterpreterRunOptions.cpp:120
lldb::SBCommandInterpreterRunResult::m_opaque_up
std::unique_ptr< lldb_private::CommandInterpreterRunResult > m_opaque_up
Definition: SBCommandInterpreterRunOptions.h:105
lldb::SBCommandInterpreterRunOptions::GetStopOnCrash
bool GetStopOnCrash() const
Definition: SBCommandInterpreterRunOptions.cpp:78
lldb::SBCommandInterpreterRunOptions::SetAddToHistory
void SetAddToHistory(bool)
Definition: SBCommandInterpreterRunOptions.cpp:155
LLDB_RECORD_CONSTRUCTOR_NO_ARGS
#define LLDB_RECORD_CONSTRUCTOR_NO_ARGS(Class)
Definition: ReproducerInstrumentation.h:136
LLDB_REGISTER_METHOD_CONST
#define LLDB_REGISTER_METHOD_CONST(Result, Class, Method, Signature)
Definition: ReproducerInstrumentation.h:98
lldb::SBCommandInterpreterRunOptions::m_opaque_up
std::unique_ptr< lldb_private::CommandInterpreterRunOptions > m_opaque_up
Definition: SBCommandInterpreterRunOptions.h:82
lldb::SBCommandInterpreterRunOptions::SetStopOnCrash
void SetStopOnCrash(bool)
Definition: SBCommandInterpreterRunOptions.cpp:85
SBReproducerPrivate.h
lldb::SBCommandInterpreterRunOptions::SetAutoHandleEvents
void SetAutoHandleEvents(bool)
Definition: SBCommandInterpreterRunOptions.cpp:169
LLDB_REGISTER_CONSTRUCTOR
#define LLDB_REGISTER_CONSTRUCTOR(Class, Signature)
Definition: ReproducerInstrumentation.h:89
lldb_private::CommandInterpreterRunOptions
Definition: CommandInterpreter.h:59
lldb::SBCommandInterpreterRunOptions::GetAutoHandleEvents
bool GetAutoHandleEvents() const
Definition: SBCommandInterpreterRunOptions.cpp:162
lldb::SBCommandInterpreterRunOptions::ref
lldb_private::CommandInterpreterRunOptions & ref() const
Definition: SBCommandInterpreterRunOptions.cpp:197
LLDB_RECORD_METHOD
#define LLDB_RECORD_METHOD(Result, Class, Method, Signature,...)
Definition: ReproducerInstrumentation.h:158
lldb::SBCommandInterpreterRunOptions::GetSpawnThread
bool GetSpawnThread() const
Definition: SBCommandInterpreterRunOptions.cpp:177
lldb::SBCommandInterpreterRunOptions::GetAddToHistory
bool GetAddToHistory() const
Definition: SBCommandInterpreterRunOptions.cpp:148
lldb_private::repro::RegisterMethods< SBCommandInterpreterRunOptions >
void RegisterMethods< SBCommandInterpreterRunOptions >(Registry &R)
Definition: SBCommandInterpreterRunOptions.cpp:255
lldb::SBCommandInterpreterRunResult::operator=
SBCommandInterpreterRunResult & operator=(const SBCommandInterpreterRunResult &rhs)
Definition: SBCommandInterpreterRunOptions.cpp:225
lldb::SBCommandInterpreterRunOptions::get
lldb_private::CommandInterpreterRunOptions * get() const
Definition: SBCommandInterpreterRunOptions.cpp:192
lldb::SBCommandInterpreterRunOptions::SetPrintErrors
void SetPrintErrors(bool)
Definition: SBCommandInterpreterRunOptions.cpp:141
lldb::SBCommandInterpreterRunOptions::GetStopOnError
bool GetStopOnError() const
Definition: SBCommandInterpreterRunOptions.cpp:64
lldb-types.h
LLDB_RECORD_CONSTRUCTOR
#define LLDB_RECORD_CONSTRUCTOR(Class, Signature,...)
Definition: ReproducerInstrumentation.h:133
lldb::SBCommandInterpreterRunResult::SBCommandInterpreterRunResult
SBCommandInterpreterRunResult()
Definition: SBCommandInterpreterRunOptions.cpp:201
lldb_private::repro::Registry
The registry contains a unique mapping between functions and their ID.
Definition: ReproducerInstrumentation.h:517
lldb::SBCommandInterpreterRunOptions::GetEchoCommentCommands
bool GetEchoCommentCommands() const
Definition: SBCommandInterpreterRunOptions.cpp:106
lldb::SBCommandInterpreterRunOptions::GetPrintErrors
bool GetPrintErrors() const
Definition: SBCommandInterpreterRunOptions.cpp:134
lldb::SBCommandInterpreterRunOptions::SetEchoCommands
void SetEchoCommands(bool)
Definition: SBCommandInterpreterRunOptions.cpp:99
lldb::SBCommandInterpreterRunOptions::SetEchoCommentCommands
void SetEchoCommentCommands(bool echo)
Definition: SBCommandInterpreterRunOptions.cpp:113
lldb::SBCommandInterpreterRunResult::GetNumberOfErrors
int GetNumberOfErrors() const
Definition: SBCommandInterpreterRunOptions.cpp:237
lldb::SBCommandInterpreterRunOptions::SetStopOnError
void SetStopOnError(bool)
Definition: SBCommandInterpreterRunOptions.cpp:71
lldb::SBCommandInterpreterRunOptions::SetStopOnContinue
void SetStopOnContinue(bool)
Definition: SBCommandInterpreterRunOptions.cpp:57
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
CommandInterpreter.h
lldb::SBCommandInterpreterRunOptions
Definition: SBCommandInterpreterRunOptions.h:23
lldb::SBCommandInterpreterRunOptions::~SBCommandInterpreterRunOptions
~SBCommandInterpreterRunOptions()
lldb::CommandInterpreterResult
CommandInterpreterResult
The result from a command interpreter run.
Definition: lldb-enumerations.h:1122
lldb::SBCommandInterpreterRunOptions::SetPrintResults
void SetPrintResults(bool)
Definition: SBCommandInterpreterRunOptions.cpp:127
lldb
Definition: SBAddress.h:15
lldb::SBCommandInterpreterRunOptions::SBCommandInterpreterRunOptions
SBCommandInterpreterRunOptions()
Definition: SBCommandInterpreterRunOptions.cpp:21
LLDB_REGISTER_METHOD
#define LLDB_REGISTER_METHOD(Result, Class, Method, Signature)
Definition: ReproducerInstrumentation.h:93