On 5 February 2018 at 06:49, François Dumont wrote: > Hi > > Here is a patch to fix some pretty printer check errors when running > those tests with _GLIBCXX_DEBUG. > > I introduced a special rendered for the std::forward_list iterator which > is similar to the one used for the std::list and so used inheritance, I hope > it is not a problem for Python 2/3 compatibility. > > I prefer to just rely on normal iterator rendered when we detect that > iterator hasn't been initialized so that normal or debug modes give the same > result. > > Ok to commit ? > > François > >
>@@ -575,10 +586,12 @@ class StdDebugIteratorPrinter: > # and return the wrapped iterator value. > def to_string (self): > base_type = gdb.lookup_type('__gnu_debug::_Safe_iterator_base') >+ itype = self.val.type.template_argument(0) > safe_seq = self.val.cast(base_type)['_M_sequence'] >- if not safe_seq or self.val['_M_version'] != safe_seq['_M_version']: >+ if not safe_seq: >+ return str(self.val.cast(itype)) So what's the effect of this change when we get a value-initialized debug iterator? It prints the wrapped (value-initialized) non-debug iterator instead?