LLDB mainline
|
#include <ScriptInterpreterLua.h>
Classes | |
class | CommandDataLua |
Static Public Member Functions | |
static void | Initialize () |
static void | Terminate () |
static lldb::ScriptInterpreterSP | CreateInstance (Debugger &debugger) |
static llvm::StringRef | GetPluginNameStatic () |
static llvm::StringRef | GetPluginDescriptionStatic () |
static bool | BreakpointCallbackFunction (void *baton, StoppointCallbackContext *context, lldb::user_id_t break_id, lldb::user_id_t break_loc_id) |
static bool | WatchpointCallbackFunction (void *baton, StoppointCallbackContext *context, lldb::user_id_t watch_id) |
Static Public Member Functions inherited from lldb_private::ScriptInterpreter | |
static std::string | LanguageToString (lldb::ScriptLanguage language) |
static lldb::ScriptLanguage | StringToLanguage (const llvm::StringRef &string) |
Private Member Functions | |
Status | RegisterBreakpointCallback (BreakpointOptions &bp_options, const char *command_body_text, StructuredData::ObjectSP extra_args_sp) |
Status | RegisterWatchpointCallback (WatchpointOptions *wp_options, const char *command_body_text, StructuredData::ObjectSP extra_args_sp) |
Private Attributes | |
std::unique_ptr< Lua > | m_lua |
bool | m_session_is_active = false |
Additional Inherited Members | |
Public Types inherited from lldb_private::ScriptInterpreter | |
enum | ScriptReturnType { eScriptReturnTypeCharPtr , eScriptReturnTypeBool , eScriptReturnTypeShortInt , eScriptReturnTypeShortIntUnsigned , eScriptReturnTypeInt , eScriptReturnTypeIntUnsigned , eScriptReturnTypeLongInt , eScriptReturnTypeLongIntUnsigned , eScriptReturnTypeLongLong , eScriptReturnTypeLongLongUnsigned , eScriptReturnTypeFloat , eScriptReturnTypeDouble , eScriptReturnTypeChar , eScriptReturnTypeCharStrOrNone , eScriptReturnTypeOpaqueObject } |
Protected Attributes inherited from lldb_private::ScriptInterpreter | |
Debugger & | m_debugger |
lldb::ScriptLanguage | m_script_lang |
Definition at line 22 of file ScriptInterpreterLua.h.
ScriptInterpreterLua::ScriptInterpreterLua | ( | Debugger & | debugger | ) |
Definition at line 146 of file ScriptInterpreterLua.cpp.
|
overridedefault |
|
static |
Definition at line 268 of file ScriptInterpreterLua.cpp.
References lldb_private::Lua::CallBreakpointCallback(), lldb::eScriptLanguageLua, lldb_private::StoppointCallbackContext::exe_ctx_ref, lldb_private::Target::GetBreakpointByID(), lldb_private::Target::GetDebugger(), lldb_private::Debugger::GetErrorStream(), lldb_private::ExecutionContext::GetFrameSP(), GetLua(), lldb_private::Debugger::GetScriptInterpreter(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::ScriptInterpreterLua::CommandDataLua::m_extra_args_sp, and lldb_private::toString().
Referenced by RegisterBreakpointCallback().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 325 of file ScriptInterpreterLua.cpp.
References eIOHandlerBreakpoint, lldb_private::ScriptInterpreter::m_debugger, and lldb_private::Debugger::RunIOHandlerAsync().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 334 of file ScriptInterpreterLua.cpp.
References eIOHandlerWatchpoint, lldb_private::ScriptInterpreter::m_debugger, and lldb_private::Debugger::RunIOHandlerAsync().
|
static |
Definition at line 394 of file ScriptInterpreterLua.cpp.
Referenced by Initialize().
llvm::Error ScriptInterpreterLua::EnterSession | ( | lldb::user_id_t | debugger_id | ) |
Definition at line 241 of file ScriptInterpreterLua.cpp.
References m_lua, and m_session_is_active.
Referenced by IOHandlerLuaInterpreter::IOHandlerLuaInterpreter().
|
overridevirtual |
Implements lldb_private::ScriptInterpreter.
Definition at line 201 of file ScriptInterpreterLua.cpp.
References lldb_private::Debugger::GetInputFile(), lldb_private::File::IsValid(), LLDB_SCOPED_TIMER, lldb_private::ScriptInterpreter::m_debugger, and lldb_private::Debugger::RunIOHandlerAsync().
|
overridevirtual |
Implements lldb_private::ScriptInterpreter.
Definition at line 158 of file ScriptInterpreterLua.cpp.
References lldb_private::CommandReturnObject::AppendError(), lldb_private::CommandReturnObject::AppendErrorWithFormatv(), lldb_private::ScriptInterpreterIORedirect::Create(), lldb_private::ScriptInterpreterIORedirect::Flush(), lldb_private::ExecuteScriptOptions::GetEnableIO(), lldb_private::ScriptInterpreterIORedirect::GetErrorFile(), lldb_private::ScriptInterpreterIORedirect::GetOutputFile(), lldb_private::ScriptInterpreter::m_debugger, and m_lua.
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 152 of file ScriptInterpreterLua.cpp.
Lua & ScriptInterpreterLua::GetLua | ( | ) |
Definition at line 402 of file ScriptInterpreterLua.cpp.
References m_lua.
Referenced by BreakpointCallbackFunction(), IOHandlerLuaInterpreter::IOHandlerInputComplete(), IOHandlerLuaInterpreter::IOHandlerIsInputComplete(), IOHandlerLuaInterpreter::IOHandlerLuaInterpreter(), and WatchpointCallbackFunction().
|
static |
Definition at line 398 of file ScriptInterpreterLua.cpp.
Referenced by Initialize().
|
inlineoverridevirtual |
Implements lldb_private::PluginInterface.
Definition at line 75 of file ScriptInterpreterLua.h.
References GetPluginNameStatic().
|
inlinestatic |
Definition at line 61 of file ScriptInterpreterLua.h.
Referenced by GetPluginName(), and Initialize().
|
static |
Definition at line 229 of file ScriptInterpreterLua.cpp.
References CreateInstance(), lldb::eScriptLanguageLua, GetPluginDescriptionStatic(), GetPluginNameStatic(), and lldb_private::PluginManager::RegisterPlugin().
llvm::Error ScriptInterpreterLua::LeaveSession | ( | ) |
Definition at line 254 of file ScriptInterpreterLua.cpp.
References m_lua, and m_session_is_active.
Referenced by IOHandlerLuaInterpreter::~IOHandlerLuaInterpreter().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 216 of file ScriptInterpreterLua.cpp.
|
private |
Definition at line 357 of file ScriptInterpreterLua.cpp.
References BreakpointCallbackFunction(), error(), m_lua, and lldb_private::BreakpointOptions::SetCallback().
Referenced by SetBreakpointCommandCallback(), and SetBreakpointCommandCallbackFunction().
|
private |
Definition at line 378 of file ScriptInterpreterLua.cpp.
References error(), m_lua, lldb_private::WatchpointOptions::SetCallback(), and WatchpointCallbackFunction().
Referenced by SetWatchpointCommandCallback().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 351 of file ScriptInterpreterLua.cpp.
References RegisterBreakpointCallback().
Referenced by IOHandlerLuaInterpreter::IOHandlerInputComplete().
|
overridevirtual |
Set a script function as the callback for the breakpoint.
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 342 of file ScriptInterpreterLua.cpp.
References RegisterBreakpointCallback().
|
overridevirtual |
Set a one-liner as the callback for the watchpoint.
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 372 of file ScriptInterpreterLua.cpp.
References RegisterWatchpointCallback().
Referenced by IOHandlerLuaInterpreter::IOHandlerInputComplete().
|
static |
Definition at line 239 of file ScriptInterpreterLua.cpp.
|
static |
Definition at line 298 of file ScriptInterpreterLua.cpp.
References lldb_private::Lua::CallWatchpointCallback(), lldb::eScriptLanguageLua, lldb_private::StoppointCallbackContext::exe_ctx_ref, lldb_private::WatchpointList::FindByID(), lldb_private::Target::GetDebugger(), lldb_private::Debugger::GetErrorStream(), lldb_private::ExecutionContext::GetFrameSP(), GetLua(), lldb_private::Debugger::GetScriptInterpreter(), lldb_private::ExecutionContext::GetTargetPtr(), lldb_private::Target::GetWatchpointList(), and lldb_private::toString().
Referenced by RegisterWatchpointCallback().
|
private |
Definition at line 103 of file ScriptInterpreterLua.h.
Referenced by EnterSession(), ExecuteOneLine(), GetLua(), LeaveSession(), LoadScriptingModule(), RegisterBreakpointCallback(), and RegisterWatchpointCallback().
|
private |
Definition at line 104 of file ScriptInterpreterLua.h.
Referenced by EnterSession(), and LeaveSession().