From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5040 invoked by alias); 24 Jan 2006 21:58:29 -0000 Received: (qmail 5027 invoked by uid 22791); 24 Jan 2006 21:58:28 -0000 X-Spam-Check-By: sourceware.org Received: from mail.emacinc.com (HELO mail.emacinc.com) (208.248.202.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 24 Jan 2006 21:58:24 +0000 Received: from emac77.emacinc.com ([208.248.202.77] helo=eng011.emacinc.com) by mail.emacinc.com with esmtp (Exim 4.50) id 1F1WB3-0006Ei-KR; Tue, 24 Jan 2006 15:58:15 -0600 From: NZG To: gdb-patches@sourceware.org Date: Tue, 24 Jan 2006 21:58:00 -0000 User-Agent: KMail/1.8.2 Cc: Jim Blandy References: <200601231438.26040.ngustavson@emacinc.com> <200601241328.33774.ngustavson@emacinc.com> <8f2776cb0601241327t4b9e4820l532d1133484879bb@mail.gmail.com> In-Reply-To: <8f2776cb0601241327t4b9e4820l532d1133484879bb@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200601241557.10320.ngustavson@emacinc.com> X-SA-Exim-Connect-IP: 208.248.202.77 X-SA-Exim-Mail-From: ngustavson@emacinc.com Subject: Re: gdb code review, pointer madness Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Spam-Relay: 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/msg00383.txt.bz2 I think I'm getting ahead of myself and assuming too much. I've bitten off a lot with this project and have a lot to learn yet. First off, I think I'm getting confused between the innermost frame and the sentinal frame, which I was originally assuming were one and the same. Digging deeper, it appears that the "innermost frame" as referred to in the comments is actually referring to frame 0, while the sentinal is frame -1. Since my board is succesfully connecting and displaying the current frame, it would seem that the sentinal fetch is working correctly. The problem is that when I run a backtrace it fetches the innermost frame, and then starts fetching garbage infinitely (get_prev_frame never returns NULL). I'm trying to wade through the code to figure out why this is happening, but it's taking a while, function calls here are very, very deep. In general, should this information (get_prev_frame=NULL) be coming from the target? Or should the host know this based on the id number? If I'm asking the wrong list please point me the right direction, this seemed the closest to a developer list out of the choices. thx, NZG On Tuesday 24 January 2006 3:27 pm, Jim Blandy wrote: > On 1/24/06, NZG wrote: > > Looks like this particular flaw is an optimization trick, digging down > > farther the correct pointer does appear to get there. > > > > Something is wrong with the frame call on the sential frame (because it > > crashes the debugger) but this is not it. > > Well, if you are able to come up with some reproduction instructions > that don't require exotic hardware, let us know. > > The sentinel frame should be very simple to deal with: "unwinding" a > register from the sentinel frame simply returns its current value from > the chip. If you're not getting the current registers' values unwound > from the sentinel frame, then GDB simply isn't getting the register > values right; you'll need to look at the communication between GDB and > the board.