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 
12 
15 
16 #include <memory>
17 
18 using namespace lldb;
19 using namespace lldb_private;
20 
22  LLDB_INSTRUMENT_VA(this);
23 
24  m_opaque_up = std::make_unique<CommandInterpreterRunOptions>();
25 }
26 
28  const SBCommandInterpreterRunOptions &rhs) {
29  LLDB_INSTRUMENT_VA(this, rhs);
30 
31  m_opaque_up = std::make_unique<CommandInterpreterRunOptions>(rhs.ref());
32 }
33 
35 
37  const SBCommandInterpreterRunOptions &rhs) {
38  LLDB_INSTRUMENT_VA(this, rhs);
39 
40  if (this == &rhs)
41  return *this;
42  *m_opaque_up = *rhs.m_opaque_up;
43  return *this;
44 }
45 
47  LLDB_INSTRUMENT_VA(this);
48 
49  return m_opaque_up->GetStopOnContinue();
50 }
51 
53  LLDB_INSTRUMENT_VA(this, stop_on_continue);
54 
55  m_opaque_up->SetStopOnContinue(stop_on_continue);
56 }
57 
59  LLDB_INSTRUMENT_VA(this);
60 
61  return m_opaque_up->GetStopOnError();
62 }
63 
65  LLDB_INSTRUMENT_VA(this, stop_on_error);
66 
67  m_opaque_up->SetStopOnError(stop_on_error);
68 }
69 
71  LLDB_INSTRUMENT_VA(this);
72 
73  return m_opaque_up->GetStopOnCrash();
74 }
75 
77  LLDB_INSTRUMENT_VA(this, stop_on_crash);
78 
79  m_opaque_up->SetStopOnCrash(stop_on_crash);
80 }
81 
83  LLDB_INSTRUMENT_VA(this);
84 
85  return m_opaque_up->GetEchoCommands();
86 }
87 
89  LLDB_INSTRUMENT_VA(this, echo_commands);
90 
91  m_opaque_up->SetEchoCommands(echo_commands);
92 }
93 
95  LLDB_INSTRUMENT_VA(this);
96 
97  return m_opaque_up->GetEchoCommentCommands();
98 }
99 
101  LLDB_INSTRUMENT_VA(this, echo);
102 
103  m_opaque_up->SetEchoCommentCommands(echo);
104 }
105 
107  LLDB_INSTRUMENT_VA(this);
108 
109  return m_opaque_up->GetPrintResults();
110 }
111 
113  LLDB_INSTRUMENT_VA(this, print_results);
114 
115  m_opaque_up->SetPrintResults(print_results);
116 }
117 
119  LLDB_INSTRUMENT_VA(this);
120 
121  return m_opaque_up->GetPrintErrors();
122 }
123 
125  LLDB_INSTRUMENT_VA(this, print_errors);
126 
127  m_opaque_up->SetPrintErrors(print_errors);
128 }
129 
131  LLDB_INSTRUMENT_VA(this);
132 
133  return m_opaque_up->GetAddToHistory();
134 }
135 
137  LLDB_INSTRUMENT_VA(this, add_to_history);
138 
139  m_opaque_up->SetAddToHistory(add_to_history);
140 }
141 
143  LLDB_INSTRUMENT_VA(this);
144 
145  return m_opaque_up->GetAutoHandleEvents();
146 }
147 
149  bool auto_handle_events) {
150  LLDB_INSTRUMENT_VA(this, auto_handle_events);
151 
152  m_opaque_up->SetAutoHandleEvents(auto_handle_events);
153 }
154 
156  LLDB_INSTRUMENT_VA(this);
157 
158  return m_opaque_up->GetSpawnThread();
159 }
160 
162  LLDB_INSTRUMENT_VA(this, spawn_thread);
163 
164  m_opaque_up->SetSpawnThread(spawn_thread);
165 }
166 
169  return m_opaque_up.get();
170 }
171 
174  return *m_opaque_up;
175 }
176 
178  : m_opaque_up(new CommandInterpreterRunResult())
179 
180 {
181  LLDB_INSTRUMENT_VA(this);
182 }
183 
186  : m_opaque_up(new CommandInterpreterRunResult()) {
187  LLDB_INSTRUMENT_VA(this, rhs);
188 
189  *m_opaque_up = *rhs.m_opaque_up;
190 }
191 
193  const CommandInterpreterRunResult &rhs) {
194  m_opaque_up = std::make_unique<CommandInterpreterRunResult>(rhs);
195 }
196 
198 
200  const SBCommandInterpreterRunResult &rhs) {
201  LLDB_INSTRUMENT_VA(this, rhs);
202 
203  if (this == &rhs)
204  return *this;
205  *m_opaque_up = *rhs.m_opaque_up;
206  return *this;
207 }
208 
210  LLDB_INSTRUMENT_VA(this);
211 
212  return m_opaque_up->GetNumErrors();
213 }
214 
217  LLDB_INSTRUMENT_VA(this);
218 
219  return m_opaque_up->GetResult();
220 }
lldb::SBCommandInterpreterRunOptions::operator=
SBCommandInterpreterRunOptions & operator=(const SBCommandInterpreterRunOptions &rhs)
Definition: SBCommandInterpreterRunOptions.cpp:36
lldb::SBCommandInterpreterRunOptions::SetSpawnThread
void SetSpawnThread(bool)
Definition: SBCommandInterpreterRunOptions.cpp:161
Instrumentation.h
SBCommandInterpreterRunOptions.h
lldb::SBCommandInterpreterRunResult
Definition: SBCommandInterpreterRunOptions.h:85
lldb::SBCommandInterpreterRunOptions::GetStopOnContinue
bool GetStopOnContinue() const
Definition: SBCommandInterpreterRunOptions.cpp:46
lldb::SBCommandInterpreterRunOptions::GetEchoCommands
bool GetEchoCommands() const
Definition: SBCommandInterpreterRunOptions.cpp:82
lldb::SBCommandInterpreterRunResult::~SBCommandInterpreterRunResult
~SBCommandInterpreterRunResult()
lldb::SBCommandInterpreterRunResult::GetResult
lldb::CommandInterpreterResult GetResult() const
Definition: SBCommandInterpreterRunOptions.cpp:216
lldb_private::CommandInterpreterRunResult
Definition: CommandInterpreter.h:34
lldb::SBCommandInterpreterRunOptions::GetPrintResults
bool GetPrintResults() const
Definition: SBCommandInterpreterRunOptions.cpp:106
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:70
lldb::SBCommandInterpreterRunOptions::SetAddToHistory
void SetAddToHistory(bool)
Definition: SBCommandInterpreterRunOptions.cpp:136
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:76
lldb::SBCommandInterpreterRunOptions::SetAutoHandleEvents
void SetAutoHandleEvents(bool)
Definition: SBCommandInterpreterRunOptions.cpp:148
lldb_private::CommandInterpreterRunOptions
Definition: CommandInterpreter.h:59
lldb::SBCommandInterpreterRunOptions::GetAutoHandleEvents
bool GetAutoHandleEvents() const
Definition: SBCommandInterpreterRunOptions.cpp:142
lldb::SBCommandInterpreterRunOptions::ref
lldb_private::CommandInterpreterRunOptions & ref() const
Definition: SBCommandInterpreterRunOptions.cpp:173
lldb::SBCommandInterpreterRunOptions::GetSpawnThread
bool GetSpawnThread() const
Definition: SBCommandInterpreterRunOptions.cpp:155
lldb::SBCommandInterpreterRunOptions::GetAddToHistory
bool GetAddToHistory() const
Definition: SBCommandInterpreterRunOptions.cpp:130
lldb::SBCommandInterpreterRunResult::operator=
SBCommandInterpreterRunResult & operator=(const SBCommandInterpreterRunResult &rhs)
Definition: SBCommandInterpreterRunOptions.cpp:199
lldb::SBCommandInterpreterRunOptions::get
lldb_private::CommandInterpreterRunOptions * get() const
Definition: SBCommandInterpreterRunOptions.cpp:168
lldb::SBCommandInterpreterRunOptions::SetPrintErrors
void SetPrintErrors(bool)
Definition: SBCommandInterpreterRunOptions.cpp:124
lldb::SBCommandInterpreterRunOptions::GetStopOnError
bool GetStopOnError() const
Definition: SBCommandInterpreterRunOptions.cpp:58
lldb-types.h
lldb::SBCommandInterpreterRunResult::SBCommandInterpreterRunResult
SBCommandInterpreterRunResult()
Definition: SBCommandInterpreterRunOptions.cpp:177
lldb::SBCommandInterpreterRunOptions::GetEchoCommentCommands
bool GetEchoCommentCommands() const
Definition: SBCommandInterpreterRunOptions.cpp:94
lldb::SBCommandInterpreterRunOptions::GetPrintErrors
bool GetPrintErrors() const
Definition: SBCommandInterpreterRunOptions.cpp:118
lldb::SBCommandInterpreterRunOptions::SetEchoCommands
void SetEchoCommands(bool)
Definition: SBCommandInterpreterRunOptions.cpp:88
lldb::SBCommandInterpreterRunOptions::SetEchoCommentCommands
void SetEchoCommentCommands(bool echo)
Definition: SBCommandInterpreterRunOptions.cpp:100
lldb::SBCommandInterpreterRunResult::GetNumberOfErrors
int GetNumberOfErrors() const
Definition: SBCommandInterpreterRunOptions.cpp:209
lldb::SBCommandInterpreterRunOptions::SetStopOnError
void SetStopOnError(bool)
Definition: SBCommandInterpreterRunOptions.cpp:64
lldb::SBCommandInterpreterRunOptions::SetStopOnContinue
void SetStopOnContinue(bool)
Definition: SBCommandInterpreterRunOptions.cpp:52
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
LLDB_INSTRUMENT_VA
#define LLDB_INSTRUMENT_VA(...)
Definition: Instrumentation.h:98
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:1141
lldb::SBCommandInterpreterRunOptions::SetPrintResults
void SetPrintResults(bool)
Definition: SBCommandInterpreterRunOptions.cpp:112
lldb
Definition: SBAddress.h:15
lldb::SBCommandInterpreterRunOptions::SBCommandInterpreterRunOptions
SBCommandInterpreterRunOptions()
Definition: SBCommandInterpreterRunOptions.cpp:21