Go to the documentation of this file.
19 :
REPL(eKindClang, target), m_language(language),
20 m_implicit_expr_result_regex("\\$[0-9]+") {}
49 const char *repl_options) {
52 error.SetErrorString(
"must have a target to create a REPL");
55 lldb::REPLSP result = std::make_shared<ClangREPL>(language, *target);
56 target->
SetREPL(language, result);
72 return !source.empty();
85 lldb::StreamFileSP &output_sp,
86 lldb::ValueObjectSP &valobj_sp,
95 valobj_sp->Dump(*output_sp);
lldb::LanguageType GetLanguage() override
Status DoInitialization() override
static llvm::StringRef GetPluginNameStatic()
@ eLanguageTypeC99
ISO C:1999.
lldb::offset_t GetDesiredIndentation(const StringList &lines, int cursor_position, int tab_size) override
LanguageType
Programming language type.
void Insert(lldb::LanguageType language)
Implements a Clang-based REPL for C languages on top of LLDB's REPL framework.
const char * GetAutoIndentCharacters() override
@ eLanguageTypeC_plus_plus_11
ISO C++:2011.
static llvm::raw_ostream & error(Stream &strm)
@ eLanguageTypeC_plus_plus_03
ISO C++:2003.
static bool UnregisterPlugin(ABICreateInstance create_callback)
#define LLDB_INVALID_OFFSET
llvm::StringRef GetStringRef() const
Get the string value as a llvm::StringRef.
bool SourceIsComplete(const std::string &source) override
ConstString GetSourceFileBasename() override
lldb_private::RegularExpression m_implicit_expr_result_regex
A regex matching the implicitly created LLDB result variables.
lldb::LanguageType m_language
The specific C language of this REPL.
@ eLanguageTypeC89
ISO C:1989.
@ eLanguageTypeC11
ISO C:2011.
@ eLanguageTypeObjC
Objective-C.
string(SUBSTRING ${p} 10 -1 pStripped) if($
@ eLanguageTypeObjC_plus_plus
Objective-C++.
void SetREPL(lldb::LanguageType language, lldb::REPLSP repl_sp)
bool PrintOneVariable(Debugger &debugger, lldb::StreamFileSP &output_sp, lldb::ValueObjectSP &valobj_sp, ExpressionVariable *var=nullptr) override
void CompleteCode(const std::string ¤t_code, CompletionRequest &request) override
@ eLanguageTypeC_plus_plus_14
ISO C++:2014.
static bool RegisterPlugin(llvm::StringRef name, llvm::StringRef description, ABICreateInstance create_callback)
@ eLanguageTypeC
Non-standardized C, such as K&R.
A class that represents a running process on the host machine.
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...
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
#define LLDB_PLUGIN_DEFINE(PluginName)
static lldb::REPLSP CreateInstance(Status &error, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options)
@ eLanguageTypeC_plus_plus
ISO C++:1998.