From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31635 invoked by alias); 9 Aug 2002 20:34:10 -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 31603 invoked from network); 9 Aug 2002 20:34:07 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Aug 2002 20:34:07 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g79KKnl29808 for ; Fri, 9 Aug 2002 16:20:49 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g79KY0u08025; Fri, 9 Aug 2002 16:34:00 -0400 Received: from romulus.sfbay.redhat.com (IDENT:Zz6uJV5IS+niRCf96XSG8TSyNKMccSOV@romulus.sfbay.redhat.com [172.16.27.251]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g79KXxe01029; Fri, 9 Aug 2002 13:33:59 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g79KXr810945; Fri, 9 Aug 2002 13:33:53 -0700 Date: Fri, 09 Aug 2002 13:34:00 -0000 From: Kevin Buettner Message-Id: <1020809203352.ZM10944@localhost.localdomain> In-Reply-To: Andrew Cagney "Re: [RFA] mips_init_extra_frame_info: Set saved_regs value for SP_REGNUM" (Aug 9, 12:21am) References: <1020809002416.ZM26240@localhost.localdomain> <3D534348.1020308@ges.redhat.com> To: Andrew Cagney Subject: Re: [RFA] mips_init_extra_frame_info: Set saved_regs value for SP_REGNUM Cc: gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-08/txt/msg00220.txt.bz2 On Aug 9, 12:21am, Andrew Cagney wrote: > > * mips-tdep.c (mips_init_extra_frame_info): Initialize SP_REGNUM's > > saved regs value. > > > > Index: mips-tdep.c > > =================================================================== > > RCS file: /cvs/src/src/gdb/mips-tdep.c,v > > retrieving revision 1.93 > > diff -u -p -r1.93 mips-tdep.c > > --- mips-tdep.c 8 Aug 2002 23:32:52 -0000 1.93 > > +++ mips-tdep.c 9 Aug 2002 00:13:05 -0000 > > @@ -2342,6 +2342,7 @@ mips_init_extra_frame_info (int fromleaf > > memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS); > > fci->saved_regs[PC_REGNUM] > > = fci->saved_regs[RA_REGNUM]; > > + fci->saved_regs[SP_REGNUM] = fci->frame; > > } > > } > > Yes, ok. Just add a comment reminding the reader that this is setting > the SP for the previous frame. Committed. For the record, here's what went in: Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.94 diff -u -p -r1.94 mips-tdep.c --- mips-tdep.c 9 Aug 2002 01:42:41 -0000 1.94 +++ mips-tdep.c 9 Aug 2002 20:28:30 -0000 @@ -2342,6 +2351,12 @@ mips_init_extra_frame_info (int fromleaf memcpy (fci->saved_regs, temp_saved_regs, SIZEOF_FRAME_SAVED_REGS); fci->saved_regs[PC_REGNUM] = fci->saved_regs[RA_REGNUM]; + /* Set value of previous frame's stack pointer. Remember that + saved_regs[SP_REGNUM] is special in that it contains the + value of the stack pointer register. The other saved_regs + values are addresses (in the inferior) at which a given + register's value may be found. */ + fci->saved_regs[SP_REGNUM] = fci->frame; } }