From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9923 invoked by alias); 15 Feb 2002 22:51:14 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 9787 invoked from network); 15 Feb 2002 22:51:10 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 15 Feb 2002 22:51:10 -0000 Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA29442; Fri, 15 Feb 2002 14:51:05 -0800 (PST) Received: (from kev@localhost) by cse.cygnus.com (8.11.6/8.11.6) id g1FMofs09435; Fri, 15 Feb 2002 15:50:41 -0700 Date: Fri, 15 Feb 2002 14:51:00 -0000 From: Kevin Buettner Message-Id: <1020215225041.ZM9434@localhost.localdomain> In-Reply-To: Andrew Cagney "think-o: frame.c:find_saved_register() frame1 = get_prev_frame (frame1) backwards?" (Feb 12, 2:46pm) References: <3C697103.5060908@cygnus.com> X-Mailer: Z-Mail (4.0.1 13Jan97 Caldera) To: Andrew Cagney , gdb@sources.redhat.com Subject: Re: think-o: frame.c:find_saved_register() frame1 = get_prev_frame (frame1) backwards? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-02/txt/msg00218.txt.bz2 On Feb 12, 2:46pm, Andrew Cagney wrote: > (it dates back to prior to Red Hats CVS repository). I think this is > going the wrong way, looking in frame.h the doco indicates: > > /* Pointers to the next (down, inner) and previous (up, outer) > frame_info's in the frame cache. */ > struct frame_info *next; /* down, inner */ > struct frame_info *prev; /* up, outer */ > > and blockframe.c:get_prev_frame() returns the next ``up, outer'': > > /* If we have the prev one, return it */ > if (next_frame->prev) > return next_frame->prev; > > Given: > > a() { b (); } > > then it is b() that is saving registers used by a(). And b() is ``down, > inner''. > > confused, > Andrew I don't know. I've also gotten confused when staring at this code. I don't find the terms "next", "down", or "inner" to be helpful at all when trying to figure it out either. I think we ought to be referring to "callers" and "callees". Kevin