From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20986 invoked by alias); 31 Jan 2008 07:03:14 -0000 Received: (qmail 20969 invoked by uid 22791); 31 Jan 2008 07:03:12 -0000 X-Spam-Check-By: sourceware.org Received: from bluesmobile.specifix.com (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 Jan 2008 07:02:52 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id 10AF63C2AA; Wed, 30 Jan 2008 23:02:50 -0800 (PST) Subject: Re: New scope checking patch From: Michael Snyder To: Jim Blandy Cc: Eli Zaretskii , Rob Quill , gdb-patches@sourceware.org In-Reply-To: <8f2776cb0801301557t2e265b62u56d6df7cbcec1c84@mail.gmail.com> References: <8f2776cb0801301557t2e265b62u56d6df7cbcec1c84@mail.gmail.com> Content-Type: text/plain Date: Thu, 31 Jan 2008 07:52:00 -0000 Message-Id: <1201762969.3263.253.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit 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-01/txt/msg00842.txt.bz2 On Wed, 2008-01-30 at 15:57 -0800, Jim Blandy wrote: > On Jan 30, 2008 10:20 AM, Eli Zaretskii wrote: > > I actually think that this feature should be described in the node > > "Convenience Vars", not in "Variables". The latter describes how to > > refer to variables in the program being debugged; while $in_scope is > > related (and should perhaps be cross-referenced from "Variables"), > > that is not the right place for describing GDB built-ins. > > That's kind of an interesting point. This is an entirely new kind of > entity: it's not a convenience variable, it's a convenience function, > or perhaps a new operator. I'm not sure where it should go. I'd > expect the primary description to be in "Expressions", in the part > that says, "GDB supports these operators, in addition to those common > to programming languages". Maybe we could have a discussion about what sorts of operators gdb might provide in this context. The canonical example for me of a missing functionality is "offsetof" (in the sense of "sizeof"). I suppose in that spirit, I might like to have "typeof", and "scopeof". Maybe for C++ or objective-C, "classof"...