9#ifndef LLDB_EXPRESSION_REPL_H
10#define LLDB_EXPRESSION_REPL_H
18#include "llvm/Support/ExtensibleRTTI.h"
23 public llvm::RTTIExtends<REPL, llvm::RTTIRoot> {
57 const char *repl_options);
87 std::string &line)
override;
101 int cursor_position)
override;
104 std::string &line)
override;
125 return llvm::Error::success();
static llvm::raw_ostream & error(Stream &strm)
"lldb/Utility/ArgCompletionRequest.h"
A class to manage flag bits.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A delegate class for use with IOHandler subclasses.
const char * IOHandlerGetHelpPrologue() override
static int CalculateActualIndentation(const StringList &lines)
static char ID
LLVM RTTI support.
virtual Status DoInitialization()=0
llvm::StringRef IOHandlerGetControlSequence(char ch) override
virtual lldb::offset_t GetDesiredIndentation(const StringList &lines, int cursor_position, int tab_size)=0
const char * IOHandlerGetFixIndentationCharacters() override
int IOHandlerFixIndentation(IOHandler &io_handler, const StringList &lines, int cursor_position) override
Called when a new line is created or one of an identified set of indentation characters is typed.
virtual const char * GetAutoIndentCharacters()=0
OptionGroupValueObjectDisplay m_varobj_options
uint32_t m_current_indent_level
bool IOHandlerInterrupt(IOHandler &io_handler) override
static lldb::REPLSP Create(Status &Status, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options)
Get a REPL with an existing target (or, failing that, a debugger to use), and (optional) extra argume...
std::string m_current_indent_str
virtual llvm::StringRef GetSourceFileBasename()=0
virtual bool PrintOneVariable(Debugger &debugger, lldb::StreamFileSP &output_sp, lldb::ValueObjectSP &valobj_sp, ExpressionVariable *var=nullptr)=0
void IOHandlerComplete(IOHandler &io_handler, CompletionRequest &request) override
OptionGroupFormat m_format_options
EvaluateExpressionOptions m_expr_options
bool IOHandlerIsInputComplete(IOHandler &io_handler, StringList &lines) override
Called to determine whether typing enter after the last line in lines should end input.
std::string GetSourcePath()
bool m_enable_auto_indent
virtual bool SourceIsComplete(const std::string &source)=0
const char * IOHandlerGetCommandPrefix() override
void IOHandlerInputInterrupted(IOHandler &io_handler, std::string &line) override
void IOHandlerActivated(IOHandler &io_handler, bool interactive) override
virtual lldb::LanguageType GetLanguage()=0
void IOHandlerInputComplete(IOHandler &io_handler, std::string &line) override
Called when a line or lines have been retrieved.
lldb::IOHandlerSP m_io_handler_sp
void SetEvaluateOptions(const EvaluateExpressionOptions &options)
void SetValueObjectDisplayOptions(const OptionGroupValueObjectDisplay &options)
std::string m_compiler_options
std::string m_repl_source_path
lldb::IOHandlerSP GetIOHandler()
bool m_dedicated_repl_mode
virtual void CompleteCode(const std::string ¤t_code, CompletionRequest &request)=0
void SetFormatOptions(const OptionGroupFormat &options)
void SetCompilerOptions(const char *options)
virtual llvm::Error OnExpressionEvaluated(const ExecutionContext &exe_ctx, llvm::StringRef code, const EvaluateExpressionOptions &expr_options, lldb::ExpressionResults execution_results, const lldb::ValueObjectSP &result_valobj_sp, const Status &error)
Method that can be optionally overriden by subclasses to get notified whenever an expression has been...
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::IOHandler > IOHandlerSP
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
LanguageType
Programming language type.
ExpressionResults
The results of expression evaluation.
std::shared_ptr< lldb_private::StreamFile > StreamFileSP
std::shared_ptr< lldb_private::REPL > REPLSP