Pin
Classes | Public Member Functions | List of all members
SHELL Class Reference

Public Member Functions

BOOL Construct ()
 
BOOL Enable (const DEBUGGER_SHELL::STARTUP_ARGUMENTS &args)
 
unsigned AddExtendedHelpCategory (const std::string &name, const std::string &description, BOOL *alreadyExists)
 
void AddExtendedHelpMessage (unsigned category, const std::string &cmd, const std::string &description)
 
REG GetSkipOneRegister ()
 
- Public Member Functions inherited from DEBUGGER_SHELL::ISHELL
virtual ~ISHELL ()=0
 

Member Function Documentation

◆ AddExtendedHelpCategory()

unsigned SHELL::AddExtendedHelpCategory ( const std::string &  name,
const std::string &  description,
BOOL *  alreadyExists 
)
inlinevirtual

Tools that use the debugger shell may still implement their own extended debugger commands by using PIN_AddDebugInterpreter(). The debugger shell provides a way for such tools to include a help message for these extended commands in the help message that the debugger shell prints. Tools can use AddExtendedHelpCategory() to define their own category of help messages.

Parameters
[in]nameThe name of the category.
[in]descriptionDescribes this category of extended commands.
[out]alreadyExistsIf not NULL, receives TRUE if a tool already added a custom category for name. In this case, the debugger shell uses the previous description.
Returns
The ID for this custom category. If a tool already added a category named name, that previous category ID is returned.

Implements DEBUGGER_SHELL::ISHELL.

◆ AddExtendedHelpMessage()

void SHELL::AddExtendedHelpMessage ( unsigned  category,
const std::string &  cmd,
const std::string &  description 
)
inlinevirtual

Adds a help message for an extended command that is implemented by the layered tool. See also AddExtendedHelpCategory() for more information on adding extended debugger commands.

Parameters
[in]categoryThe category for this extended command. This can either be one of the predefined HELP_CATEGORY constants or a value returned by AddExtendedHelpCategory().
[in]cmdThe name of a tool's extended command.
[in]descriptionDescribes what the command does.

Implements DEBUGGER_SHELL::ISHELL.

◆ Enable()

BOOL SHELL::Enable ( const DEBUGGER_SHELL::STARTUP_ARGUMENTS args)
inlinevirtual

This method must be called once, typically from the tool's main() function. It enables the Pin instrumentation which implements the debugger extensions.

Parameters
[in]argsArguments that customize the debugger shell.
Returns
TRUE on success. If there is an error, a diagnostic is printed and this method returns FALSE.

Implements DEBUGGER_SHELL::ISHELL.

◆ GetSkipOneRegister()

REG SHELL::GetSkipOneRegister ( )
inlinevirtual

Tools that override the default instrumentation with ICUSTOM_INSTRUMENTOR may need a virtual register to hold the "skip one" flag. This method provides the register number to use for this.

Returns
The Pin virtual register to use for the "skip one" flag. This is one of the REG_INST_Gn registers.

Implements DEBUGGER_SHELL::ISHELL.


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