- Main Page
- Modules
- Classes

- Search for |

# DEBUGGER_SHELL

## Classes

class | DEBUGGER_SHELL::ISHELL
struct | DEBUGGER_SHELL::STARTUP_ARGUMENTS
class | DEBUGGER_SHELL::ICUSTOM_INSTRUMENTOR

## Enumerations

enum | DEBUGGER_SHELL::HELP_CATEGORY { DEBUGGER_SHELL::HELP_CATEGORY_GENERAL, DEBUGGER_SHELL::HELP_CATEGORY_BREAKPOINTS, DEBUGGER_SHELL::HELP_CATEGORY_TRACEPOINTS, DEBUGGER_SHELL::HELP_CATEGORY_REGISTERS,
DEBUGGER_SHELL::HELP_CATEGORY_END
}

## Functions

DEBUGGER_SHELL::ISHELL * | DEBUGGER_SHELL::CreateShell ()

## Detailed Description

Pin tools that run with the "-appdebug" switch can use this class to implement some common custom debugger commands. Once enabled, a user can type these commands interactively at the debugger prompt. In GDB, type "monitor help" to see a list of the available commands.

Typical usage in the tool is as follows:

      #include "debugger-shell.H"

      int main(int argc, char **argv)
      {
          if (PIN_Init(argc,argv))
              return 1;

          DEBUGGER_SHELL::ISHELL *shell = DEBUGGER_SHELL::CreateShell();
          DEBUGGER_SHELL::STARTUP_ARGUMENTS args;
          if (!shell->Enable(args))
              return 1;

          PIN_StartProgram();
      }

The tool must also compile and link with "debugger-shell.cpp".

## Enumeration Type Documentation

enum DEBUGGER_SHELL::HELP_CATEGORY

| Predefined categories of help commands.

Enumerator:

  HELP_CATEGORY_GENERAL | General commands.
  HELP_CATEGORY_BREAKPOINTS | Breakpoint commands.
  HELP_CATEGORY_TRACEPOINTS | Tracepoint commands.
  HELP_CATEGORY_REGISTERS | Register names.
  HELP_CATEGORY_END | Marks the last predefined help category. Custom category numbers start here.

## Function Documentation

ISHELL * DEBUGGER_SHELL::CreateShell | ( |  | ) |

| Create a debugger shell object.

Returns:
  A new debugger shell object on success. If there is an error, a diagnostic is printed and this method returns NULL.