From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4160 invoked by alias); 6 Aug 2010 22:20:14 -0000 Received: (qmail 4148 invoked by uid 22791); 6 Aug 2010 22:20:13 -0000 X-SWARE-Spam-Status: No, hits=-6.1 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; Fri, 06 Aug 2010 22:20:09 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o76MK5C8017976 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 6 Aug 2010 18:20:06 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o76MK5t7001504; Fri, 6 Aug 2010 18:20:05 -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 o76MK4cJ011012; Fri, 6 Aug 2010 18:20:04 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 4874C3782ED; Fri, 6 Aug 2010 16:20:04 -0600 (MDT) From: Tom Tromey To: sami wagiaalla Cc: Ulrich Weigand , gdb-patches@sourceware.org Subject: Re: [patch] smart pointer support References: <201008061648.o76Gmk3o008780@d12av02.megacenter.de.ibm.com> <4C5C7FAB.2090005@redhat.com> Date: Fri, 06 Aug 2010 22:20:00 -0000 In-Reply-To: <4C5C7FAB.2090005@redhat.com> (sami wagiaalla's message of "Fri, 06 Aug 2010 17:33:31 -0400") 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: 2010-08/txt/msg00090.txt.bz2 >>>>> "Sami" == sami wagiaalla writes: Sami> Great!.. Thanks for the pointers. I am not going to be working on that Sami> bug right away, but I will add a pointer to this discussion in case Sami> someone else picks it up by the time I get to it. Thanks. This is looking good. Sami> + if (exp->language_defn->la_language == language_cplus) Sami> + { Sami> + while (unop_user_defined_p(op, arg2)) Space before paren. Also, I don't think the language_cplus check should be needed. None of the other calls to unop_user_defined_p are gated that way. Sami> + struct value *value = value_x_unop (arg2, op, noside); Sami> + if (value) Sami> + arg2 = value; This seems strange. When can the result here be NULL? And what does that mean? It seems like this either ought to be impossible, or it should be an error of some kind. Sami> + if (exp->language_defn->la_language == language_cplus) Sami> + { Sami> + while ((unop_user_defined_p(op, arg1))) Sami> + { Sami> + struct value *value = value_x_unop (arg1, op, noside); Sami> + if (value) Sami> + arg1 = value; Same notes as above :) Sami> +++ b/gdb/testsuite/gdb.cp/smartp.cc We haven't been super diligent about this -- but please put a GPL header on this file. Sami> +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { Sami> + untested "Couldn't compile test program" Sami> + return -1 Sami> +} Sami> + Sami> +# Get things started. Sami> + Sami> +gdb_exit Sami> +gdb_start Sami> +gdb_reinitialize_dir $srcdir/$subdir Sami> +gdb_load ${binfile} I think prepare_for_testing can be used here. Tom