From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14881 invoked by alias); 23 Oct 2006 20:20:08 -0000 Received: (qmail 14871 invoked by uid 22791); 23 Oct 2006 20:20:07 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Mon, 23 Oct 2006 20:20:03 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Gc6HB-0001Qu-SY; Mon, 23 Oct 2006 16:20:02 -0400 Date: Mon, 23 Oct 2006 20:20:00 -0000 From: Daniel Jacobowitz To: Rob Quill Cc: gdb@sourceware.org Subject: Re: Command File Scope Checking Message-ID: <20061023202001.GA5472@nevyn.them.org> Mail-Followup-To: Rob Quill , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00217.txt.bz2 On Mon, Oct 23, 2006 at 09:15:31PM +0100, Rob Quill wrote: > On 23/10/06, Eli Zaretskii wrote: > >> Date: Mon, 23 Oct 2006 11:45:23 +0100 > >> From: "Rob Quill" > >> > >> Is it possible to check if a variable is in scope when using a command > >> file, because I don't want control to return to GDB when a variable > >> goes out of scope, so I would like to know if a variable is in scope > >> before I check the value of it. > > > > (gdb) info address foobar > > No symbol "foobar" in current context. > > So is it possible to check the result of doing info address foobar, > whilst still in the command file? So that if it is out of scope the > script can do action B instead of action A? No, this sort of thing is not possible in the current GDB scripting interface. Yet, anyway. -- Daniel Jacobowitz CodeSourcery