From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13348 invoked by alias); 29 Jul 2008 21:04:40 -0000 Received: (qmail 13335 invoked by uid 22791); 29 Jul 2008 21:04:39 -0000 X-Spam-Check-By: sourceware.org Received: from fg-out-1718.google.com (HELO fg-out-1718.google.com) (72.14.220.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jul 2008 21:04:22 +0000 Received: by fg-out-1718.google.com with SMTP id e12so2487262fga.0 for ; Tue, 29 Jul 2008 14:04:19 -0700 (PDT) Received: by 10.86.65.11 with SMTP id n11mr4073263fga.64.1217365459112; Tue, 29 Jul 2008 14:04:19 -0700 (PDT) Received: by 10.86.98.13 with HTTP; Tue, 29 Jul 2008 14:04:18 -0700 (PDT) Message-ID: Date: Tue, 29 Jul 2008 21:04:00 -0000 From: "Rob Quill" To: tromey@redhat.com Subject: Re: New scope checking patch Cc: "Eli Zaretskii" , "Jim Blandy" , gdb-patches@sourceware.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8f2776cb0801301557t2e265b62u56d6df7cbcec1c84@mail.gmail.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: 2008-07/txt/msg00550.txt.bz2 2008/7/29 Tom Tromey : >>>>>> "Rob" == Rob Quill writes: > > Rob> 2008-07-27 Rob Quill > Rob> Add $in_scope as a type of expression. > > This seems like a good candidate for an internal function. The syntax > is nearly identical. Hi Tom, Are you saying that there is something that I need to do before this can be committed? If so, could you explain a bit further? Where can I find out about internal functions? > The only difference is that, at the GCC Summit, we agreed that > arguments to internal functions would be expressions. So, instead of > $in_scope(x) you would have to write $in_scope("x"). With regards to expressions, the patch in it's current form can only determine the scope of variables. I do have a very rough patch with some fairly major caveats which can deal with expressions. If this patch it implemented as an internal function, what is to stop someone passing an expression to $in_scope(), in which case, does the patch need to be able to determine if a whole expression is in scope? Because I ran into some problems when doing that before. I believe they may even be discussed earlier in this thread. Rob > Internal functions are only in the python repository right now. The > patch consists of two parts: an internals-only part, and the part that > exposes the functionality to the Python layer. > > I think we can submit the internals part as a separate patch. AFAIK > the only reason we haven't is just that there's been no need for it > outside the Python work. > > Tom >