|
LLDB mainline
|
#include <IOHandler.h>
Public Member Functions | |
| IOHandlerConfirm (Debugger &debugger, llvm::StringRef prompt, bool default_response) | |
| ~IOHandlerConfirm () override | |
| bool | GetResponse () const |
| void | IOHandlerComplete (IOHandler &io_handler, CompletionRequest &request) override |
| 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 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 | 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::LockableStreamFileSP &output_sp, const lldb::LockableStreamFileSP &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::LockableStreamFileSP &, const lldb::LockableStreamFileSP &, 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 |
| bool | SetUseColor (bool use_color) override |
| 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 |
| void | Refresh () 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::LockableStreamFileSP &output_sp, const lldb::LockableStreamFileSP &error_sp, uint32_t flags) | |
| virtual | ~IOHandler () |
| bool | IsActive () |
| void | SetIsDone (bool b) |
| bool | GetIsDone () |
| Type | GetType () const |
| bool | SetPrompt (const char *)=delete |
| int | GetInputFD () |
| int | GetOutputFD () |
| int | GetErrorFD () |
| lldb::FileSP | GetInputFileSP () |
| lldb::LockableStreamFileSP | GetOutputStreamFileSP () |
| lldb::LockableStreamFileSP | 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 () |
Protected Attributes | |
| const bool | m_default_response |
| bool | m_user_response |
| Protected Attributes inherited from lldb_private::IOHandlerDelegate | |
| Completion | m_completion |
| Protected Attributes inherited from lldb_private::IOHandlerEditline | |
| IOHandlerDelegate & | m_delegate |
| std::string | m_prompt |
| std::string | m_continuation_prompt |
| StringList * | m_current_lines_ptr |
| uint32_t | m_base_line_number |
| uint32_t | m_curr_line_idx |
| bool | m_multi_line |
| bool | m_color |
| bool | m_interrupt_exits |
| std::string | m_line_buffer |
| Protected Attributes inherited from lldb_private::IOHandler | |
| Debugger & | m_debugger |
| lldb::FileSP | m_input_sp |
| lldb::LockableStreamFileSP | m_output_sp |
| lldb::LockableStreamFileSP | m_error_sp |
| Predicate< bool > | m_popped |
| Flags | m_flags |
| Type | m_type |
| void * | m_user_data |
| bool | m_done |
| bool | m_active |
Additional Inherited Members | |
| Public Types inherited from lldb_private::IOHandlerDelegate | |
| enum class | Completion { None , LLDBCommand , Expression } |
| Public Types inherited from lldb_private::IOHandler | |
| enum class | Type { CommandInterpreter , CommandList , Confirm , Curses , Expression , REPL , ProcessIO , PythonInterpreter , LuaInterpreter , PythonCode , Other } |
Definition at line 443 of file IOHandler.h.
| IOHandlerConfirm::IOHandlerConfirm | ( | Debugger & | debugger, |
| llvm::StringRef | prompt, | ||
| bool | default_response ) |
Definition at line 123 of file IOHandler.cpp.
References lldb_private::IOHandler::Confirm, lldb_private::StreamString::GetString(), lldb_private::IOHandlerEditline::IOHandlerEditline(), m_default_response, m_user_response, lldb_private::Stream::Printf(), lldb_private::Stream::PutCString(), and lldb_private::IOHandlerEditline::SetPrompt().
|
overridedefault |
|
inline |
Definition at line 450 of file IOHandler.h.
References m_user_response.
Referenced by lldb_private::CommandInterpreter::Confirm().
|
overridevirtual |
Reimplemented from lldb_private::IOHandlerDelegate.
Definition at line 146 of file IOHandler.cpp.
References lldb_private::CompletionRequest::AddCompletion(), lldb_private::CompletionRequest::GetRawCursorPos(), and m_default_response.
|
overridevirtual |
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 153 of file IOHandler.cpp.
References m_default_response, m_user_response, and lldb_private::IOHandler::SetIsDone().
|
protected |
Definition at line 459 of file IOHandler.h.
Referenced by IOHandlerComplete(), IOHandlerConfirm(), and IOHandlerInputComplete().
|
protected |
Definition at line 460 of file IOHandler.h.
Referenced by GetResponse(), IOHandlerConfirm(), and IOHandlerInputComplete().