From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26384 invoked by alias); 25 May 2007 20:51:37 -0000 Received: (qmail 26373 invoked by uid 22791); 25 May 2007 20:51:35 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 25 May 2007 20:51:34 +0000 Received: (qmail 10095 invoked from network); 25 May 2007 20:51:32 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 25 May 2007 20:51:32 -0000 To: Maxim Grigoriev Cc: Nick Roberts , Daniel Jacobowitz , gdb@sourceware.org, Pete MacLiesh , Vinay Pandit , Shaiju P , Marc Gauthier Subject: Re: Which MI behavior is correct ? References: <464E4C4D.9010709@hq.tensilica.com> <17998.24266.849023.454806@kahikatea.snap.net.nz> <20070519030245.GA941@caradoc.them.org> <17998.28300.327133.525945@kahikatea.snap.net.nz> <464F51B5.5040802@hq.tensilica.com> From: Jim Blandy Date: Fri, 25 May 2007 20:51:00 -0000 In-Reply-To: <464F51B5.5040802@hq.tensilica.com> (Maxim Grigoriev's message of "Sat, 19 May 2007 12:36:21 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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-05/txt/msg00164.txt.bz2 Maxim Grigoriev writes: > This seems to be an answer to my question. The behavior has changed > probably since somewhere around 6.3. Now, variable objects are associated > with the frame, not with the function. As you can see in gdb 6.3 case > ( NATIVE.log ), variables "var1" and "var2" were successfully reused, > when new frame was allocated after hitting the breakpoint second time. > In 6.5+ (XTENSA.log), we have to recreate variable objects every time > we have a new frame because the old variables are out of scope. Just to connect this old thread with newer conversation: To avoid recreating variable objects, you probably want to pass '@' as your frame to -var-create. This makes the varobj re-parse and re-evaluate the expression using the currently selected frame at each update. Old-style varobjs that use '*' or an address as their frame should never come back into scope once their frame is popped. If they do, it's a fluke. The '@' syntax is undocumented; I posted a manual patch based on some experimentation and reading the code: http://sourceware.org/ml/gdb-patches/2007-05/msg00397.html