Programming Utilities Guide

Starting Your Program With prex

When you start your program with prex, it preloads the libtnfprobe library into the target program, so the program does not have to be explicitly linked with libtnfprobe.

prex starts your program running, then stops the program before any user code is executed. Execution is stopped even before the .init() sections are executed, so you can place probe points in the .init() sections to trace initialization code.

In the simplest case, with an executable named a.out that takes no arguments and that contains probe points, the following command can be used:

$ prex a.out

Note -

(prex uses the $PATH environment variable to find the executable.)


To specify options, use:

prex [-o outfilename] [-s kbytes_size] 
   [-l sharedobjs] cmd [cmdargs...]

The -o, -s, and -l options are explained in "Command Line Options for prex ".