Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:41

0001 //===-- SBCommandInterpreterRunOptions.h ------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_API_SBCOMMANDINTERPRETERRUNOPTIONS_H
0010 #define LLDB_API_SBCOMMANDINTERPRETERRUNOPTIONS_H
0011 
0012 #include <memory>
0013 
0014 #include "lldb/API/SBDefines.h"
0015 
0016 namespace lldb_private {
0017 class CommandInterpreterRunOptions;
0018 class CommandInterpreterRunResult;
0019 } // namespace lldb_private
0020 
0021 namespace lldb {
0022 
0023 class LLDB_API SBCommandInterpreterRunOptions {
0024   friend class SBDebugger;
0025   friend class SBCommandInterpreter;
0026 
0027 public:
0028   SBCommandInterpreterRunOptions();
0029   SBCommandInterpreterRunOptions(const SBCommandInterpreterRunOptions &rhs);
0030   ~SBCommandInterpreterRunOptions();
0031 
0032   SBCommandInterpreterRunOptions &
0033   operator=(const SBCommandInterpreterRunOptions &rhs);
0034 
0035   bool GetStopOnContinue() const;
0036 
0037   void SetStopOnContinue(bool);
0038 
0039   bool GetStopOnError() const;
0040 
0041   void SetStopOnError(bool);
0042 
0043   bool GetStopOnCrash() const;
0044 
0045   void SetStopOnCrash(bool);
0046 
0047   bool GetEchoCommands() const;
0048 
0049   void SetEchoCommands(bool);
0050 
0051   bool GetEchoCommentCommands() const;
0052 
0053   void SetEchoCommentCommands(bool echo);
0054 
0055   bool GetPrintResults() const;
0056 
0057   void SetPrintResults(bool);
0058 
0059   bool GetPrintErrors() const;
0060 
0061   void SetPrintErrors(bool);
0062 
0063   bool GetAddToHistory() const;
0064 
0065   void SetAddToHistory(bool);
0066 
0067   bool GetAutoHandleEvents() const;
0068 
0069   void SetAutoHandleEvents(bool);
0070 
0071   bool GetSpawnThread() const;
0072 
0073   void SetSpawnThread(bool);
0074 
0075   bool GetAllowRepeats() const;
0076 
0077   /// By default, RunCommandInterpreter will discard repeats if the
0078   /// IOHandler being used is not interactive.  Setting AllowRepeats to true
0079   /// will override this behavior and always process empty lines in the input
0080   /// as a repeat command.
0081   void SetAllowRepeats(bool);
0082 
0083 private:
0084   lldb_private::CommandInterpreterRunOptions *get() const;
0085 
0086   lldb_private::CommandInterpreterRunOptions &ref() const;
0087 
0088   // This is set in the constructor and will always be valid.
0089   mutable std::unique_ptr<lldb_private::CommandInterpreterRunOptions>
0090       m_opaque_up;
0091 };
0092 
0093 #ifndef SWIG
0094 class LLDB_API SBCommandInterpreterRunResult {
0095   friend class SBDebugger;
0096   friend class SBCommandInterpreter;
0097 
0098 public:
0099   SBCommandInterpreterRunResult();
0100   SBCommandInterpreterRunResult(const SBCommandInterpreterRunResult &rhs);
0101   ~SBCommandInterpreterRunResult();
0102 
0103   SBCommandInterpreterRunResult &
0104   operator=(const SBCommandInterpreterRunResult &rhs);
0105 
0106   int GetNumberOfErrors() const;
0107   lldb::CommandInterpreterResult GetResult() const;
0108 
0109 private:
0110   SBCommandInterpreterRunResult(
0111       const lldb_private::CommandInterpreterRunResult &rhs);
0112 
0113   // This is set in the constructor and will always be valid.
0114   std::unique_ptr<lldb_private::CommandInterpreterRunResult> m_opaque_up;
0115 };
0116 #endif
0117 
0118 } // namespace lldb
0119 
0120 #endif // LLDB_API_SBCOMMANDINTERPRETERRUNOPTIONS_H