Table 1-4 lists the reserved words. Enclose them in single quotes if you use them to select attributes or values.
Table 1-4 Reserved Wordsadd | alloc | buffer |
clear | connect | continue |
create | dealloc | delete |
disable | enable | fcns |
filter | help | history |
kill | ktrace | list |
off | on | pfilter |
probes | quit | resume |
sets | source | suspend |
trace | untrace | values |
For example:
enable 'trace'='on'
means enable all probes whose trace attribute has the value of ON. Both trace and on are reserved words, so they both have to be enclosed in single quotation marks.
Table 1-5 prex Commands
Command |
Action |
---|---|
clear $set_name clear selector_list |
Disconnect connected probe functions. |
connect &debug $set_name connect &debug selector_list |
Connect the debug function to the probe points. This does not enable the probe points. The debug function sends its output to stderr and not to the trace file. |
continue |
Resume execution of your program, leaving prex attached. |
create $set_name selector_list |
Create a set with probe points matching selector_list. Also creates an alias, $set_name, for the selector_list. |
enable $set_name enable selector_list disable $set_name disable selector_list |
Control whether the probe points perform the action they are set up for. Probe points are disabled by default; prex does not turn on tracing. The cheapest way (in terms of execution time at the probe point) to stop a probe point from tracing is to use the disable command. The enable and disable commands are a master switch. If a probe point is not enabled, even if the probe point is connected to the debug() function and trace is on, no information is sent to stderr or to the trace file. |
help |
List all available prex commands. |
list attributes probes selector_list list attributes probes $set_name |
List whether specified probe points are enabled or disabled, whether they have tracing on or off, and what the connected probe function is. Attributes are selectors as described in "Attributes ". For example,
list name file probes $all lists only name and file values for matching probe points, while the command list probes $all lists all default attributes and their values (name, enable, trace, file, line, and funcs). |
list fcns |
List the defined functions (currently, only &debug is defined). |
list history |
List the control command history. The history of the commands used with connect, clear, trace, untrace, enable, and disable are executed whenever a new shared object is brought into your program through dlopen(). See "dlopen() and dlclose() and History". |
list sets |
List the defined sets. |
list values attributes |
List the unique values associated with the specified attributes. For example, list values keys lists all the unique keys in the program. |
source filename |
Source a file of prex commands. filename is a quoted string. |
trace $set_name >trace selector_list untrace $set_name untrace selector_list |
Control the tracing action of the probe points. trace and untrace determine whether a probe point generates a trace record when it is executed. Neither trace nor untrace enables the probe points.
The default mode is that tracing is on.
The untrace command is useful when you are interested in getting only debug output. If you are using this, your probe should be enabled with tracing off and debug on.
Tracing disturbs your program less than the debug function does because trace writes to an mmap'd file while debug writes to stderr. |
quit |
Quit prex; if your program was loaded with prex, it will be killed; if your program was attached to prex, it will be resumed. |
quit kill |
Quit prex and kill your program. |
quit resume |
Quit prex and resume execution of your program. |
quit suspend |
Quit prex and leave your program suspended. |