LLDB mainline
SBCommandInterpreterRunOptions.h
Go to the documentation of this file.
1//===-- SBCommandInterpreterRunOptions.h ------------------------*- C++ -*-===//
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#ifndef LLDB_API_SBCOMMANDINTERPRETERRUNOPTIONS_H
10#define LLDB_API_SBCOMMANDINTERPRETERRUNOPTIONS_H
11
12#include <memory>
13
14#include "lldb/API/SBDefines.h"
15
16namespace lldb_private {
17class CommandInterpreterRunOptions;
18class CommandInterpreterRunResult;
19} // namespace lldb_private
20
21namespace lldb {
22
24 friend class SBDebugger;
26
27public:
31
33 operator=(const SBCommandInterpreterRunOptions &rhs);
34
35 bool GetStopOnContinue() const;
36
37 void SetStopOnContinue(bool);
38
39 bool GetStopOnError() const;
40
41 void SetStopOnError(bool);
42
43 bool GetStopOnCrash() const;
44
45 void SetStopOnCrash(bool);
46
47 bool GetEchoCommands() const;
48
49 void SetEchoCommands(bool);
50
51 bool GetEchoCommentCommands() const;
52
53 void SetEchoCommentCommands(bool echo);
54
55 bool GetPrintResults() const;
56
57 void SetPrintResults(bool);
58
59 bool GetPrintErrors() const;
60
61 void SetPrintErrors(bool);
62
63 bool GetAddToHistory() const;
64
65 void SetAddToHistory(bool);
66
67 bool GetAutoHandleEvents() const;
68
69 void SetAutoHandleEvents(bool);
70
71 bool GetSpawnThread() const;
72
73 void SetSpawnThread(bool);
74
75 bool GetAllowRepeats() const;
76
77 /// By default, RunCommandInterpreter will discard repeats if the
78 /// IOHandler being used is not interactive. Setting AllowRepeats to true
79 /// will override this behavior and always process empty lines in the input
80 /// as a repeat command.
81 void SetAllowRepeats(bool);
82
83private:
85
87
88 // This is set in the constructor and will always be valid.
89 mutable std::unique_ptr<lldb_private::CommandInterpreterRunOptions>
91};
92
93#ifndef SWIG
95 friend class SBDebugger;
97
98public:
102
104 operator=(const SBCommandInterpreterRunResult &rhs);
105
106 int GetNumberOfErrors() const;
107 lldb::CommandInterpreterResult GetResult() const;
108
109private:
112
113 // This is set in the constructor and will always be valid.
114 std::unique_ptr<lldb_private::CommandInterpreterRunResult> m_opaque_up;
115};
116#endif
117
118} // namespace lldb
119
120#endif // LLDB_API_SBCOMMANDINTERPRETERRUNOPTIONS_H
#define LLDB_API
Definition: SBDefines.h:28
std::unique_ptr< lldb_private::CommandInterpreterRunOptions > m_opaque_up
std::unique_ptr< lldb_private::CommandInterpreterRunResult > m_opaque_up
A class that represents a running process on the host machine.
Definition: SBAddress.h:15
CommandInterpreterResult
The result from a command interpreter run.