From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23952 invoked by alias); 9 Mar 2004 22:32:44 -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 23836 invoked from network); 9 Mar 2004 22:32:13 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 9 Mar 2004 22:32:13 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 670332B92; Tue, 9 Mar 2004 17:32:12 -0500 (EST) Message-ID: <404E45EC.4030205@gnu.org> Date: Tue, 09 Mar 2004 22:32:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com, vinschen@redhat.com Subject: Re: [RFC/RFA] gdb.cp/classes.exp: Don't try to print local variable out of scope References: <20040309161507.9FBF54B104@berman.michael-chastain.com> <404E2B2C.8030201@gnu.org> <20040309212736.GA8404@nevyn.them.org> In-Reply-To: <20040309212736.GA8404@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03.o/txt/msg00215.txt >>Yes, the inner "i" should be in scope. That line, which hasn't yet been >>> executed, will destory the inner block. I think that is covered by the >>> GCC-O0 rule? > > > If that's right, it sounds like we should be using the address-in-block > hack to figure out what local variables are in scope for the top > frame. But that runs the risk of, for instance, moving us back into a > preceeding function. Er, that sounds like a theoretical address-in-block bug? The value returned should be floored by (as in can't be less than) the function start. Can you think of an edge case that makes this real? Andrew From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23952 invoked by alias); 9 Mar 2004 22:32:44 -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 23836 invoked from network); 9 Mar 2004 22:32:13 -0000 Received: from unknown (HELO localhost.redhat.com) (216.129.200.20) by sources.redhat.com with SMTP; 9 Mar 2004 22:32:13 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 670332B92; Tue, 9 Mar 2004 17:32:12 -0500 (EST) Message-ID: <404E45EC.4030205@gnu.org> Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Daniel Jacobowitz Cc: Michael Elizabeth Chastain , gdb-patches@sources.redhat.com, vinschen@redhat.com Subject: Re: [RFC/RFA] gdb.cp/classes.exp: Don't try to print local variable out of scope References: <20040309161507.9FBF54B104@berman.michael-chastain.com> <404E2B2C.8030201@gnu.org> <20040309212736.GA8404@nevyn.them.org> In-Reply-To: <20040309212736.GA8404@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00215.txt.bz2 Message-ID: <20040319000900.b-GznIDWA8G9OOptyJd3f7KQ8wPSYbYRnM5taUBgeY0@z> >>Yes, the inner "i" should be in scope. That line, which hasn't yet been >>> executed, will destory the inner block. I think that is covered by the >>> GCC-O0 rule? > > > If that's right, it sounds like we should be using the address-in-block > hack to figure out what local variables are in scope for the top > frame. But that runs the risk of, for instance, moving us back into a > preceeding function. Er, that sounds like a theoretical address-in-block bug? The value returned should be floored by (as in can't be less than) the function start. Can you think of an edge case that makes this real? Andrew