From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10171 invoked by alias); 23 Jul 2013 20:32:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10145 invoked by uid 89); 23 Jul 2013 20:32:13 -0000 X-Spam-SWARE-Status: No, score=-5.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 23 Jul 2013 20:32:13 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6NKW5M7017303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 23 Jul 2013 16:32:06 -0400 Received: from barimba (ovpn-113-128.phx2.redhat.com [10.3.113.128]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r6NKW3ts003651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 23 Jul 2013 16:32:04 -0400 From: Tom Tromey To: Keith Seitz Cc: "gdb-patches\@sourceware.org ml" Subject: Re: [RFA] Fix varobj/15166 References: <51DB3AA1.2060005@redhat.com> Date: Tue, 23 Jul 2013 20:32:00 -0000 In-Reply-To: <51DB3AA1.2060005@redhat.com> (Keith Seitz's message of "Mon, 08 Jul 2013 15:18:09 -0700") Message-ID: <87li4xxbjw.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg00546.txt.bz2 >>>>> "Keith" == Keith Seitz 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. There were a few things I didn't understand here. First, which part of the test case actually triggered the crash? It isn't obvious from the PR or the patch submission or the test. Keith> As a result, it strictly enforces that the immediate children of a Keith> root varobj whose type is a class/struct must be one of the "fake" Keith> children. When asking for an index greater than 2 (CPLUS_FAKE_CHILDren Keith> are indices 0, 1, 2), the code asserts because of an unknown fake Keith> child. It seems strange to me that the dynamic varobj case would ever end up in this code. Perhaps dynamic varobjs should just dispatch to their own "language_specific"-like object... or else it seems that all the languages in the 'languages' array will need updates. Keith> +static PyObject * Keith> +get_pretty_printed_element_index (struct varobj *var, int index) [...] Keith> + iter = PyObject_GetIter (children); It seems like calling this could implicitly cause a varobj update. But probably I just don't understand. Keith> + if (cvalue != NULL && value != NULL) Keith> + *cvalue = v; I didn't understand why the condition uses 'value' here but the assignment uses 'v'. Tom