LLDB mainline
|
#include <IOHandler.h>
Public Member Functions | |
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 () |
Protected Attributes | |
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::StreamFileSP | m_output_sp |
lldb::StreamFileSP | m_error_sp |
std::recursive_mutex | m_output_mutex |
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::IOHandler | |
enum class | Type { CommandInterpreter , CommandList , Confirm , Curses , Expression , REPL , ProcessIO , PythonInterpreter , LuaInterpreter , PythonCode , Other } |
Definition at line 326 of file IOHandler.h.
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 | ||
) |
Definition at line 225 of file IOHandler.cpp.
IOHandlerEditline::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 | ||
) |
Definition at line 240 of file IOHandler.cpp.
References lldb_private::ansi::FormatAnsiTerminalCodes(), lldb_private::Debugger::GetAutosuggestionAnsiPrefix(), lldb_private::Debugger::GetAutosuggestionAnsiSuffix(), lldb_private::IOHandler::GetErrorFILE(), lldb_private::IOHandler::GetInputFILE(), lldb_private::IOHandler::GetOutputFILE(), lldb_private::IOHandler::GetOutputMutex(), lldb_private::Debugger::GetUseAutosuggestion(), lldb_private::IOHandlerDelegate::IOHandlerGetFixIndentationCharacters(), m_base_line_number, m_color, lldb_private::IOHandler::m_input_sp, SetBaseLineNumber(), SetContinuationPrompt(), and SetPrompt().
|
delete |
|
delete |
|
override |
Definition at line 307 of file IOHandler.cpp.
|
overridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 313 of file IOHandler.cpp.
References lldb_private::IOHandler::Activate(), lldb_private::IOHandler::GetIsInteractive(), lldb_private::IOHandlerDelegate::IOHandlerActivated(), and m_delegate.
|
overridevirtual |
Implements lldb_private::IOHandler.
Definition at line 608 of file IOHandler.cpp.
|
overridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 318 of file IOHandler.cpp.
References lldb_private::IOHandler::Deactivate(), lldb_private::IOHandlerDelegate::IOHandlerDeactivated(), and m_delegate.
|
inlineoverridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 378 of file IOHandler.h.
References lldb_private::IOHandlerDelegate::IOHandlerGetCommandPrefix(), and m_delegate.
const char * IOHandlerEditline::GetContinuationPrompt | ( | ) |
Definition at line 492 of file IOHandler.cpp.
References m_continuation_prompt.
Referenced by GetLine().
|
inlineoverridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 374 of file IOHandler.h.
References lldb_private::IOHandlerDelegate::IOHandlerGetControlSequence(), and m_delegate.
uint32_t IOHandlerEditline::GetCurrentLineIndex | ( | ) | const |
Definition at line 512 of file IOHandler.cpp.
References m_curr_line_idx.
Referenced by lldb_private::REPL::IOHandlerComplete().
StringList IOHandlerEditline::GetCurrentLines | ( | ) | const |
Definition at line 520 of file IOHandler.cpp.
References m_current_lines_ptr.
Referenced by lldb_private::REPL::IOHandlerComplete().
|
inlineoverridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 382 of file IOHandler.h.
References lldb_private::IOHandlerDelegate::IOHandlerGetHelpPrologue(), and m_delegate.
|
inline |
Definition at line 402 of file IOHandler.h.
References m_interrupt_exits.
bool IOHandlerEditline::GetLine | ( | std::string & | line, |
bool & | interrupted | ||
) |
Definition at line 351 of file IOHandler.cpp.
References error(), GetContinuationPrompt(), lldb_private::IOHandler::GetInputFILE(), lldb_private::IOHandler::GetIsInteractive(), GetPrompt(), m_curr_line_idx, lldb_private::IOHandler::m_input_sp, m_line_buffer, m_multi_line, lldb_private::IOHandler::m_output_sp, lldb_private::IOHandler::SetIsDone(), SplitLine(), and SplitLineEOF().
Referenced by GetLines(), and Run().
bool IOHandlerEditline::GetLines | ( | StringList & | lines, |
bool & | interrupted | ||
) |
Definition at line 535 of file IOHandler.cpp.
References lldb_private::StringList::AppendString(), error(), lldb_private::IOHandler::GetIsInteractive(), GetLine(), GetPrompt(), lldb_private::StringList::GetSize(), lldb_private::IOHandlerDelegate::IOHandlerIsInputComplete(), m_base_line_number, m_curr_line_idx, m_current_lines_ptr, m_delegate, and lldb_private::IOHandler::m_output_sp.
Referenced by Run().
|
overridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 461 of file IOHandler.cpp.
References m_prompt.
Referenced by GetLine(), GetLines(), and PrintAsync().
|
overridevirtual |
Implements lldb_private::IOHandler.
Definition at line 627 of file IOHandler.cpp.
|
overridevirtual |
Implements lldb_private::IOHandler.
Definition at line 615 of file IOHandler.cpp.
References lldb_private::IOHandlerDelegate::IOHandlerInterrupt(), and m_delegate.
|
overridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 634 of file IOHandler.cpp.
References GetPrompt(), lldb_private::IOHandler::m_error_sp, lldb_private::IOHandler::m_output_mutex, lldb_private::IOHandler::m_output_sp, and lldb_private::IOHandler::PrintAsync().
|
overridevirtual |
Implements lldb_private::IOHandler.
Definition at line 577 of file IOHandler.cpp.
References lldb_private::StringList::CopyList(), GetLine(), GetLines(), lldb_private::IOHandlerDelegate::IOHandlerInputComplete(), lldb_private::IOHandlerDelegate::IOHandlerInputInterrupted(), lldb_private::IOHandler::IsActive(), m_delegate, lldb_private::IOHandler::m_done, m_interrupt_exits, and m_multi_line.
void IOHandlerEditline::SetBaseLineNumber | ( | uint32_t | line | ) |
Definition at line 508 of file IOHandler.cpp.
References m_base_line_number.
Referenced by IOHandlerEditline().
|
delete |
void IOHandlerEditline::SetContinuationPrompt | ( | llvm::StringRef | prompt | ) |
Definition at line 497 of file IOHandler.cpp.
References m_continuation_prompt.
Referenced by IOHandlerEditline().
|
inline |
Definition at line 404 of file IOHandler.h.
References m_interrupt_exits.
|
delete |
|
overridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 475 of file IOHandler.cpp.
References lldb_private::ansi::FormatAnsiTerminalCodes(), lldb_private::Debugger::GetPromptAnsiPrefix(), lldb_private::Debugger::GetPromptAnsiSuffix(), m_color, lldb_private::IOHandler::m_debugger, and m_prompt.
Referenced by IOHandlerLuaInterpreter::IOHandlerActivated(), lldb_private::IOHandlerConfirm::IOHandlerConfirm(), and IOHandlerEditline().
|
overridevirtual |
Reimplemented from lldb_private::IOHandler.
Definition at line 323 of file IOHandler.cpp.
|
protected |
Definition at line 432 of file IOHandler.h.
Referenced by GetLines(), IOHandlerEditline(), and SetBaseLineNumber().
|
protected |
Definition at line 435 of file IOHandler.h.
Referenced by IOHandlerEditline(), and SetPrompt().
|
protected |
Definition at line 430 of file IOHandler.h.
Referenced by GetContinuationPrompt(), and SetContinuationPrompt().
|
protected |
Definition at line 433 of file IOHandler.h.
Referenced by GetCurrentLineIndex(), GetLine(), and GetLines().
|
protected |
Definition at line 431 of file IOHandler.h.
Referenced by GetCurrentLines(), and GetLines().
|
protected |
Definition at line 428 of file IOHandler.h.
Referenced by Activate(), Deactivate(), GetCommandPrefix(), GetControlSequence(), GetHelpPrologue(), GetLines(), Interrupt(), and Run().
|
protected |
Definition at line 436 of file IOHandler.h.
Referenced by GetInterruptExits(), Run(), and SetInterruptExits().
|
protected |
Definition at line 437 of file IOHandler.h.
Referenced by GetLine().
|
protected |
Definition at line 434 of file IOHandler.h.
|
protected |
Definition at line 429 of file IOHandler.h.
Referenced by GetPrompt(), and SetPrompt().