From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11148 invoked by alias); 23 Feb 2007 18:16:17 -0000 Received: (qmail 11138 invoked by uid 22791); 23 Feb 2007 18:16:16 -0000 X-Spam-Check-By: sourceware.org Received: from reserv6.univ-lille1.fr (HELO reserv6.univ-lille1.fr) (193.49.225.20) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 23 Feb 2007 18:16:10 +0000 Received: from malonne.lifl.fr (malonne.lifl.fr [134.206.10.29]) by reserv6.univ-lille1.fr (8.13.7/jtpda-5.3.1) with ESMTP id l1NIFVkv020647 ; Fri, 23 Feb 2007 19:15:31 +0100 Received: from [134.206.11.20] (pcsmi2.lifl.fr [134.206.11.20]) by malonne.lifl.fr with ESMTP id l1NIFY712973 ; Fri, 23 Feb 2007 19:15:34 +0100 (MET) Message-ID: <45DF2F46.8040400@inria.fr> Date: Fri, 23 Feb 2007 19:56:00 -0000 From: Christophe Demarey User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: Rob Quill , drow@false.org CC: gdb@sourceware.org Subject: Re: test availability of variables in context from user command References: <45DF0F48.60507@inria.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (reserv6.univ-lille1.fr [193.49.225.20]); Fri, 23 Feb 2007 19:15:31 +0100 (CET) X-USTL-MailScanner-Information: Please contact the ISP for more information X-USTL-MailScanner: Found to be clean X-USTL-MailScanner-From: christophe.demarey@inria.fr 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/msg00251.txt.bz2 Rob Quill wrote: > I modifed GDB to make in possible to cehck whether variables are in > scope. I'm not sure if that's what you want, but you can do things > like: > > print $in_scope(var1); > > or in a command file: > > if($in_scope(var1) == 1) > > i.e. do something if var1 is in scope. It's exactly what I want to check. > At the moment it only covers > certain cases as I haven't had time to finish it off, but it wouldn't > be hard to do. I modified it against 6.6, but hopefully I can forge a > patch out of it, if you want it. Unfortunately, this solution doesn't fit our needs because our gdb user commands will crash on non-patched gdb versions. But I think it should be a good idea to have a such integrated functionality (a full scripting language too). Thanks a lot for your answers. Regards, Christophe.