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]
Collaboration diagram for lldb_private::IOHandlerEditline:
Collaboration 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_prompts, uint32_t line_number_start, IOHandlerDelegate &delegate, repro::DataRecorder *data_recorder)
 
 IOHandlerEditline (Debugger &debugger, IOHandler::Type type, const lldb::StreamFileSP &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_prompts, uint32_t line_number_start, IOHandlerDelegate &delegate, repro::DataRecorder *data_recorder)
 
 IOHandlerEditline (Debugger &, IOHandler::Type, const char *, const char *, const char *, bool, bool, uint32_t, IOHandlerDelegate &)=delete
 
 IOHandlerEditline (Debugger &, IOHandler::Type, const lldb::StreamFileSP &, 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
 
ConstString 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)
 
const StringListGetCurrentLines () const
 
uint32_t GetCurrentLineIndex () const
 
void PrintAsync (Stream *stream, const char *s, size_t len) override
 
- Public Member Functions inherited from lldb_private::IOHandler
 IOHandler (Debugger &debugger, IOHandler::Type type)
 
 IOHandler (Debugger &debugger, IOHandler::Type type, const lldb::StreamFileSP &input_sp, const lldb::StreamFileSP &output_sp, const lldb::StreamFileSP &error_sp, uint32_t flags, repro::DataRecorder *data_recorder)
 
virtual ~IOHandler ()
 
virtual bool IsActive ()
 
virtual void SetIsDone (bool b)
 
virtual bool GetIsDone ()
 
Type GetType () const
 
bool SetPrompt (const char *)=delete
 
int GetInputFD ()
 
int GetOutputFD ()
 
int GetErrorFD ()
 
FILE * GetInputFILE ()
 
FILE * GetOutputFILE ()
 
FILE * GetErrorFILE ()
 
lldb::StreamFileSP & GetInputStreamFile ()
 
lldb::StreamFileSP & GetOutputStreamFile ()
 
lldb::StreamFileSP & GetErrorStreamFile ()
 
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. More...
 
bool GetIsRealTerminal ()
 Check if the input is coming from a real terminal. More...
 
void SetPopped (bool b)
 
void WaitForPop ()
 

Protected Attributes

std::unique_ptr< Editline > m_editline_up
 
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_prompts
 
bool m_interrupt_exits
 
bool m_editing
 
- Protected Attributes inherited from lldb_private::IOHandler
Debuggerm_debugger
 
lldb::StreamFileSP m_input_sp
 
lldb::StreamFileSP m_output_sp
 
lldb::StreamFileSP m_error_sp
 
repro::DataRecorderm_data_recorder
 
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  Type {
  Type::CommandInterpreter, Type::CommandList, Type::Confirm, Type::Curses,
  Type::Expression, Type::REPL, Type::ProcessIO, Type::PythonInterpreter,
  Type::PythonCode, Type::Other
}
 

Detailed Description

Definition at line 324 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_prompts,
uint32_t  line_number_start,
IOHandlerDelegate delegate,
repro::DataRecorder data_recorder 
)

Definition at line 265 of file IOHandler.cpp.

◆ IOHandlerEditline() [2/4]

IOHandlerEditline::IOHandlerEditline ( Debugger debugger,
IOHandler::Type  type,
const lldb::StreamFileSP &  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_prompts,
uint32_t  line_number_start,
IOHandlerDelegate delegate,
repro::DataRecorder data_recorder 
)

◆ 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::StreamFileSP &  ,
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 326 of file IOHandler.cpp.

References m_editline_up.

Member Function Documentation

◆ Activate()

void IOHandlerEditline::Activate ( )
overridevirtual

◆ Cancel()

void IOHandlerEditline::Cancel ( )
overridevirtual

Implements lldb_private::IOHandler.

Definition at line 574 of file IOHandler.cpp.

References m_editline_up.

◆ Deactivate()

void IOHandlerEditline::Deactivate ( )
overridevirtual

◆ GetCommandPrefix()

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

Reimplemented from lldb_private::IOHandler.

Definition at line 376 of file IOHandler.h.

◆ GetContinuationPrompt()

const char * IOHandlerEditline::GetContinuationPrompt ( )

Definition at line 474 of file IOHandler.cpp.

References m_continuation_prompt.

Referenced by GetLine().

◆ GetControlSequence()

ConstString lldb_private::IOHandlerEditline::GetControlSequence ( char  ch)
inlineoverridevirtual

Reimplemented from lldb_private::IOHandler.

Definition at line 372 of file IOHandler.h.

◆ GetCurrentLineIndex()

uint32_t IOHandlerEditline::GetCurrentLineIndex ( ) const

Definition at line 494 of file IOHandler.cpp.

References m_curr_line_idx, and m_editline_up.

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

◆ GetCurrentLines()

const StringList* lldb_private::IOHandlerEditline::GetCurrentLines ( ) const
inline

Definition at line 404 of file IOHandler.h.

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

◆ GetHelpPrologue()

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

Reimplemented from lldb_private::IOHandler.

Definition at line 380 of file IOHandler.h.

◆ GetInterruptExits()

bool lldb_private::IOHandlerEditline::GetInterruptExits ( )
inline

Definition at line 400 of file IOHandler.h.

◆ 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 450 of file IOHandler.cpp.

References m_editline_up, and m_prompt.

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

◆ GotEOF()

void IOHandlerEditline::GotEOF ( )
overridevirtual

Implements lldb_private::IOHandler.

Definition at line 593 of file IOHandler.cpp.

References m_editline_up.

◆ Interrupt()

bool IOHandlerEditline::Interrupt ( )
overridevirtual

◆ PrintAsync()

void IOHandlerEditline::PrintAsync ( Stream stream,
const char *  s,
size_t  len 
)
overridevirtual

◆ Run()

void IOHandlerEditline::Run ( )
overridevirtual

◆ SetBaseLineNumber()

void IOHandlerEditline::SetBaseLineNumber ( uint32_t  line)

Definition at line 490 of file IOHandler.cpp.

References m_base_line_number.

Referenced by IOHandlerEditline().

◆ SetContinuationPrompt() [1/2]

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

Definition at line 479 of file IOHandler.cpp.

References m_continuation_prompt, and m_editline_up.

Referenced by IOHandlerEditline().

◆ SetContinuationPrompt() [2/2]

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

◆ SetInterruptExits()

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

Definition at line 402 of file IOHandler.h.

◆ SetPrompt() [1/2]

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

Reimplemented from lldb_private::IOHandler.

Definition at line 464 of file IOHandler.cpp.

References m_editline_up, and m_prompt.

Referenced by lldb_private::IOHandlerConfirm::IOHandlerConfirm(), and IOHandlerEditline().

◆ SetPrompt() [2/2]

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

Member Data Documentation

◆ m_base_line_number

uint32_t lldb_private::IOHandlerEditline::m_base_line_number
protected

Definition at line 433 of file IOHandler.h.

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

◆ m_color_prompts

bool lldb_private::IOHandlerEditline::m_color_prompts
protected

Definition at line 436 of file IOHandler.h.

Referenced by IOHandlerEditline().

◆ m_continuation_prompt

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

Definition at line 431 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 434 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 432 of file IOHandler.h.

Referenced by GetLines().

◆ m_delegate

IOHandlerDelegate& lldb_private::IOHandlerEditline::m_delegate
protected

Definition at line 429 of file IOHandler.h.

Referenced by Activate(), Deactivate(), GetLine(), GetLines(), Interrupt(), and Run().

◆ m_editing

bool lldb_private::IOHandlerEditline::m_editing
protected

Definition at line 438 of file IOHandler.h.

Referenced by GetLine().

◆ m_editline_up

std::unique_ptr<Editline> lldb_private::IOHandlerEditline::m_editline_up
protected

◆ m_interrupt_exits

bool lldb_private::IOHandlerEditline::m_interrupt_exits
protected

Definition at line 437 of file IOHandler.h.

Referenced by Run().

◆ m_multi_line

bool lldb_private::IOHandlerEditline::m_multi_line
protected

Definition at line 435 of file IOHandler.h.

Referenced by GetLine(), and Run().

◆ m_prompt

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

Definition at line 430 of file IOHandler.h.

Referenced by GetPrompt(), and SetPrompt().


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