Previous: Pretty-Printer Example, Up: Pretty Printing
info pretty-printer [object-regexp [name-regexp]]object-regexp is a regular expression matching the objects
whose pretty-printers to list. 
Objects can be global, the program space's file
(see Progspaces In Python),
and the object files within that program space (see Objfiles In Python). 
See Selecting Pretty-Printers, for details on how gdb
looks up a printer from these three objects.
     
name-regexp is a regular expression matching the name of the printers to list.
disable pretty-printer [object-regexp [name-regexp]]enable pretty-printer [object-regexp [name-regexp]]Example:
Suppose we have three pretty-printers installed: one from library1.so
named foo that prints objects of type foo, and
another from library2.so named bar that prints two types of objects,
bar1 and bar2.
     (gdb) info pretty-printer
     library1.so:
       foo
     library2.so:
       bar
         bar1
         bar2
     (gdb) info pretty-printer library2
     library2.so:
       bar
         bar1
         bar2
     (gdb) disable pretty-printer library1
     1 printer disabled
     2 of 3 printers enabled
     (gdb) info pretty-printer
     library1.so:
       foo [disabled]
     library2.so:
       bar
         bar1
         bar2
     (gdb) disable pretty-printer library2 bar:bar1
     1 printer disabled
     1 of 3 printers enabled
     (gdb) info pretty-printer library2
     library1.so:
       foo [disabled]
     library2.so:
       bar
         bar1 [disabled]
         bar2
     (gdb) disable pretty-printer library2 bar
     1 printer disabled
     0 of 3 printers enabled
     (gdb) info pretty-printer library2
     library1.so:
       foo [disabled]
     library2.so:
       bar [disabled]
         bar1 [disabled]
         bar2
   Note that for bar the entire printer can be disabled,
as can each individual subprinter.