aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py')
-rw-r--r--gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py b/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py
index 1fa08fbd5..65b8a9358 100644
--- a/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py
+++ b/gcc-4.9/libstdc++-v3/python/libstdcxx/v6/printers.py
@@ -443,11 +443,12 @@ class StdRbtreeIteratorPrinter:
def __init__ (self, typename, val):
self.val = val
+ valtype = self.val.type.template_argument(0).strip_typedefs()
+ nodetype = gdb.lookup_type('std::_Rb_tree_node<' + str(valtype) + '>')
+ self.link_type = nodetype.strip_typedefs().pointer()
def to_string (self):
- typename = str(self.val.type.strip_typedefs()) + '::_Link_type'
- nodetype = gdb.lookup_type(typename).strip_typedefs()
- node = self.val.cast(nodetype).dereference()
+ node = self.val['_M_node'].cast(self.link_type).dereference()
return get_value_from_Rb_tree_node(node)
class StdDebugIteratorPrinter: