output_pretty_print Environment Variable | Using a Custom Pretty-Print Routine |
If you specify the -p flag with the to print, rprint, or display command, dbx invokes the ksh function prettyprint, which searches for a function in the target process with the name db_pretty_print that takes three arguments
char *db_pretty_print(const Foo *, int flags, char *formatstring);
If the function is found, dbx calls it and prints (or displays) its return value; if it is not found, dbx prints (or displays) the expression itself. If the dbx environment variable output_pretty_print is set to on, -p is passed as the default; use +p to override this behavior for one command.
prettyprint is defined in the system-wide dbx startup file (see dbx Startup Sequence). The value passed in the flags argument is bit-wise OR one of the following:
FVERBOSE | 0x1 | Not currently implemented, always set. |
FDYNAMIC | 0x2 | -d |
FRECURSE | 0x4 | -r |
FFORMAT | 0x8 | -f (If set, "formatstring" is the format part.) |
FLITERAL | 0x10 | -l |
See print Command for the meaning of these flags.