From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25261 invoked by alias); 18 Apr 2011 20:58:32 -0000 Received: (qmail 25253 invoked by uid 22791); 18 Apr 2011 20:58:32 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Mon, 18 Apr 2011 20:58:15 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3IKwEcm018805 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 18 Apr 2011 16:58:14 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3IKwEcn029449; Mon, 18 Apr 2011 16:58:14 -0400 Received: from opsy.redhat.com (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 p3IKwDYk002306; Mon, 18 Apr 2011 16:58:14 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 8A01837930B; Mon, 18 Apr 2011 14:58:13 -0600 (MDT) From: Tom Tromey To: pmuldoon@redhat.com Cc: gdb-patches@sourceware.org Subject: Re: [patch] [python] mi/12531 References: Date: Mon, 18 Apr 2011 20:58:00 -0000 In-Reply-To: (Phil Muldoon's message of "Wed, 13 Apr 2011 15:25:58 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-04/txt/msg00290.txt.bz2 >>>>> "Phil" == Phil Muldoon writes: Phil> This patch fixes a case where an MI user could install a visualizer on a Phil> synthetic varobj. If we detect that the object is a CPLUS_FAKE_CHILD, Phil> we do not install a visualizer. I thought about raising an error, but Phil> other MI behavior with fake children is just to move on if possible. I Phil> did the same. Thanks for doing this. I have some comments, but they are all minor things. Phil> 2011-04-13 Phil Muldoon Phil> * varobj.c (install_default_visualizer): Do not install a Phil> visualizer if the varobj is CPLUS_FAKE_CHILD. Phil> (construct_visualizer): Likewise. I thought there was a PR open for this. If so, it should be mentioned in the ChangeLog. (If it is just in Red Hat bugzilla then it is optional; but if you choose to use it, put the whole URL in.) Phil> +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++ additional_flags=-DMI}] != "" } { This should be split somewhere. Phil> + untested "Couldn't compile ${srcfile} in c++ mode" Phil> + return -1 Wrong indentation, I think. Phil> + } Definitely wrong indentation :) Phil> +mi_continue_to_line [gdb_get_line_number {break to inspect struct and union} ${testfile}.c] \ Split this line somewhere. Phil> #ifdef __cplusplus Phil> +#include It is best not to rely on libstdc++ in the test suite. I think just an ordinary struct ought to exhibit the behavior you need, as long as the file is compiled by the C++ compiler. So, you probably don't need any additional classes. But, if you do, you have to write them yourself :) Phil> static void Phil> install_default_visualizer (struct varobj *var) Phil> { Phil> + Phil> + /* Do not install a visualizer on a CPLUS_FAKE_CHILD. */ Phil> + if (CPLUS_FAKE_CHILD (var)) Phil> + return; Spurious blank line after the "{". Tom