From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14659 invoked by alias); 13 Dec 2011 19:40:12 -0000 Received: (qmail 14648 invoked by uid 22791); 13 Dec 2011 19:40:11 -0000 X-SWARE-Spam-Status: No, hits=-8.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 13 Dec 2011 19:39:55 +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 pBDJdscQ007840 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 Dec 2011 14:39:54 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pBDJdstU007907; Tue, 13 Dec 2011 14:39:54 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id pBDJdraO032148; Tue, 13 Dec 2011 14:39:53 -0500 From: Tom Tromey To: Keith Seitz Cc: "gdb-patches\@sourceware.org ml" Subject: Re: [RFA] mi/10586 References: <4EBD93D9.2020006@redhat.com> <4EC157F6.1030503@redhat.com> <4EC16BD8.90309@redhat.com> <4EC29CF7.40204@redhat.com> <4ED95103.8030204@redhat.com> Date: Tue, 13 Dec 2011 19:58:00 -0000 In-Reply-To: <4ED95103.8030204@redhat.com> (Keith Seitz's message of "Fri, 02 Dec 2011 14:28:19 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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 X-SW-Source: 2011-12/txt/msg00420.txt.bz2 >>>>> "Keith" == Keith Seitz writes: Keith> +/* The names of varobjs representing anonymous structs or unions. Keith> + Note that is_name_anonymous_type makes assumptions about these two Keith> + constants. */ I didn't see 'is_name_anonymous_type' anywhere in the tree or in the patch. I guess it needs an update. Keith> +static int Keith> +is_path_expr_parent (struct varobj *var) [...] Keith> + type = get_value_type (var); Extra space. Keith> + return strncmp (child->name, ANONYMOUS_STRUCT_NAME, 11) == 0; I think this is wrong since the macros have _() in their expansion. I think you have to use strlen. Keith> + field_name = TYPE_FIELD_NAME (type, index); Keith> + if (*field_name == '\0') Can field_name == NULL? It is not clear to me. There is some code in gdb that checks this, but I don't know whether that is defensive programming or checking a condition that is truly possible. Otherwise this looks good to me. Tom