LLDB  mainline
CommandObjectExpression.h
Go to the documentation of this file.
1 //===-- CommandObjectExpression.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 liblldb_CommandObjectExpression_h_
10 #define liblldb_CommandObjectExpression_h_
11 
12 #include "lldb/Core/IOHandler.h"
19 namespace lldb_private {
20 
22  public IOHandlerDelegate {
23 public:
24  class CommandOptions : public OptionGroup {
25  public:
27 
28  ~CommandOptions() override;
29 
30  llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
31 
32  Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
33  ExecutionContext *execution_context) override;
34 
35  void OptionParsingStarting(ExecutionContext *execution_context) override;
36 
37  bool top_level;
40  bool allow_jit;
41  bool show_types;
43  bool debug;
49  };
50 
52 
53  ~CommandObjectExpression() override;
54 
55  Options *GetOptions() override;
56 
57  int HandleCompletion(CompletionRequest &request) override;
58 
59 protected:
60  // IOHandler::Delegate functions
61  void IOHandlerInputComplete(IOHandler &io_handler,
62  std::string &line) override;
63 
64  bool IOHandlerIsInputComplete(IOHandler &io_handler,
65  StringList &lines) override;
66 
67  bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
68 
69  bool EvaluateExpression(llvm::StringRef expr, Stream *output_stream,
70  Stream *error_stream,
71  CommandReturnObject *result = NULL);
72 
74 
81  std::string m_expr_lines; // Multi-line expression support
82  std::string m_fixed_expression; // Holds the current expression's fixed text.
83 };
84 
85 } // namespace lldb_private
86 
87 #endif // liblldb_CommandObjectExpression_h_
CommandObjectExpression(CommandInterpreter &interpreter)
Enumerations for broadcasting.
Definition: SBLaunchInfo.h:14
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
bool IOHandlerIsInputComplete(IOHandler &io_handler, StringList &lines) override
Called to determine whether typing enter after the last line in lines should end input.
llvm::ArrayRef< OptionDefinition > GetDefinitions() override
OptionGroupValueObjectDisplay m_varobj_options
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
void IOHandlerInputComplete(IOHandler &io_handler, std::string &line) override
Called when a line or lines have been retrieved.
A delegate class for use with IOHandler subclasses.
Definition: IOHandler.h:188
Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value, ExecutionContext *execution_context) override
"lldb/Utility/ArgCompletionRequest.h"
LanguageRuntimeDescriptionDisplayVerbosity m_verbosity
bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override
LanguageType
Programming language type.
bool EvaluateExpression(llvm::StringRef expr, Stream *output_stream, Stream *error_stream, CommandReturnObject *result=NULL)
A command line option parsing protocol class.
Definition: Options.h:62
void OptionParsingStarting(ExecutionContext *execution_context) override
int HandleCompletion(CompletionRequest &request) override
This default version handles calling option argument completions and then calls HandleArgumentComplet...
An error handling class.
Definition: Status.h:44