From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches\@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] Fix varobj/15166
Date: Wed, 07 Aug 2013 20:23:00 -0000 [thread overview]
Message-ID: <87k3jx5jyj.fsf@fleche.redhat.com> (raw)
In-Reply-To: <51DB3AA1.2060005@redhat.com> (Keith Seitz's message of "Mon, 08 Jul 2013 15:18:09 -0700")
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> $SUBJECT concerns an assertion failure that is triggered when using
Keith> pretty-printing with varobj. The cause of the problem is actually
Keith> pretty simple: cplus_describe_child knows nothing about pretty
Keith> printing.
I think your reply to me answered all my big questions about the patch.
Looking at it I have one other minor issue (in addition to the typo thing).
Keith> + item = NULL;
Keith> + while (index-- >= 0)
Keith> + {
Keith> + Py_XDECREF (item);
Keith> + item = PyIter_Next (iter);
Keith> +
Keith> + /* We should not be able to ask for an index for which we do not
Keith> + have a child varobj already! */
Keith> + gdb_assert (item != NULL);
I don't think this is ok to do. Iterators run Python code, which can do
anything.
This is why I was curious about value preservation and updating. It
seems like re-running the Python may yield different results from what
is "expected" (in the sense that the varobj's current state can be seen
as a snapshot of a particular inferior state -- even though we don't
actually store the bits making up this snapshot).
Anyway I think the checking here has to be more lenient, not an assert.
Tom
prev parent reply other threads:[~2013-08-07 20:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 22:18 Keith Seitz
2013-07-23 20:32 ` Tom Tromey
2013-07-23 22:50 ` Keith Seitz
2013-08-07 20:23 ` Tom Tromey [this message]
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=87k3jx5jyj.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/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