From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19360 invoked by alias); 23 Feb 2007 19:50:52 -0000 Received: (qmail 19348 invoked by uid 22791); 23 Feb 2007 19:50:52 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 Feb 2007 19:50:47 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id EE79912754F; Fri, 23 Feb 2007 11:48:44 -0800 (PST) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07630-03-2; Fri, 23 Feb 2007 11:48:44 -0800 (PST) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id 5EBA5127C8B; Fri, 23 Feb 2007 11:48:41 -0800 (PST) Received: from 192.168.92.81 ([192.168.92.81]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Fri, 23 Feb 2007 19:48:41 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 23 Feb 2007 11:48:40 -0800 Subject: Re: test availability of variables in context from user command From: Michael Snyder To: Christophe Demarey Cc: gdb@sourceware.org In-Reply-To: <45DF0F48.60507@inria.fr> References: <45DF0F48.60507@inria.fr> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Sat, 24 Feb 2007 08:24:00 -0000 Message-Id: <1172260120.9824.52.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-02/txt/msg00252.txt.bz2 On Fri, 2007-02-23 at 16:59 +0100, Christophe Demarey wrote: > Hello, > > I want to check the availability of a variable (var1 for instance) in > the context from an user command but I don't find any way to do this. Just interjecting a thought -- it would be nice if gdb had a "which" command. It could not only tell you whether an identifier was in scope, but tell you WHICH scope it was in. Could be useful, for instance, to tell you that a local was over-shadowing a global.