* python/lib/gdb/command/pretty_printers.py
(do_enable_pretty_printer_1): Handle printer.subprinters is None.
This commit is contained in:
parent
f29aae8738
commit
f61a2da754
2 changed files with 5 additions and 1 deletions
|
@ -240,7 +240,8 @@ def do_enable_pretty_printer_1 (pretty_printers, name_re, subname_re, flag):
|
|||
for printer in pretty_printers:
|
||||
if (hasattr(printer, "name") and name_re.match(printer.name) or
|
||||
hasattr(printer, "__name__") and name_re.match(printer.__name__)):
|
||||
if hasattr(printer, "subprinters"):
|
||||
if (hasattr(printer, "subprinters") and
|
||||
printer.subprinters is not None):
|
||||
if not subname_re:
|
||||
# Only record printers that change state.
|
||||
if printer_enabled_p(printer) != flag:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue