From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14284 invoked by alias); 12 Dec 2006 11:09:41 -0000 Received: (qmail 14274 invoked by uid 22791); 12 Dec 2006 11:09:39 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 12 Dec 2006 11:09:14 +0000 Received: from kahikatea.snap.net.nz (p202-124-120-24.snap.net.nz [202.124.120.24]) by viper.snap.net.nz (Postfix) with ESMTP id 4ADCA3DAACE for ; Wed, 13 Dec 2006 00:10:28 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id B1AACBE431; Wed, 13 Dec 2006 00:04:46 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17790.36044.454650.114329@kahikatea.snap.net.nz> Date: Tue, 12 Dec 2006 11:09:00 -0000 To: gdb-patches@sources.redhat.com Subject: MI: Another -var-update bug? X-Mailer: VM 7.19 under Emacs 22.0.91.17 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: 2006-12/txt/msg00164.txt.bz2 Variable objects appear to test scope on a frame basis (in c_value_of root). If we create a variable object for j in the inner block of the program below then doing -var-update on line 10 doesn't report it as being out of scope. But struct varobj_root has a member struct block *valid_block. Presumably the addresses in this structure can be used to test if the variable is still in scope or not -- Nick http://www.inet.net.nz/~nickrob 1 main () 2 { 3 int i; 4 i = 1; 5 { 6 int j; 7 j = 2; 8 printf ("j = %d\n", j); 9 } 10 i = 3; 11 }