aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-11-10 23:44:14 +0000
committerDoug Evans <dje@google.com>2010-11-10 23:44:14 +0000
commitf61a2da754809850edb88aa1c5658d8015f8fc37 (patch)
tree678ecec28a6b580c0c809dee21da1d294914dbd5 /gdb/python
parentf29aae8738f590714becf13e3ad100ec4478ebc3 (diff)
downloadgdb-f61a2da754809850edb88aa1c5658d8015f8fc37.zip
gdb-f61a2da754809850edb88aa1c5658d8015f8fc37.tar.gz
gdb-f61a2da754809850edb88aa1c5658d8015f8fc37.tar.bz2
* python/lib/gdb/command/pretty_printers.py
(do_enable_pretty_printer_1): Handle printer.subprinters is None.
Diffstat (limited to 'gdb/python')
-rw-r--r--gdb/python/lib/gdb/command/pretty_printers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/lib/gdb/command/pretty_printers.py b/gdb/python/lib/gdb/command/pretty_printers.py
index 4e341a5..58a639a 100644
--- a/gdb/python/lib/gdb/command/pretty_printers.py
+++ b/gdb/python/lib/gdb/command/pretty_printers.py
@@ -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: