LLDB mainline
|
Public Member Functions | |
IOHandlerLuaInterpreter (Debugger &debugger, ScriptInterpreterLua &script_interpreter, ActiveIOHandler active_io_handler=eIOHandlerNone) | |
~IOHandlerLuaInterpreter () override | |
void | IOHandlerActivated (IOHandler &io_handler, bool interactive) override |
bool | IOHandlerIsInputComplete (IOHandler &io_handler, StringList &lines) override |
Called to determine whether typing enter after the last line in lines should end input. | |
void | IOHandlerInputComplete (IOHandler &io_handler, std::string &data) override |
Called when a line or lines have been retrieved. | |
Public Member Functions inherited from lldb_private::IOHandlerDelegate | |
IOHandlerDelegate (Completion completion=Completion::None) | |
virtual | ~IOHandlerDelegate ()=default |
virtual void | IOHandlerActivated (IOHandler &io_handler, bool interactive) |
virtual void | IOHandlerDeactivated (IOHandler &io_handler) |
virtual std::optional< std::string > | IOHandlerSuggestion (IOHandler &io_handler, llvm::StringRef line) |
virtual void | IOHandlerComplete (IOHandler &io_handler, CompletionRequest &request) |
virtual const char * | IOHandlerGetFixIndentationCharacters () |
virtual int | IOHandlerFixIndentation (IOHandler &io_handler, const StringList &lines, int cursor_position) |
Called when a new line is created or one of an identified set of indentation characters is typed. | |
virtual void | IOHandlerInputComplete (IOHandler &io_handler, std::string &data)=0 |
Called when a line or lines have been retrieved. | |
virtual void | IOHandlerInputInterrupted (IOHandler &io_handler, std::string &data) |
virtual bool | IOHandlerIsInputComplete (IOHandler &io_handler, StringList &lines) |
Called to determine whether typing enter after the last line in lines should end input. | |
virtual llvm::StringRef | IOHandlerGetControlSequence (char ch) |
virtual const char * | IOHandlerGetCommandPrefix () |
virtual const char * | IOHandlerGetHelpPrologue () |
virtual bool | IOHandlerInterrupt (IOHandler &io_handler) |
Public Member Functions inherited from lldb_private::IOHandlerEditline | |
IOHandlerEditline (Debugger &debugger, IOHandler::Type type, const char *editline_name, llvm::StringRef prompt, llvm::StringRef continuation_prompt, bool multi_line, bool color, uint32_t line_number_start, IOHandlerDelegate &delegate) | |
IOHandlerEditline (Debugger &debugger, IOHandler::Type type, const lldb::FileSP &input_sp, const lldb::StreamFileSP &output_sp, const lldb::StreamFileSP &error_sp, uint32_t flags, const char *editline_name, llvm::StringRef prompt, llvm::StringRef continuation_prompt, bool multi_line, bool color, uint32_t line_number_start, IOHandlerDelegate &delegate) | |
IOHandlerEditline (Debugger &, IOHandler::Type, const char *, const char *, const char *, bool, bool, uint32_t, IOHandlerDelegate &)=delete | |
IOHandlerEditline (Debugger &, IOHandler::Type, const lldb::FileSP &, const lldb::StreamFileSP &, const lldb::StreamFileSP &, uint32_t, const char *, const char *, const char *, bool, bool, uint32_t, IOHandlerDelegate &)=delete | |
~IOHandlerEditline () override | |
void | Run () override |
void | Cancel () override |
bool | Interrupt () override |
void | GotEOF () override |
void | Activate () override |
void | Deactivate () override |
void | TerminalSizeChanged () override |
llvm::StringRef | GetControlSequence (char ch) override |
const char * | GetCommandPrefix () override |
const char * | GetHelpPrologue () override |
const char * | GetPrompt () override |
bool | SetPrompt (llvm::StringRef prompt) override |
bool | SetPrompt (const char *prompt)=delete |
const char * | GetContinuationPrompt () |
void | SetContinuationPrompt (llvm::StringRef prompt) |
void | SetContinuationPrompt (const char *)=delete |
bool | GetLine (std::string &line, bool &interrupted) |
bool | GetLines (StringList &lines, bool &interrupted) |
void | SetBaseLineNumber (uint32_t line) |
bool | GetInterruptExits () |
void | SetInterruptExits (bool b) |
StringList | GetCurrentLines () const |
uint32_t | GetCurrentLineIndex () const |
void | PrintAsync (const char *s, size_t len, bool is_stdout) override |
Public Member Functions inherited from lldb_private::IOHandler | |
IOHandler (Debugger &debugger, IOHandler::Type type) | |
IOHandler (Debugger &debugger, IOHandler::Type type, const lldb::FileSP &input_sp, const lldb::StreamFileSP &output_sp, const lldb::StreamFileSP &error_sp, uint32_t flags) | |
virtual | ~IOHandler () |
virtual void | Run ()=0 |
virtual void | Cancel ()=0 |
virtual bool | Interrupt ()=0 |
virtual void | GotEOF ()=0 |
bool | IsActive () |
void | SetIsDone (bool b) |
bool | GetIsDone () |
Type | GetType () const |
virtual void | Activate () |
virtual void | Deactivate () |
virtual void | TerminalSizeChanged () |
virtual const char * | GetPrompt () |
virtual bool | SetPrompt (llvm::StringRef prompt) |
bool | SetPrompt (const char *)=delete |
virtual llvm::StringRef | GetControlSequence (char ch) |
virtual const char * | GetCommandPrefix () |
virtual const char * | GetHelpPrologue () |
int | GetInputFD () |
int | GetOutputFD () |
int | GetErrorFD () |
FILE * | GetInputFILE () |
FILE * | GetOutputFILE () |
FILE * | GetErrorFILE () |
lldb::FileSP | GetInputFileSP () |
lldb::StreamFileSP | GetOutputStreamFileSP () |
lldb::StreamFileSP | GetErrorStreamFileSP () |
Debugger & | GetDebugger () |
void * | GetUserData () |
void | SetUserData (void *user_data) |
Flags & | GetFlags () |
const Flags & | GetFlags () const |
bool | GetIsInteractive () |
Check if the input is being supplied interactively by a user. | |
bool | GetIsRealTerminal () |
Check if the input is coming from a real terminal. | |
void | SetPopped (bool b) |
void | WaitForPop () |
virtual void | PrintAsync (const char *s, size_t len, bool is_stdout) |
std::recursive_mutex & | GetOutputMutex () |
Private Member Functions | |
bool | IsQuitCommand (llvm::StringRef cmd) |
Private Attributes | |
ScriptInterpreterLua & | m_script_interpreter |
ActiveIOHandler | m_active_io_handler |
Definition at line 36 of file ScriptInterpreterLua.cpp.
|
inline |
Definition at line 39 of file ScriptInterpreterLua.cpp.
References lldb_private::Lua::ChangeIO(), lldb_private::ScriptInterpreterLua::EnterSession(), lldb_private::Debugger::GetErrorFile(), lldb_private::UserID::GetID(), lldb_private::ScriptInterpreterLua::GetLua(), lldb_private::Debugger::GetOutputFile(), lldb_private::File::GetStream(), and m_script_interpreter.
|
inlineoverride |
Definition at line 53 of file ScriptInterpreterLua.cpp.
References lldb_private::ScriptInterpreterLua::LeaveSession(), and m_script_interpreter.
|
inlineoverridevirtual |
Reimplemented from lldb_private::IOHandlerDelegate.
Definition at line 57 of file ScriptInterpreterLua.cpp.
References eIOHandlerBreakpoint, eIOHandlerNone, eIOHandlerWatchpoint, lldb_private::IOHandler::GetOutputStreamFileSP(), m_active_io_handler, and lldb_private::IOHandlerEditline::SetPrompt().
|
inlineoverridevirtual |
Called when a line or lines have been retrieved.
This function can handle the current line and possibly call IOHandler::SetIsDone(true) when the IO handler is done like when "quit" is entered as a command, of when an empty line is received. It is up to the delegate to determine when a line should cause a IOHandler to exit.
Implements lldb_private::IOHandlerDelegate.
Definition at line 105 of file ScriptInterpreterLua.cpp.
References eIOHandlerBreakpoint, eIOHandlerNone, eIOHandlerWatchpoint, error(), lldb_private::IOHandler::GetErrorStreamFileSP(), lldb_private::ScriptInterpreterLua::GetLua(), lldb_private::IOHandler::GetUserData(), IsQuitCommand(), m_active_io_handler, m_script_interpreter, lldb_private::Lua::Run(), lldb_private::ScriptInterpreterLua::SetBreakpointCommandCallback(), lldb_private::IOHandler::SetIsDone(), lldb_private::ScriptInterpreterLua::SetWatchpointCommandCallback(), and lldb_private::toString().
|
inlineoverridevirtual |
Called to determine whether typing enter after the last line in lines should end input.
This function will not be called on IOHandler objects that are getting single lines.
[in] | io_handler | The IOHandler that responsible for updating the lines. |
[in] | lines | The current multi-line content. May be altered to provide alternative input when complete. |
Reimplemented from lldb_private::IOHandlerDelegate.
Definition at line 83 of file ScriptInterpreterLua.cpp.
References lldb_private::Lua::CheckSyntax(), lldb_private::StringList::DeleteStringAtIndex(), eIOHandlerBreakpoint, eIOHandlerWatchpoint, lldb_private::ScriptInterpreterLua::GetLua(), lldb_private::StringList::GetSize(), lldb_private::StreamString::GetString(), lldb_private::StringList::GetStringAtIndex(), IsQuitCommand(), lldb_private::StringList::Join(), m_active_io_handler, m_script_interpreter, and lldb_private::toString().
|
inlineprivate |
Definition at line 143 of file ScriptInterpreterLua.cpp.
Referenced by IOHandlerInputComplete(), and IOHandlerIsInputComplete().
|
private |
Definition at line 141 of file ScriptInterpreterLua.cpp.
Referenced by IOHandlerActivated(), IOHandlerInputComplete(), and IOHandlerIsInputComplete().
|
private |
Definition at line 140 of file ScriptInterpreterLua.cpp.
Referenced by IOHandlerInputComplete(), IOHandlerIsInputComplete(), IOHandlerLuaInterpreter(), and ~IOHandlerLuaInterpreter().