[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / lldb / source / Commands / CommandObjectExpression.h
blobde159863b43a28813cf326bf4f3101b07ac7a32d
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 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_CommandObjectExpression_h_
10 #define liblldb_CommandObjectExpression_h_
12 #include "lldb/Core/IOHandler.h"
13 #include "lldb/Interpreter/CommandObject.h"
14 #include "lldb/Interpreter/OptionGroupBoolean.h"
15 #include "lldb/Interpreter/OptionGroupFormat.h"
16 #include "lldb/Interpreter/OptionGroupValueObjectDisplay.h"
17 #include "lldb/lldb-private-enumerations.h"
18 namespace lldb_private {
20 class CommandObjectExpression : public CommandObjectRaw,
21 public IOHandlerDelegate {
22 public:
23 class CommandOptions : public OptionGroup {
24 public:
25 CommandOptions();
27 ~CommandOptions() override;
29 llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
31 Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
32 ExecutionContext *execution_context) override;
34 void OptionParsingStarting(ExecutionContext *execution_context) override;
36 bool top_level;
37 bool unwind_on_error;
38 bool ignore_breakpoints;
39 bool allow_jit;
40 bool show_types;
41 bool show_summary;
42 bool debug;
43 uint32_t timeout;
44 bool try_all_threads;
45 lldb::LanguageType language;
46 LanguageRuntimeDescriptionDisplayVerbosity m_verbosity;
47 LazyBool auto_apply_fixits;
50 CommandObjectExpression(CommandInterpreter &interpreter);
52 ~CommandObjectExpression() override;
54 Options *GetOptions() override;
56 void HandleCompletion(CompletionRequest &request) override;
58 protected:
59 // IOHandler::Delegate functions
60 void IOHandlerInputComplete(IOHandler &io_handler,
61 std::string &line) override;
63 bool IOHandlerIsInputComplete(IOHandler &io_handler,
64 StringList &lines) override;
66 bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
68 bool EvaluateExpression(llvm::StringRef expr, Stream *output_stream,
69 Stream *error_stream,
70 CommandReturnObject *result = nullptr);
72 void GetMultilineExpression();
74 OptionGroupOptions m_option_group;
75 OptionGroupFormat m_format_options;
76 OptionGroupValueObjectDisplay m_varobj_options;
77 OptionGroupBoolean m_repl_option;
78 CommandOptions m_command_options;
79 uint32_t m_expr_line_count;
80 std::string m_expr_lines; // Multi-line expression support
81 std::string m_fixed_expression; // Holds the current expression's fixed text.
84 } // namespace lldb_private
86 #endif // liblldb_CommandObjectExpression_h_