From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7906 invoked by alias); 23 Oct 2006 21:08:26 -0000 Received: (qmail 7765 invoked by uid 22791); 23 Oct 2006 21:08:25 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.227) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 23 Oct 2006 21:08:22 +0000 Received: by wx-out-0506.google.com with SMTP id s19so2357514wxc for ; Mon, 23 Oct 2006 14:08:20 -0700 (PDT) Received: by 10.70.32.13 with SMTP id f13mr1477727wxf; Mon, 23 Oct 2006 14:08:20 -0700 (PDT) Received: by 10.70.12.9 with HTTP; Mon, 23 Oct 2006 14:08:19 -0700 (PDT) Message-ID: Date: Mon, 23 Oct 2006 21:08:00 -0000 From: "Rob Quill" To: gdb@sourceware.org Subject: Re: Command File Scope Checking In-Reply-To: <20061023202001.GA5472@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061023202001.GA5472@nevyn.them.org> 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/msg00218.txt.bz2 On 23/10/06, Daniel Jacobowitz wrote: > 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. In that case, I'm in need of some advice. I was thinking it would work something like this: Write program that given an LTL formula, writes a GDB command file representing the automaton and stepping through the code, checking values of variables and using these to make transitions. Pipe the output to a file and then analyse the file is some way to decide if the condition had been met. But if I am stepping through the code, and a variable goes out of scope, how do you suggest I go about dealing with this? Rob > > -- > Daniel Jacobowitz > CodeSourcery >