22 m_implicit_expr_result_regex(
"\\$[0-9]+") {}
51 const char *repl_options) {
54 error.SetErrorString(
"must have a target to create a REPL");
57 lldb::REPLSP result = std::make_shared<ClangREPL>(language, *target);
58 target->
SetREPL(language, result);
66 static constexpr llvm::StringLiteral g_repl(
"repl.c");
75 return !source.empty();
98 if (llvm::Error
error = valobj_sp->Dump(*output_sp))
static llvm::raw_ostream & error(Stream &strm)
#define LLDB_PLUGIN_DEFINE(PluginName)
Implements a Clang-based REPL for C languages on top of LLDB's REPL framework.
ClangREPL(lldb::LanguageType language, Target &target)
lldb::LanguageType GetLanguage() override
const char * GetAutoIndentCharacters() override
lldb_private::RegularExpression m_implicit_expr_result_regex
A regex matching the implicitly created LLDB result variables.
static llvm::StringRef GetPluginNameStatic()
static lldb::REPLSP CreateInstance(Status &error, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options)
Status DoInitialization() override
void CompleteCode(const std::string ¤t_code, CompletionRequest &request) override
llvm::StringRef GetSourceFileBasename() override
lldb::offset_t GetDesiredIndentation(const StringList &lines, int cursor_position, int tab_size) override
bool SourceIsComplete(const std::string &source) override
bool PrintOneVariable(Debugger &debugger, lldb::StreamFileSP &output_sp, lldb::ValueObjectSP &valobj_sp, ExpressionVariable *var=nullptr) override
lldb::LanguageType m_language
The specific C language of this REPL.
"lldb/Utility/ArgCompletionRequest.h"
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
A class to manage flag bits.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
static bool UnregisterPlugin(ABICreateInstance create_callback)
bool Execute(llvm::StringRef string, llvm::SmallVectorImpl< llvm::StringRef > *matches=nullptr) const
Execute a regular expression match using the compiled regular expression that is already in this obje...
void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp)
#define LLDB_INVALID_OFFSET
A class that represents a running process on the host machine.
const char * toString(AppleArm64ExceptionClass EC)
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
LanguageType
Programming language type.
@ eLanguageTypeC_plus_plus_14
ISO C++:2014.
@ eLanguageTypeC11
ISO C:2011.
@ eLanguageTypeC99
ISO C:1999.
@ eLanguageTypeC_plus_plus_03
ISO C++:2003.
@ eLanguageTypeObjC_plus_plus
Objective-C++.
@ eLanguageTypeC_plus_plus_11
ISO C++:2011.
@ eLanguageTypeC89
ISO C:1989.
@ eLanguageTypeC
Non-standardized C, such as K&R.
@ eLanguageTypeObjC
Objective-C.
@ eLanguageTypeC_plus_plus
ISO C++:1998.
std::shared_ptr< lldb_private::StreamFile > StreamFileSP
std::shared_ptr< lldb_private::REPL > REPLSP
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
void Insert(lldb::LanguageType language)