From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18387 invoked by alias); 29 Jul 2008 21:45:39 -0000 Received: (qmail 18377 invoked by uid 22791); 29 Jul 2008 21:45:38 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jul 2008 21:45:21 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m6TLjH1A026579; Tue, 29 Jul 2008 17:45:17 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6TLjHC2002267; Tue, 29 Jul 2008 17:45:17 -0400 Received: from opsy.redhat.com (vpn-10-116.bos.redhat.com [10.16.10.116]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m6TLjGOh012617; Tue, 29 Jul 2008 17:45:16 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id CFC955086F2; Tue, 29 Jul 2008 15:45:15 -0600 (MDT) To: "Rob Quill" Cc: "Eli Zaretskii" , "Jim Blandy" , gdb-patches@sourceware.org Subject: Re: New scope checking patch References: <8f2776cb0801301557t2e265b62u56d6df7cbcec1c84@mail.gmail.com> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Tue, 29 Jul 2008 21:45:00 -0000 In-Reply-To: (Rob Quill's message of "Tue\, 29 Jul 2008 22\:04\:18 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (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: 2008-07/txt/msg00552.txt.bz2 >>>>> "Rob" == Rob Quill writes: Tom> This seems like a good candidate for an internal function. The syntax Tom> is nearly identical. Rob> Are you saying that there is something that I need to do before this Rob> can be committed? Sorry -- to be completely clear, I am not a gdb maintainer. So, you are free to ignore what I say. Rob> Where can I find out about internal functions? There's been some discussion on the various lists. Otherwise, the python-gdb git repository. Or, I suppose one of us can send out a patch. Tom> The only difference is that, at the GCC Summit, we agreed that Tom> arguments to internal functions would be expressions. So, instead of Tom> $in_scope(x) you would have to write $in_scope("x"). Rob> If this patch it implemented as an internal function, what is to Rob> stop someone passing an expression to $in_scope(), in which case, Rob> does the patch need to be able to determine if a whole expression Rob> is in scope? In the internal-function form, in_scope would take a string-valued argument. So, the expression would be evaluated first -- just like any other function argument -- and then passed to the in_scope primitive. I guess this would prevent easy checking of whether an entire expression is in scope. (BTW does that mean just checking all the names in the expression?) Tom