From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26498 invoked by alias); 9 Mar 2004 14:17:54 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26487 invoked from network); 9 Mar 2004 14:17:52 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 9 Mar 2004 14:17:52 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1B0i3M-0006g8-1d for ; Tue, 09 Mar 2004 09:17:52 -0500 Date: Tue, 09 Mar 2004 14:17:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] gdb.cp/classes.exp: Don't try to print local variable out of scope Message-ID: <20040309141751.GA25558@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <20040309125959.GD25204@cygbert.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040309125959.GD25204@cygbert.vinschen.de> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-03.o/txt/msg00191.txt Message-ID: <20040309141700.HBW5uOidN51jliUIrzDlH13xRBesmiPitMW3RQpZ9B0@z> On Tue, Mar 09, 2004 at 01:59:59PM +0100, Corinna Vinschen wrote: > * gdb.cp/misc.cc (enums1): Add a line to extend scope of > local variable obj_with_enum. > > Index: gdb.cp/misc.cc > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/misc.cc,v > retrieving revision 1.1 > diff -u -p -r1.1 misc.cc > --- gdb.cp/misc.cc 23 Aug 2003 03:55:59 -0000 1.1 > +++ gdb.cp/misc.cc 8 Mar 2004 19:59:17 -0000 > @@ -433,6 +433,7 @@ void enums1 () > obj_with_enum.x = 0; > enums2 (); > obj_with_enum.priv_enum = ClassWithEnum::green; > + obj_with_enum.priv_enum = ClassWithEnum::yellow; > } > > class ClassParam { > Personally, I recommend using a different (new) variable; otherwise, we'll be back here in a release when GCC decides to do a little bit more dead code elimination at -O0. Otherwise, I agree with your analysis and recommend this patch for approval. I've been thinking that it would be nice to have a way to view recently out-of-scope variables, but I couldn't work out either the mechanism or the interface, so... -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer