HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

+pathtrace
+pathtrace[=kind]
The +pathtrace option provides a mechanism to record program execution control
flow into global and/or local path tables. The saved information can be used by the HP
WDB debugger to assist with crash path recovery from the core file, or to assist when
debugging the program by showing the executed branches.
Currently only if, else, switch-case-default, and try-catch execution paths
are recorded in the path table. If there is no condition statement inside a for, while,
or do-while loop, then no excution path is recorded.
Usage:
The defined values for kind are:
local Generates a local path table and records basic
block-execution information in it at runtime.
global Generates a global path table and records basic
block-execution information in it at runtime.
The global path table is a fixed size. The default size of the
table is 8K items. Each basic block that is executed is
recorded as an item of path-trace information in the table.
Each thread has its own table, and when the table is full, the
runtime system wraps the path table back to the beginning
of the table.
The table size can be configured at runtime using the
environment variable HP_PATHTRACE_CONFIG, which also
lets you specify a file to be used for dumping full tables and
the dumping format, before wrapping around or at
thread/program termination.
The syntax of the environment variable
HP_PATHTRACE_CONFIG is:
HP_PATHTRACE_CONFIG=item[:item]
item := TABLE_SIZE=nnn |
FILE=[stdout|stderr|<filename>] |
FORMAT=[binary|text]
where:
TABLE_SIZE specifies the size, expressed as the number
of items (nnn), of the global path table.
FILE specifies the dumping output filename to use when
the global path table is full.
FORMAT specifies the dumping format in either "binary
or human-readable "text".
42 Command-Line Options