LLDB  mainline
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
lldb::SBCommand Class Reference

#include <SBCommandInterpreter.h>

Collaboration diagram for lldb::SBCommand:
Collaboration graph
[legend]

Public Member Functions

 SBCommand ()
 
 operator bool () const
 
bool IsValid ()
 
const char * GetName ()
 
const char * GetHelp ()
 
const char * GetHelpLong ()
 
void SetHelp (const char *)
 
void SetHelpLong (const char *)
 
uint32_t GetFlags ()
 
void SetFlags (uint32_t flags)
 
lldb::SBCommand AddMultiwordCommand (const char *name, const char *help=nullptr)
 
lldb::SBCommand AddCommand (const char *name, lldb::SBCommandPluginInterface *impl, const char *help=nullptr)
 Add a new subcommand to the lldb::SBCommand. More...
 
lldb::SBCommand AddCommand (const char *name, lldb::SBCommandPluginInterface *impl, const char *help, const char *syntax)
 Add a new subcommand to the lldb::SBCommand. More...
 
lldb::SBCommand AddCommand (const char *name, lldb::SBCommandPluginInterface *impl, const char *help, const char *syntax, const char *auto_repeat_command)
 Add a new subcommand to the lldb::SBCommand. More...
 

Private Member Functions

 SBCommand (lldb::CommandObjectSP cmd_sp)
 

Private Attributes

lldb::CommandObjectSP m_opaque_sp
 

Friends

class SBDebugger
 
class SBCommandInterpreter
 

Detailed Description

Definition at line 289 of file SBCommandInterpreter.h.

Constructor & Destructor Documentation

◆ SBCommand() [1/2]

SBCommand::SBCommand ( )

Definition at line 628 of file SBCommandInterpreter.cpp.

References LLDB_RECORD_CONSTRUCTOR_NO_ARGS.

◆ SBCommand() [2/2]

SBCommand::SBCommand ( lldb::CommandObjectSP  cmd_sp)
private

Definition at line 630 of file SBCommandInterpreter.cpp.

Member Function Documentation

◆ AddCommand() [1/3]

lldb::SBCommand SBCommand::AddCommand ( const char *  name,
lldb::SBCommandPluginInterface impl,
const char *  help,
const char *  syntax 
)

Add a new subcommand to the lldb::SBCommand.

The new command won't support autorepeat. If you need this functionality, use the override of this function that accepts the auto_repeat_command parameter.

Parameters
[in]nameThe name of the command.
[in]implThe handler of this command.
[in]helpThe general description to show as part of the help message of this command.
[in]syntaxThe syntax to show as part of the help message of this command. This could include a description of the different arguments and flags this command accepts.
Returns
A lldb::SBCommand representing the newly created command.

Definition at line 705 of file SBCommandInterpreter.cpp.

References AddCommand(), LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

◆ AddCommand() [2/3]

lldb::SBCommand SBCommand::AddCommand ( const char *  name,
lldb::SBCommandPluginInterface impl,
const char *  help,
const char *  syntax,
const char *  auto_repeat_command 
)

Add a new subcommand to the lldb::SBCommand.

The new command won't support autorepeat. If you need this functionality, use the override of this function that accepts the auto_repeat_command parameter.

Parameters
[in]nameThe name of the command.
[in]implThe handler of this command.
[in]helpThe general description to show as part of the help message of this command.
[in]syntaxThe syntax to show as part of the help message of this command. This could include a description of the different arguments and flags this command accepts.
[in]auto_repeat_commandAutorepeating is triggered when the user presses Enter successively after executing a command. If nullptr is provided, the previous exact command will be repeated. If "" is provided, autorepeating is disabled. Otherwise, the provided string is used as a repeat command.
Returns
A lldb::SBCommand representing the newly created command.

Definition at line 716 of file SBCommandInterpreter.cpp.

References AddCommand(), IsValid(), LLDB_RECORD_METHOD, LLDB_RECORD_RESULT, and m_opaque_sp.

◆ AddCommand() [3/3]

lldb::SBCommand SBCommand::AddCommand ( const char *  name,
lldb::SBCommandPluginInterface impl,
const char *  help = nullptr 
)

Add a new subcommand to the lldb::SBCommand.

The new command won't support autorepeat. If you need this functionality, use the override of this function that accepts the auto_repeat parameter.

Parameters
[in]nameThe name of the command.
[in]implThe handler of this command.
[in]helpThe general description to show as part of the help message of this command.
Returns
A lldb::SBCommand representing the newly created command.

Definition at line 694 of file SBCommandInterpreter.cpp.

References LLDB_RECORD_METHOD, and LLDB_RECORD_RESULT.

Referenced by AddCommand().

◆ AddMultiwordCommand()

lldb::SBCommand SBCommand::AddMultiwordCommand ( const char *  name,
const char *  help = nullptr 
)

◆ GetFlags()

uint32_t SBCommand::GetFlags ( )

Definition at line 738 of file SBCommandInterpreter.cpp.

References IsValid(), LLDB_RECORD_METHOD_NO_ARGS, and m_opaque_sp.

◆ GetHelp()

const char * SBCommand::GetHelp ( )

◆ GetHelpLong()

const char * SBCommand::GetHelpLong ( )

◆ GetName()

const char * SBCommand::GetName ( )

◆ IsValid()

bool SBCommand::IsValid ( )

◆ operator bool()

SBCommand::operator bool ( ) const
explicit

Definition at line 636 of file SBCommandInterpreter.cpp.

References LLDB_RECORD_METHOD_CONST_NO_ARGS.

◆ SetFlags()

void SBCommand::SetFlags ( uint32_t  flags)

Definition at line 744 of file SBCommandInterpreter.cpp.

References IsValid(), LLDB_RECORD_METHOD, and m_opaque_sp.

◆ SetHelp()

void SBCommand::SetHelp ( const char *  help)

Definition at line 662 of file SBCommandInterpreter.cpp.

References IsValid(), LLDB_RECORD_METHOD, and m_opaque_sp.

◆ SetHelpLong()

void SBCommand::SetHelpLong ( const char *  help)

Definition at line 669 of file SBCommandInterpreter.cpp.

References IsValid(), LLDB_RECORD_METHOD, and m_opaque_sp.

Friends And Related Function Documentation

◆ SBCommandInterpreter

friend class SBCommandInterpreter
friend

Definition at line 400 of file SBCommandInterpreter.h.

◆ SBDebugger

friend class SBDebugger
friend

Definition at line 399 of file SBCommandInterpreter.h.

Member Data Documentation

◆ m_opaque_sp

lldb::CommandObjectSP lldb::SBCommand::m_opaque_sp
private

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