diff options
| author | Jonathan Wakely <jwakely@redhat.com> | 2015-05-27 12:18:37 +0100 |
|---|---|---|
| committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-05-27 12:18:37 +0100 |
| commit | 2097b5b029851d531a1424a0092992d4c9f650e4 (patch) | |
| tree | 96e7e2ca94b197e4d0a70f538b776fe1cbb86b64 /libstdc++-v3/python | |
| parent | b1af7da61278d2c4ae7b7f56fad37723461031cb (diff) | |
| download | gcc-2097b5b029851d531a1424a0092992d4c9f650e4.zip gcc-2097b5b029851d531a1424a0092992d4c9f650e4.tar.gz gcc-2097b5b029851d531a1424a0092992d4c9f650e4.tar.bz2 | |
re PR libstdc++/66017 (Undefined behaviour in std::set<long long>)
PR libstdc++/66017
* include/bits/stl_tree.h (_Rb_tree_node): Use __aligned_membuf.
(_Rb_tree_iterator, _Rb_tree_const_iterator): Support construction
from _Base_ptr.
(_Rb_tree_const_iterator::_M_const_cast): Remove static_cast.
(_Rb_tree::begin, _Rb_tree::end): Remove static_cast.
* include/ext/aligned_buffer.h (__aligned_membuf): New type using
alignment of _Tp as a member subobject, not as a complete object.
* python/libstdcxx/v6/printers.py (StdRbtreeIteratorPrinter): Lookup
_Link_type manually as it might not be in the debug info.
From-SVN: r223745
Diffstat (limited to 'libstdc++-v3/python')
| -rw-r--r-- | libstdc++-v3/python/libstdcxx/v6/printers.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libstdc++-v3/python/libstdcxx/v6/printers.py b/libstdc++-v3/python/libstdcxx/v6/printers.py index c6f96d7..2b6e409 100644 --- a/libstdc++-v3/python/libstdcxx/v6/printers.py +++ b/libstdc++-v3/python/libstdcxx/v6/printers.py @@ -456,11 +456,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: |
