From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4724 invoked by alias); 22 May 2007 02:29:42 -0000 Received: (qmail 4516 invoked by uid 22791); 22 May 2007 02:29:41 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 22 May 2007 02:29:39 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 5D21D4B267; Mon, 21 May 2007 21:29:35 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id AF24E4B262; Mon, 21 May 2007 21:29:33 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HqK7x-00053x-5T; Mon, 21 May 2007 22:29:33 -0400 Date: Tue, 22 May 2007 02:29:00 -0000 From: Daniel Jacobowitz To: Maxim Grigoriev Cc: gdb@sourceware.org, Marc Gauthier , Pete MacLiesh , Ross Morley Subject: Re: Understanding GDB frames Message-ID: <20070522022933.GA19198@caradoc.them.org> Mail-Followup-To: Maxim Grigoriev , gdb@sourceware.org, Marc Gauthier , Pete MacLiesh , Ross Morley References: <46521C04.7040405@hq.tensilica.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46521C04.7040405@hq.tensilica.com> User-Agent: Mutt/1.5.15 (2007-04-09) 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/msg00101.txt.bz2 On Mon, May 21, 2007 at 03:24:04PM -0700, Maxim Grigoriev wrote: > Let's define that "frames A and B are the same" if > > frame_id_eq ( A->this_id, B->this_id ) == true > > The breakpoit has been set at line 18 and hit 5 times. > Execution control has been subsequently taken by > gdb in five frames numbered 1, 2, 3, 4, and 5. > > According to the definition of GDB frames, > which statement is correct ? > > ANSWERS > ======= > > 1) All frames 1, 2, 3, 4, and 5 are the same; > 2) All frames 1, 2, 3, 4, and 5 are different from each other; > 3) Frames 1,2, and 4 are the same. Frames 3 and 5 are > different from 1, 2, 4 and from each other; > 4) It's implementation-dependent. While doing architecture ports, > people decide how to implement frame_id-related functions > to compare frames; > 5) Other ( explanation would be appreciated ). The correct answer, in my opinion, is that all of these frames are different. It is likely that when you compare their frame IDs, all of those representing a call of f11 from main will have the same frame ID - you can't always compare two arbitrary frame IDs if you don't know where they came from, and it's impossible to get this 100% correct without slowing down the execution of the program, so some of them may be indistinguishable. The frame ID is supposed to indicate which one of a set of currently running frames you're looking at. Maybe if we have varobjs for a specified frame ID, we should insert a scope breakpoint at the exit of that frame to mark those varobjs as invalid. -- Daniel Jacobowitz CodeSourcery