From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: "François Dumont" <frs.dumont@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Fix some _GLIBCXX_DEBUG pretty printer errors
Date: Wed, 07 Mar 2018 23:02:00 -0000 [thread overview]
Message-ID: <CAH6eHdQighv9LWafHTWwGMgNQTOm2X15i3ZWQtV1Uxvr+JxCxA@mail.gmail.com> (raw)
In-Reply-To: <a0661cbf-8e5f-e8bf-f5f5-023629975652@gmail.com>
On 7 March 2018 at 17:39, François Dumont wrote:
> On 06/03/2018 22:21, Jonathan Wakely wrote:
>>
>>
>>> @@ -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?
>>
> Yes, for instance this test in smiple11.cc:
>
>
> std::deque<int>::iterator deqiter0;
> // { dg-final { note-test deqiter0 {non-dereferenceable iterator for
> std::deque} } }
>
> Was failing when running 'make check-debug
> RUNTESTFLAGS=prettyprinters.exp' because it was displaying 'invalid
> iterator' rather than non-dereferenceable. Now it is succeeded.
OK, thanks for confirming.
This is OK for trunk, thanks. If anybody complains about the missing
printers for the __norm types we can add them back again.
next prev parent reply other threads:[~2018-03-07 23:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-05 6:49 François Dumont
2018-03-06 21:21 ` Jonathan Wakely
2018-03-07 17:39 ` François Dumont
2018-03-07 23:02 ` Jonathan Wakely [this message]
2018-03-08 18:12 ` Jonathan Wakely
2018-03-08 21:32 ` François Dumont
2018-03-08 23:09 ` Jonathan Wakely
2018-03-09 5:57 ` François Dumont
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAH6eHdQighv9LWafHTWwGMgNQTOm2X15i3ZWQtV1Uxvr+JxCxA@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=frs.dumont@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).