From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10447 invoked by alias); 7 Feb 2009 19:43:01 -0000 Received: (qmail 10435 invoked by uid 22791); 7 Feb 2009 19:43:01 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Feb 2009 19:42:55 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n17Jgp5k006242; Sat, 7 Feb 2009 14:42:51 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n17Jgoix017877; Sat, 7 Feb 2009 14:42:51 -0500 Received: from opsy.redhat.com (vpn-12-226.rdu.redhat.com [10.11.12.226]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n17Jgoqo005345; Sat, 7 Feb 2009 14:42:50 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id E5B645080FB; Sat, 7 Feb 2009 12:42:48 -0700 (MST) To: Abderrahim KITOUNI Cc: gdb-patches@sourceware.org Subject: Re: New language support : Vala References: <3d6b0edb0902070607x29177016m48a40bd198b88f7e@mail.gmail.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Sat, 07 Feb 2009 19:43:00 -0000 In-Reply-To: <3d6b0edb0902070607x29177016m48a40bd198b88f7e@mail.gmail.com> (Abderrahim KITOUNI's message of "Sat\, 7 Feb 2009 15\:07\:12 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.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: 2009-02/txt/msg00181.txt.bz2 >>>>> "Abderrahim" == Abderrahim KITOUNI writes: Abderrahim> Here is a patch I wrote last summer that adds support for Abderrahim> a new language to gdb. It's called Vala [1], it's a high Abderrahim> level programming language (like C# or Java) and compiles Abderrahim> to GObject C. Fun! Abderrahim> I didn't write a parser, I just used the java one. The Abderrahim> attached patch is made with gdb 6.8 I took a quick look through the patch and there are definitely things in there that won't apply today. So, I suggest updating to CVS gdb and resubmitting. Also, I noticed a fair amount of code not conforming to GNU standards -- missing spaces, spaces in the wrong places, comments that are not full sentences; IOW, the usual sorts of nits. This will all come up in any eventual review, so I'd recommend taking a stab at fixing these beforehand. Any new file needs a copyright header. All new functions ought to have an introductory comment explaining their purpose, arguments, and return value. For the stack.c change, I suggest a new language function that returns true if the symbol ought to be printed. Other languages can always return 1. I'm also not so sure about the valops.c change or the gdbtypes.c change. In general I think explicit checks of the current language ought to be avoided in generic code. I wonder whether some of this is better done in Python. For instance, perhaps specialized value-printing stuff could be done using a Python pretty-printer. (This code isn't in gdb CVS yet, but is coming soon... and you can use it today by checking out from Archer.) My thinking here is that this might benefit all glib users, not just Vala. But this is just an idea, I won't insist on it. Alternatively, I wonder whether some of the generic changes could be made unnecessary by having a real Vala parser. This patch needs a ChangeLog entry. I think the overall direction of the patch seems reasonable. Abderrahim> P.S. I don't have a copyright assignment yet. I'll send you email off-list to get you started. Tom