From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13447 invoked by alias); 1 Dec 2004 05:10:57 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13424 invoked from network); 1 Dec 2004 05:10:54 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 1 Dec 2004 05:10:54 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CZMlO-0001d2-54; Wed, 01 Dec 2004 00:10:50 -0500 Date: Wed, 01 Dec 2004 05:10:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA/alpha] Fetch register from the right frame Message-ID: <20041201051050.GC5872@nevyn.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sources.redhat.com References: <20041201024220.GD1204@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041201024220.GD1204@adacore.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-12/txt/msg00009.txt.bz2 On Tue, Nov 30, 2004 at 06:42:20PM -0800, Joel Brobecker wrote: > I tracked the problem to alpha_heuristic_frame_prev_register(): > Basically, after having verified that the register we'd like to fetch > has not been saved in by the next frame, we try to fetch the value > of the register inside the next frame. But instead, what we do, is > that we actually fetch the value of the register for the frame > *following* the next frame. Oups! The patch seems OK to me. This is consistent with what other targets do, also. I have to stare at this a little bit each time... prev_register takes a NEXT_FRAME argument. It is unwinding from THIS frame - which is not one of its arguments - using THIS_CACHE. That's because a frame is responsible for its own ID and the previous frame's registers. By the time prev_register is called we have THIS frame available, but passing it wouldn't do much good. > 2004-11-30 Joel Brobecker > > * alpha-tdep.c (alpha_heuristic_frame_prev_register): Fetch > the register value from the correct frame. > > Tested on alpha-tru64 5.1, fixes the problem above, no regression > in the testsuite. > > OK to apply? Yes. -- Daniel Jacobowitz