LLDB mainline
Public Member Functions | Protected Attributes | List of all members
lldb_private::IOHandlerEditline Class Reference

#include <IOHandler.h>

Inheritance diagram for lldb_private::IOHandlerEditline:
Inheritance graph
[legend]

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 ()
 
DebuggerGetDebugger ()
 
void * GetUserData ()
 
void SetUserData (void *user_data)
 
FlagsGetFlags ()
 
const FlagsGetFlags () 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

IOHandlerDelegatem_delegate
 
std::string m_prompt
 
std::string m_continuation_prompt
 
StringListm_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
Debuggerm_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
}
 

Detailed Description

Definition at line 326 of file IOHandler.h.

Constructor & Destructor Documentation

◆ IOHandlerEditline() [1/4]

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() [2/4]

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 
)

◆ IOHandlerEditline() [3/4]

lldb_private::IOHandlerEditline::IOHandlerEditline ( Debugger ,
IOHandler::Type  ,
const char *  ,
const char *  ,
const char *  ,
bool  ,
bool  ,
uint32_t  ,
IOHandlerDelegate  
)
delete

◆ IOHandlerEditline() [4/4]

lldb_private::IOHandlerEditline::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()

IOHandlerEditline::~IOHandlerEditline ( )
override

Definition at line 307 of file IOHandler.cpp.

Member Function Documentation

◆ Activate()

void IOHandlerEditline::Activate ( )
overridevirtual

◆ Cancel()

void IOHandlerEditline::Cancel ( )
overridevirtual

Implements lldb_private::IOHandler.

Definition at line 608 of file IOHandler.cpp.

◆ Deactivate()

void IOHandlerEditline::Deactivate ( )
overridevirtual

◆ GetCommandPrefix()

const char * lldb_private::IOHandlerEditline::GetCommandPrefix ( )
inlineoverridevirtual

◆ GetContinuationPrompt()

const char * IOHandlerEditline::GetContinuationPrompt ( )

Definition at line 492 of file IOHandler.cpp.

References m_continuation_prompt.

Referenced by GetLine().

◆ GetControlSequence()

llvm::StringRef lldb_private::IOHandlerEditline::GetControlSequence ( char  ch)
inlineoverridevirtual

◆ GetCurrentLineIndex()

uint32_t IOHandlerEditline::GetCurrentLineIndex ( ) const

Definition at line 512 of file IOHandler.cpp.

References m_curr_line_idx.

Referenced by lldb_private::REPL::IOHandlerComplete().

◆ GetCurrentLines()

StringList IOHandlerEditline::GetCurrentLines ( ) const

Definition at line 520 of file IOHandler.cpp.

References m_current_lines_ptr.

Referenced by lldb_private::REPL::IOHandlerComplete().

◆ GetHelpPrologue()

const char * lldb_private::IOHandlerEditline::GetHelpPrologue ( )
inlineoverridevirtual

Reimplemented from lldb_private::IOHandler.

Definition at line 382 of file IOHandler.h.

References lldb_private::IOHandlerDelegate::IOHandlerGetHelpPrologue(), and m_delegate.

◆ GetInterruptExits()

bool lldb_private::IOHandlerEditline::GetInterruptExits ( )
inline

Definition at line 402 of file IOHandler.h.

References m_interrupt_exits.

◆ GetLine()

bool IOHandlerEditline::GetLine ( std::string &  line,
bool &  interrupted 
)

◆ GetLines()

bool IOHandlerEditline::GetLines ( StringList lines,
bool &  interrupted 
)

◆ GetPrompt()

const char * IOHandlerEditline::GetPrompt ( )
overridevirtual

Reimplemented from lldb_private::IOHandler.

Definition at line 461 of file IOHandler.cpp.

References m_prompt.

Referenced by GetLine(), GetLines(), and PrintAsync().

◆ GotEOF()

void IOHandlerEditline::GotEOF ( )
overridevirtual

Implements lldb_private::IOHandler.

Definition at line 627 of file IOHandler.cpp.

◆ Interrupt()

bool IOHandlerEditline::Interrupt ( )
overridevirtual

◆ PrintAsync()

void IOHandlerEditline::PrintAsync ( const char *  s,
size_t  len,
bool  is_stdout 
)
overridevirtual

◆ Run()

void IOHandlerEditline::Run ( )
overridevirtual

◆ SetBaseLineNumber()

void IOHandlerEditline::SetBaseLineNumber ( uint32_t  line)

Definition at line 508 of file IOHandler.cpp.

References m_base_line_number.

Referenced by IOHandlerEditline().

◆ SetContinuationPrompt() [1/2]

void lldb_private::IOHandlerEditline::SetContinuationPrompt ( const char *  )
delete

◆ SetContinuationPrompt() [2/2]

void IOHandlerEditline::SetContinuationPrompt ( llvm::StringRef  prompt)

Definition at line 497 of file IOHandler.cpp.

References m_continuation_prompt.

Referenced by IOHandlerEditline().

◆ SetInterruptExits()

void lldb_private::IOHandlerEditline::SetInterruptExits ( bool  b)
inline

Definition at line 404 of file IOHandler.h.

References m_interrupt_exits.

◆ SetPrompt() [1/2]

bool lldb_private::IOHandlerEditline::SetPrompt ( const char *  prompt)
delete

◆ SetPrompt() [2/2]

bool IOHandlerEditline::SetPrompt ( llvm::StringRef  prompt)
overridevirtual

◆ TerminalSizeChanged()

void IOHandlerEditline::TerminalSizeChanged ( )
overridevirtual

Reimplemented from lldb_private::IOHandler.

Definition at line 323 of file IOHandler.cpp.

Member Data Documentation

◆ m_base_line_number

uint32_t lldb_private::IOHandlerEditline::m_base_line_number
protected

Definition at line 432 of file IOHandler.h.

Referenced by GetLines(), IOHandlerEditline(), and SetBaseLineNumber().

◆ m_color

bool lldb_private::IOHandlerEditline::m_color
protected

Definition at line 435 of file IOHandler.h.

Referenced by IOHandlerEditline(), and SetPrompt().

◆ m_continuation_prompt

std::string lldb_private::IOHandlerEditline::m_continuation_prompt
protected

Definition at line 430 of file IOHandler.h.

Referenced by GetContinuationPrompt(), and SetContinuationPrompt().

◆ m_curr_line_idx

uint32_t lldb_private::IOHandlerEditline::m_curr_line_idx
protected

Definition at line 433 of file IOHandler.h.

Referenced by GetCurrentLineIndex(), GetLine(), and GetLines().

◆ m_current_lines_ptr

StringList* lldb_private::IOHandlerEditline::m_current_lines_ptr
protected

Definition at line 431 of file IOHandler.h.

Referenced by GetCurrentLines(), and GetLines().

◆ m_delegate

IOHandlerDelegate& lldb_private::IOHandlerEditline::m_delegate
protected

◆ m_interrupt_exits

bool lldb_private::IOHandlerEditline::m_interrupt_exits
protected

Definition at line 436 of file IOHandler.h.

Referenced by GetInterruptExits(), Run(), and SetInterruptExits().

◆ m_line_buffer

std::string lldb_private::IOHandlerEditline::m_line_buffer
protected

Definition at line 437 of file IOHandler.h.

Referenced by GetLine().

◆ m_multi_line

bool lldb_private::IOHandlerEditline::m_multi_line
protected

Definition at line 434 of file IOHandler.h.

Referenced by GetLine(), and Run().

◆ m_prompt

std::string lldb_private::IOHandlerEditline::m_prompt
protected

Definition at line 429 of file IOHandler.h.

Referenced by GetPrompt(), and SetPrompt().


The documentation for this class was generated from the following files: