- Main Page
- Modules
- Classes

- Search for |

# Command Line Switches

This section describes the command line switches that are currently supported by Pin.

Pin switches should appear after the pin command, but before the -t <tool> option. The following Pin switches are supported:

| -follow_execv | Execute all processes spawned by the execv class system calls with Pin.
| -help | Print the help message.
| -pause_tool <n> | Pause and print the PID so the debugger can be attached after the tool is loaded. Processing will resume after "n" seconds.
| -logfile | Indicates the path and name of the log file. The default path is the current working directory. The default name is pin.log.
| -unique_logfile | Appends the pid to the log file name.
| -error_file | Indicates the path and name of the error file. The default path is the current working directory. If an error file is specified, all errors will be written to the error file, and will not be displayed on the console. If an error file is not specified, no error file will be created. The error file is designed to be parsed by tools that layer on top of Pin. See Pin Error Reporting Support.
| -unique_error_file | Appends the pid to the error file name.
| -injection <mode> | Where <mode> is one of dynamic, self, child, parent. UNIX-only. See Injection.
| -inline | Inline simple analysis routines.
| -log_inline | Report which analysis routines have been inlined in the pin.log file.
| -limit_code_cache <n> | Max (in bytes) code cache size (0==unlimited, default).
| -pid <pid #> | Attach Pin and the Pintool to an already running executable with the given process id.
| -pin_memory_range | Restrict pin to a memory range, 0x80000000:0x90000000 or size: 0:0x10000000.
| -separate_memory | Redirect pin and tool memory allocation to separate area.
| -tool_load_option | Load the tool with additional flags. Currently supported flags are: deepbind: (Linux only) Load the tool with the RTLD_DEEPBIND flag to make it a self-contained library. For more information see the dlopen man pages.
| -t <toolname> | Specify the Pintool to use. If you are running a 32-bit application in an IA-32 architecture, or a 64-bit application on an Intel(R) 64 architecture, only -t <toolname> is needed. If you are running an application on an Intel(R) 64 architecture, where all of the components in the chain are either 32-bit or 64-bit, but not both, only -t <toolname> is needed. If you are running an application on an Intel(R) 64 architecture, where components in the chain are both 32-bit and 64-bit, use -t64 <64-bit toolname> to specify the 64-bit tool binary followed by -t <32-bit toolname> to specify the 32-bit tool binary and the tool options. For more information, see Instrumenting Applications on Intel(R) 64 Architectures
| -t64 <64-bit toolname> | Specify 64-bit tool binary for Intel(R) 64 architecture. If you are running an application on an Intel(R) 64 architecture, where components in the chain are both 32-bit and 64-bit, use -t64 together with -t as described above. See Instrumenting Applications on Intel(R) 64 Architectures.
Important: Using -t64 without -t is not recommended, since in this case when given a 32-bit application, Pin will run the application without applying any tool.
| -p32 <toolname> | Specify Pin binary for IA-32 architecture. See Instrumenting Applications on Intel(R) 64 Architectures.
| -p64 <toolname> | Specify Pin binary for Intel(R) 64 architecture. See Instrumenting Applications on Intel(R) 64 Architectures.
| -smc_support [1][0] | Enable (1) or disable (0) support for self-modifying code (SMC) in the application. This option is enabled by default.
| -smc_strict [0][1] | Enable (1) or disable (0) support for SMC inside basic blocks. By default (0), pin assumes that basic blocks do not modify their own code.
| -appdebug | Debug the application, stopping in the debugger as soon as the application is launched.
| -appdebug_enable | Enable application level debugger support, but do not stop when the application is launched. Instead, you can connect a debugger after launch.
| -appdebug_silent | When application debugging is enabled, Pin normally prints a message telling how to connect an external debugger. This knob disables the message. Pin never prints this message when -appdebug_connection is specified.
| -appdebug_exclude | When application debugging and -follow_execv are both specified, the default behavior is to enable debugging on all child processes. This knob, which is repeatable, specifies an application name for which debugging is disabled. Debugging is disabled for a process if it's argv[0] value matches one of the -appdebug_exclude names.
| -appdebug_allow_remote | When application debugging is enabled, the default behavior requires the debugger to run on the same system as Pin. This knob allows Pin to connect to an external debugger that runs on a remote system. This knob is ignored when -appdebug_connection is specified because -appdebug_connection explicitly specifies the machine on which the debugger runs.
| -appdebug_connection | When application debugging is enabled, Pin's default behavior is to open a TCP port and wait for a debugger to connect. This knob reverses the roles; the debugger opens a TCP port and waits for Pin to connect to the port specified in this knob. The format of the knob value should be "[ip]:port". If the "ip" address is specified, it should be in dot-decimal notation. If "ip" is omitted, Pin connects to the specified port on the local machine. The port number should be specified in decimal. Note that this knob is never used when debugging with GDB.
| -detach_reattach | Allow detach and reattach in probe mode. Windows* only.
| -debug_instrumented_processes | Print message to allow debugger attach to instrumented processes. Windows* only.
| -slow_asserts | Perform expensive sanity checks

Pin also supports the following tool switches. Tool switches should be placed after the tool name, but before the double dash ("--").

| -logfile | Indicates the path and name of the log file. The default path is the current working directory. The default name is pintool.log.
| -unique_logfile | Appends the pid to the log file name.
| -discard_line_info <module_name> | Discard line information for specific module. Module name should be a short name without path, and not a symbolic link
| -discard_line_info_all | Discard line information for all modules.
| -help | Print the help message.
| -support_jit_api | Enables managed platforms support.
| -short_name | Use the shortest name for the RTN. Names with version substrings are preferred over the same name without the substring.
| -symbol_path <list of paths> | Specifies list of paths separated with semicolons that are searched to find symbol and line information. The list is searched when necessary after default search algorithm is applied. Default list is empty. Windows* only.
| -slow_asserts | Perform expensive sanity checks. Recommended to be used in development and testing phase.

If you want to add your own command line options to your tool, please see KNOBS.