LLDB mainline
|
Implements a Clang-based REPL for C languages on top of LLDB's REPL framework. More...
#include <ClangREPL.h>
Public Member Functions | |
ClangREPL (lldb::LanguageType language, Target &target) | |
~ClangREPL () override | |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static lldb::REPLSP | CreateInstance (Status &error, lldb::LanguageType language, Debugger *debugger, Target *target, const char *repl_options) |
static llvm::StringRef | GetPluginNameStatic () |
Static Public Attributes | |
static char | ID |
Protected Member Functions | |
Status | DoInitialization () override |
llvm::StringRef | GetSourceFileBasename () override |
const char * | GetAutoIndentCharacters () override |
bool | SourceIsComplete (const std::string &source) override |
lldb::offset_t | GetDesiredIndentation (const StringList &lines, int cursor_position, int tab_size) override |
lldb::LanguageType | GetLanguage () override |
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 |
Private Attributes | |
lldb::LanguageType | m_language |
The specific C language of this REPL. | |
lldb_private::RegularExpression | m_implicit_expr_result_regex |
A regex matching the implicitly created LLDB result variables. | |
Implements a Clang-based REPL for C languages on top of LLDB's REPL framework.
Definition at line 17 of file ClangREPL.h.
ClangREPL::ClangREPL | ( | lldb::LanguageType | language, |
Target & | target | ||
) |
Definition at line 20 of file ClangREPL.cpp.
|
overridedefault |
|
overrideprotected |
Definition at line 104 of file ClangREPL.cpp.
|
static |
Definition at line 48 of file ClangREPL.cpp.
References error(), and lldb_private::Target::SetREPL().
Referenced by Initialize(), and Terminate().
|
overrideprotected |
Definition at line 63 of file ClangREPL.cpp.
|
overrideprotected |
Definition at line 70 of file ClangREPL.cpp.
|
overrideprotected |
Definition at line 78 of file ClangREPL.cpp.
References LLDB_INVALID_OFFSET.
|
overrideprotected |
Definition at line 85 of file ClangREPL.cpp.
References m_language.
|
inlinestatic |
Definition at line 34 of file ClangREPL.h.
Referenced by Initialize().
|
overrideprotected |
Definition at line 65 of file ClangREPL.cpp.
|
static |
Definition at line 26 of file ClangREPL.cpp.
References CreateInstance(), lldb::eLanguageTypeC, lldb::eLanguageTypeC11, lldb::eLanguageTypeC89, lldb::eLanguageTypeC99, lldb::eLanguageTypeC_plus_plus, lldb::eLanguageTypeC_plus_plus_03, lldb::eLanguageTypeC_plus_plus_11, lldb::eLanguageTypeC_plus_plus_14, lldb::eLanguageTypeObjC, lldb::eLanguageTypeObjC_plus_plus, GetPluginNameStatic(), lldb_private::LanguageSet::Insert(), and lldb_private::PluginManager::RegisterPlugin().
|
overrideprotected |
Definition at line 87 of file ClangREPL.cpp.
References error(), lldb_private::RegularExpression::Execute(), lldb_private::ExpressionVariable::GetName(), lldb_private::ConstString::GetStringRef(), m_implicit_expr_result_regex, and lldb_private::toString().
|
overrideprotected |
Definition at line 72 of file ClangREPL.cpp.
|
static |
Definition at line 44 of file ClangREPL.cpp.
References CreateInstance(), and lldb_private::PluginManager::UnregisterPlugin().
|
static |
Definition at line 20 of file ClangREPL.h.
|
private |
A regex matching the implicitly created LLDB result variables.
Definition at line 62 of file ClangREPL.h.
Referenced by PrintOneVariable().
|
private |
The specific C language of this REPL.
Definition at line 60 of file ClangREPL.h.
Referenced by GetLanguage().