summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2015-04-30 17:44:43 +0100
committerJonathan Wakely <jwakely@redhat.com>2015-04-30 17:44:43 +0100
commit823bdb7348b9f2d8a18807d32e704e1d7e326eae (patch)
treec482c26eb77c7d361adc95f4ece5ae2385435866
parentf7dfb1d40789561e4612aff0b1efa30ca50bac0d (diff)
downloadgcc-823bdb7348b9f2d8a18807d32e704e1d7e326eae.tar.gz
Fix path printer.
-rw-r--r--libstdc++-v3/python/libstdcxx/v6/printers.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py
index 5f3fb827fd4..0c9d3616c48 100644
--- a/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -988,10 +988,11 @@ class StdExpPathPrinter:
def to_string (self):
path = self.val ['_M_pathname']
- list_head = self.val['_M_cmpts']['_M_impl']['_M_node']
- if list_head.address != list_head['_M_next']:
- cmpts = self.list_visualizer.to_string()
- path = "%s [Components %s]" % (path, cmpts)
+ if self.list_visualizer:
+ list_head = self.val['_M_cmpts']['_M_impl']['_M_node']
+ if list_head.address != list_head['_M_next']:
+ cmpts = self.list_visualizer.to_string()
+ path = "%s [Components %s]" % (path, cmpts)
return path
# A "regular expression" printer which conforms to the