From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18281 invoked by alias); 26 Oct 2010 13:05:33 -0000 Received: (qmail 18192 invoked by uid 22791); 26 Oct 2010 13:05:32 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate4.uk.ibm.com (HELO mtagate4.uk.ibm.com) (194.196.100.164) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 Oct 2010 13:05:19 +0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate4.uk.ibm.com (8.13.1/8.13.1) with ESMTP id o9QD5GYt029690 for ; Tue, 26 Oct 2010 13:05:16 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9QD5FFh3530992 for ; Tue, 26 Oct 2010 14:05:15 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9QD5Fjm014000 for ; Tue, 26 Oct 2010 07:05:15 -0600 Received: from leonard.localnet (dyn-9-152-224-33.boeblingen.de.ibm.com [9.152.224.33]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o9QD58sG013683 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 26 Oct 2010 07:05:15 -0600 From: Ken Werner To: Tom Tromey Subject: Re: [patch] initial OpenCL C language support Date: Tue, 26 Oct 2010 13:05:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-22-generic-pae; KDE/4.5.1; i686; ; ) Cc: gdb-patches@sourceware.org References: <201010221920.30046.ken@linux.vnet.ibm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201010261505.07587.ken@linux.vnet.ibm.com> X-IsSubscribed: yes 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-10/txt/msg00362.txt.bz2 On Tuesday, October 26, 2010 12:45:58 am Tom Tromey wrote: > >>>>> "Ken" == Ken Werner writes: > Ken> This patch implements initial GDB support for the OpenCL C > Ken> Programming Language. Since OpenCL is based on C99 I tried to reuse > Ken> GDBs C infrastructure where possible (expression parser, printing > Ken> routines, etc). > > I have been skimming this patch a bit and I think it is very good. > > I don't have time to fully review it right now, as I'm at the GCC > Summit. Thanks for having a look at the patch. Have fun on the summit! : ) > > But I did notice one thing: > > Ken> +/* Expression evaluator for the OpenCL. Most operations are > delegated to Ken> + evaluate_subexp_standard; see that function for a > description of the Ken> + arguments. */ > Ken> +static struct value * > Ken> +evaluate_subexp_opencl (struct type *expect_type, struct expression > *exp, Ken> + int *pos, enum noside noside) > [...] > Ken> + return evaluate_subexp_standard (expect_type, exp, pos, noside); > > I think this ought to call the C-specific evaluate_subexp_c. > You'll need to at least make this non-static, maybe even rename it. > > I believe that without this some forms of string constants will not work > properly. My understanding is that the only additional functionality of evaluate_subexp_c is to provide wide character support which is not available in OpenCL C. Of course calling evaluate_subexp_c won't hurt since evaluate_subexp_standard gets called in most cases but I don't see where the OpenCL support could benefit from doing so. Do you have an example? Regards Ken