GDB (xrefs)
|
Classes | |
class | RegexpSubprinter |
Public Member Functions | |
__init__ (self, name) | |
add_printer (self, name, regexp, gen_printer) | |
__call__ (self, val) | |
__init__ (self, name) | |
add_printer (self, name, regexp, gen_printer) | |
__call__ (self, val) | |
![]() |
Public Attributes | |
subprinters | |
![]() | |
name = name | |
subprinters = subprinters | |
bool | enabled = True |
Class for implementing a collection of regular-expression based pretty-printers. Intended usage: pretty_printer = RegexpCollectionPrettyPrinter("my_library") pretty_printer.add_printer("myclass1", "^myclass1$", MyClass1Printer) ... pretty_printer.add_printer("myclassN", "^myclassN$", MyClassNPrinter) register_pretty_printer(obj, pretty_printer)
Definition at line 156 of file printing.py.
gdb.printing.RegexpCollectionPrettyPrinter.__init__ | ( | self, | |
name ) |
Reimplemented from gdb.printing.PrettyPrinter.
Definition at line 175 of file printing.py.
References gdb.printing.RegexpCollectionPrettyPrinter.__init__().
Referenced by gdb.printing.RegexpCollectionPrettyPrinter.__init__().
gdb.printing.RegexpCollectionPrettyPrinter.__init__ | ( | self, | |
name ) |
Reimplemented from gdb.printing.PrettyPrinter.
Definition at line 175 of file printing.py.
References gdb.printing.RegexpCollectionPrettyPrinter.__init__().
gdb.printing.RegexpCollectionPrettyPrinter.__call__ | ( | self, | |
val ) |
Lookup the pretty-printer for the provided value.
Reimplemented from gdb.printing.PrettyPrinter.
Definition at line 200 of file printing.py.
References gdb.types.get_basic_type(), gdb.printing.PrettyPrinter.subprinters, and gdb.printing.RegexpCollectionPrettyPrinter.subprinters.
gdb.printing.RegexpCollectionPrettyPrinter.__call__ | ( | self, | |
val ) |
Lookup the pretty-printer for the provided value.
Reimplemented from gdb.printing.PrettyPrinter.
Definition at line 200 of file printing.py.
References gdb.types.get_basic_type().
gdb.printing.RegexpCollectionPrettyPrinter.add_printer | ( | self, | |
name, | |||
regexp, | |||
gen_printer ) |
Add a printer to the list. The printer is added to the end of the list. Arguments: name: The name of the subprinter. regexp: The regular expression, as a string. gen_printer: A function/method that given a value returns an object to pretty-print it. Returns: Nothing.
Definition at line 178 of file printing.py.
References gdb.printing.PrettyPrinter.subprinters, and gdb.printing.RegexpCollectionPrettyPrinter.subprinters.
gdb.printing.RegexpCollectionPrettyPrinter.add_printer | ( | self, | |
name, | |||
regexp, | |||
gen_printer ) |
Add a printer to the list. The printer is added to the end of the list. Arguments: name: The name of the subprinter. regexp: The regular expression, as a string. gen_printer: A function/method that given a value returns an object to pretty-print it. Returns: Nothing.
Definition at line 178 of file printing.py.
References gdb.printing.PrettyPrinter.subprinters, and gdb.printing.RegexpCollectionPrettyPrinter.subprinters.
gdb.printing.RegexpCollectionPrettyPrinter.subprinters |
Definition at line 213 of file printing.py.
Referenced by gdb.printing.RegexpCollectionPrettyPrinter.__call__(), gdb.printing.PrettyPrinter.__init__(), and gdb.printing.RegexpCollectionPrettyPrinter.add_printer().