Oracle® Solaris Studio 12.4: Debugging a Program With dbx

Exit Print View

Updated: January 2015

Using Pretty-Printing

Pretty-printing enables your program to provide its own rendition of an expression's value through a function call. dbx supports two mechanisms for pretty-printing, call-base pretty-printing and pretty-printing filters written in python. The older, call-based mechanism works by calling functions defined in the debuggee which conform to a certain pattern.

dbx determines which mechanism to use with the dbxenv variable output_pretty_print_mode. If set to call, call-based pretty-printers are sought. If set to filter, python-based pretty-printers are sought. If set to filter_unless_call, call-based pretty-printers take precedence over filters.

Pretty-printers, regardless of type,are invoked if you specify the –p option to the print command, rprint command, display command, or watch command. For more about invocation of pretty-printers, see Invoking Pretty-Printing.

If the dbxenv variable output_pretty_print is set to on, –p is passed to the print command, rprint command, or display command as the default. Use +p to override this behavior. In addition, output_pretty_print controls pretty-printing for IDE locals, balloon evaluation, and watches.