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 269 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 326 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 335 of file ScriptInterpreterLua.cpp.
References eIOHandlerWatchpoint, lldb_private::ScriptInterpreter::m_debugger, and lldb_private::Debugger::RunIOHandlerAsync().
|
static |
Definition at line 395 of file ScriptInterpreterLua.cpp.
Referenced by Initialize().
llvm::Error ScriptInterpreterLua::EnterSession | ( | lldb::user_id_t | debugger_id | ) |
Definition at line 242 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 403 of file ScriptInterpreterLua.cpp.
References m_lua.
Referenced by BreakpointCallbackFunction(), IOHandlerLuaInterpreter::IOHandlerInputComplete(), IOHandlerLuaInterpreter::IOHandlerIsInputComplete(), IOHandlerLuaInterpreter::IOHandlerLuaInterpreter(), and WatchpointCallbackFunction().
|
static |
Definition at line 399 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 230 of file ScriptInterpreterLua.cpp.
References CreateInstance(), lldb::eScriptLanguageLua, GetPluginDescriptionStatic(), GetPluginNameStatic(), and lldb_private::PluginManager::RegisterPlugin().
llvm::Error ScriptInterpreterLua::LeaveSession | ( | ) |
Definition at line 255 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.
References error(), lldb_private::Status::FromErrorStringWithFormatv(), and m_lua.
|
private |
Definition at line 358 of file ScriptInterpreterLua.cpp.
References BreakpointCallbackFunction(), lldb_private::Status::FromError(), m_lua, and lldb_private::BreakpointOptions::SetCallback().
Referenced by SetBreakpointCommandCallback(), and SetBreakpointCommandCallbackFunction().
|
private |
Definition at line 379 of file ScriptInterpreterLua.cpp.
References lldb_private::Status::FromError(), m_lua, lldb_private::WatchpointOptions::SetCallback(), and WatchpointCallbackFunction().
Referenced by SetWatchpointCommandCallback().
|
overridevirtual |
Reimplemented from lldb_private::ScriptInterpreter.
Definition at line 352 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 343 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 373 of file ScriptInterpreterLua.cpp.
References RegisterWatchpointCallback().
Referenced by IOHandlerLuaInterpreter::IOHandlerInputComplete().
|
static |
Definition at line 240 of file ScriptInterpreterLua.cpp.
|
static |
Definition at line 299 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().