From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20014 invoked by alias); 19 May 2007 02:20:15 -0000 Received: (qmail 19970 invoked by uid 22791); 19 May 2007 02:20:11 -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; Sat, 19 May 2007 02:20:04 +0000 Received: from kahikatea.snap.net.nz (149.62.255.123.dynamic.snap.net.nz [123.255.62.149]) by viper.snap.net.nz (Postfix) with ESMTP id 220AD3D92D9; Sat, 19 May 2007 14:20:00 +1200 (NZST) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 2B1288F92B; Sat, 19 May 2007 14:19:56 +1200 (NZST) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17998.24266.849023.454806@kahikatea.snap.net.nz> Date: Sat, 19 May 2007 02:20:00 -0000 To: Maxim Grigoriev Cc: gdb@sourceware.org, Pete MacLiesh , Vinay Pandit , Shaiju P , Marc Gauthier Subject: Re: Which MI behavior is correct ? In-Reply-To: <464E4C4D.9010709@hq.tensilica.com> References: <464E4C4D.9010709@hq.tensilica.com> X-Mailer: VM 7.19 under Emacs 22.1.50.251 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/msg00083.txt.bz2 > PROBLEM DESCRIPTION: > ==================== > > When we hit the breakpoint inside f11() second time: > > In case of 6.3 we have : > > 228^done,changelist=[{name="var3",in_scope="true",type_changed="false"}] > (gdb) > 229^done,changelist=[{name="var4",in_scope="true",type_changed="false"}] > (gdb) > 230^done,value="3" > (gdb) > 231^done,value="2" > (gdb) > > In in case of 6.5+ we have : > > 228^done,changelist=[{name="var3",in_scope="false"}] > (gdb) > 229^done,changelist=[{name="var4",in_scope="false"}] > (gdb) > 230^done,value="2" > (gdb) > 231^done,value="1" > (gdb) > > So "var3" and "var4" are out of scope. > > Our GUI front-end relies on the 6.3-like behavior, which is consistent with > what we had in our previous releases based on GNU gdb 5.2.1. > > QUESTIONS > ========= > > 1) Is 6.5(+)-style behavior incorrect ? That's a loaded question. Your comparing apples and pears. For a true comparison you should compare GNU gdb Red Hat Linux (6.5) (if possible) with GNU gdb 6.5 Xtensa Tools. The former behaviour is correct, and that's what I get with FSF GDB 6.6 I think there is something wrong with your implementation of GDB, or something nonstansard about f11(). > If it is correct: > > - Are we supposed to recreate variables each time we enter the > function ? > - Is this efficient ? Well the variables themselves are reallocated from the stack, so there's a chance that they're not the same variables. At the moment, however GDB assumes that they are the same and you don't have to recreate them. > 2) Where can I find a good documentation describing these aspects of GDB > MI ? The info manual has a section called GDB/MI. -- Nick http://www.inet.net.nz/~nickrob