gdb: gdb
23.2.4.1 gdb.printing
.....................
This module provides a collection of utilities for working with
pretty-printers.
'PrettyPrinter (NAME, SUBPRINTERS=None)'
This class specifies the API that makes 'info pretty-printer',
'enable pretty-printer' and 'disable pretty-printer' work.
Pretty-printers should generally inherit from this class.
'SubPrettyPrinter (NAME)'
For printers that handle multiple types, this class specifies the
corresponding API for the subprinters.
'RegexpCollectionPrettyPrinter (NAME)'
Utility class for handling multiple printers, all recognized via
regular expressions. Writing a Pretty-Printer, for an
example.
'FlagEnumerationPrinter (NAME)'
A pretty-printer which handles printing of 'enum' values. Unlike
GDB's built-in 'enum' printing, this printer attempts to work
properly when there is some overlap between the enumeration
constants. The argument NAME is the name of the printer and also
the name of the 'enum' type to look up.
'register_pretty_printer (OBJ, PRINTER, REPLACE=False)'
Register PRINTER with the pretty-printer list of OBJ. If REPLACE
is 'True' then any existing copy of the printer is replaced.
Otherwise a 'RuntimeError' exception is raised if a printer with
the same name already exists.