Miscellaneous options

 

Option

Default

 

-follow-child-processes

no

Controls whether Purify monitors child processes created when a Purify'd program forks. If you do not specify -follow-child-processes, Purify does not follow child processes.

If this option is set to yes, Purify invokes a new Viewer (if appropriate) and monitors the progress of the child process separately from the parent, reporting access errors and memory leaks.

 

-freeze-on-error

no

If this option is set, the Purify Viewer delays sending a response back to the application when an error is reported. This usually causes the application to freeze. This option is useful when you want to explore the relationship between error reports and program activity.

While the application is frozen, two new buttons appear on the message display. Press Continue to continue to the next error message. Press Reset freeze-on-error then Continue to continue uninterrupted.

Note:

  • Do not use this feature with a debugger. Instead, set a debugger breakpoint in the function purify_stop_here. When the application is frozen by the Viewer, the debugger freezes also, so you cannot examine variables or obtain stack traces.

 

-handle-signals
-ignore-signals

not set
system-dependent

Purify installs a signal handler for many of the possible software signals that can be delivered to a Purify'd process. The signal handler outputs a SIG or COR message to the Viewer or log file before passing control to the user or to the default signal handler. The initial default signals handled by Purify are:

Solaris: SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, SIGEMT, SIGFPE, SIGBUS, SIGCANCEL, SIGPIPE, SIGSEGV, SIGSYS, SIGTERM, SIGUSR1, SIGUSR2, SIGPOLL, SIGXCPU, SIGXFSZ, SIGFREEZE, SIGTHAW, SIGRTMIN, SIGRTMAX

HP-UX: SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, SIGEMT, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGPIPE, SIGTERM, SIGUSR1, SIGUSR2, SIGLOST, SIGRESERVE, SIGDIL, SIGXCPU, SIGXFSZ SIGIO, SIGWINCH, SIGGFAULT, SIGRTMAX, SIGRTMIN

IRIX: SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGABRT, SIGEMT, SIGFPE, SIGBUS, SIGCPU, SIGSEGV, SIGSYS, SIGPIPE, SIGALRM, SIGTERM, SIGUSR1, SIGUSR2, SIGTSTP, SIGTTIN, SIGTTOU, SIGVTALRM, SIGPROF, SIGXCPU, SIGXFSZ

To ignore signals in this list, set -ignore-signals to a comma-delimited list of the signals to be ignored. For example: -ignore-signals=SIGSEGV,SIGBUS

To handle additional signals, set    to a comma-delimited list of the additional signals. For example: -handle-signals=SIGALRM,SIGCHLD

Purify does not handle SIGKILL, SIGSTOP, or SIGTRAP signals, since doing so interferes with normal program operation. If you specify these signals in -handle-signals, Purify silently ignores them.

Note: The default action on delivery of SIGALRM terminates the process. Purify does not handle this signal by default, since it is used internally by functions such as sleep. However, if you see a process terminated with a message like "Alarm clock," you can set -handle-signals=SIGALRM to get a report when the program terminates. You can also add the following suppression directive to a .purify file to silence the signal message when used in the sleep function:

suppress SIG sleep

See the man pages for signal and sigmask, and the /usr/include/signal.h and /usr/include/sys/signal.h files for more information on signals.

 

-jit-debug

not set

Enables just-in-time debugging, instructing Purify to automatically start a debugger when it reports a message of a type you specify. You can use your debugger to investigate errors even when you run your application from outside the debugger.

Specify a list of keywords separated by commas. For example:

-jit-debug="error, warning, ask, watchpoint"

  ask:        Purify asks you if you want to start
              
the debugger when it encounters
              
the specified type of message

  error:      
Purify starts a debugger for
              
fatal or corrupting messages

  warning:    
Purify starts a debugger for
              
warning messages

  watchpoint: 
Purify starts a debugger for
              
watchpoint messages

You can change the list of available debuggers, and Purify's interface to them, using your ~/.purify.Xdefaults file and the pure_jit_debug script which is located in the Purify installation directory.

 

-merge

 

Instructs Purify to merge the data from multiple log files. For example, use the command:

% purify -merge=result a.plog b.plog

to merge a.plog and b.plog into the target file result.

To merge all log files in a directory, use the command:

% purify -merge=result *.plog

If the file result already exists, this option will not overwrite it unless you use the -force option as follows:

% purify -merge=result -force a.plog b.plog

If you do not specify a target file, Purify sends the results to stdout.

Note: To send Purify data to a log file, use the -log-file option, or select File > Export in the Purify Viewer.

 

-pure-help-max-wait

20 seconds

Enables you to set the number of seconds that the Purify Viewer waits for the Netscape browser to display the Purify help system.

If initialization of the Netscape browser takes longer than the value set for this option, Purify displays an error message and stops trying to open the browser.

You can also use the environment variable PURE_HELP_WAIT_MAX to increase the time allowed for initialization.

 

 

-replace-path

not set

In an instrumented shared library or an instrumented "incomplete" executable (that is, an executable that references a shared library), replaces one specified library path with another.

This option is intended to make it easier to run instrumented programs generated by other teams or on other systems. It allows you set library paths in instrumented files to reflect the location of the referenced libraries on your own system. When the other team creates the instrumented program, they should use the option -lib-path-length, selecting a value to accommodate the length of the longest absolute path on your system.

To use this option for an incomplete executable, type:

% purify -replace-path <old-path> <new-path> a.out

For an instrumented shared library, type:

% purify -replace-path <old-path> <new-path> <shared_library>_pure_23456887.sl

Specify both paths as absolute paths.

If you need to replace more than one path name in a file, run this command as many times as necessary, replacing one path name with each pass.

This option is supported only on HP-UX.