From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12225 invoked by alias); 26 Jan 2006 19:59:15 -0000 Received: (qmail 12217 invoked by uid 22791); 26 Jan 2006 19:59:14 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 26 Jan 2006 19:59:12 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F2DGw-000413-MG; Thu, 26 Jan 2006 14:59:10 -0500 Date: Thu, 26 Jan 2006 19:59:00 -0000 From: Daniel Jacobowitz To: NZG Cc: gdb-patches@sourceware.org, Jim Blandy Subject: Re: frame theory, was pointer madness Message-ID: <20060126195910.GA15398@nevyn.them.org> Mail-Followup-To: NZG , gdb-patches@sourceware.org, Jim Blandy References: <200601231438.26040.ngustavson@emacinc.com> <200601261017.41108.ngustavson@emacinc.com> <20060126164315.GA7821@nevyn.them.org> <200601261354.12256.ngustavson@emacinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200601261354.12256.ngustavson@emacinc.com> User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00429.txt.bz2 On Thu, Jan 26, 2006 at 01:54:12PM -0600, NZG wrote: > Lets see if I have this right. > Assuming a linked list with 5 frames, they should look like this > > level description > -1 sentinal frame(virtual) > 0 youngest frame (the deepest function call and current frame) > 1 older > 2 even older > 3 oldest > > And the list should look like this > > prev->frame->next > > NULL->3->2->1->0->-1->-1->-1........ > > I think, and I have yet to successfully verify this, that the highest level > frame should have an id of zero, or at least should. It's important to use consistent terminology when talking about this. What do you mean by "highest"? The innermost frame is always #0; it is the first frame "unwound" from the sentinel frame. Then the next frame is unwound from frame 0. The outermost frame should have an invalid frame ID. > Normal gdb appears to work by caching the frame of the highest level to a NULL > prev value, which appears to be happening somewhere when the frame first > enters existance. In the case of a gdbremote connection this should be on > connection to the remote server. No, not until someone types "backtrace". -- Daniel Jacobowitz CodeSourcery