From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13971 invoked by alias); 8 Jun 2003 17:45:09 -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 13940 invoked from network); 8 Jun 2003 17:45:09 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 8 Jun 2003 17:45:09 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E9CA62B63; Sun, 8 Jun 2003 13:45:06 -0400 (EDT) Message-ID: <3EE37622.9080508@redhat.com> Date: Sun, 08 Jun 2003 17:45:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [commit] Split d10v-tdep.c into trad-frame.[hc] References: <3EE36123.3020508@redhat.com> <20030608165800.GA15675@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00277.txt.bz2 >> +struct trad_frame trad_frame_saved_regs? >> +{ >> + /* If non-zero (and regnum >= 0), the stack address at which the >> + register is saved. By default, it is assumed that the register >> + was not saved (addr == 0). Remember, a LONGEST can always fit a >> + CORE_ADDR. */ >> + LONGEST addr; >> + /* else, if regnum >=0 (and addr == 0), the REGNUM that contains >> + this registers value. By default, it is assumed that the >> + registers are not moved (the register's value is still in that >> + register and regnum == the index). */ >> + int regnum; >> + /* else, if regnum < 0, ADDR is the registers value. */ >> +}; > > > Gyuh? I looked at this for a couple of minutes and couldn't make heads > or tails of it until I went to look at trad-frame.c: this structure > isn't a frame at all, it's a single saved register. Could you rename > it, and update the comments? > > I'm also not sure I understand all the combinations: > regnum < 0, addr is the register value > regnum >= 0 and addr 0, regnum holds the new register number (in the > next frame?) The previous frame's register is found in REGNUM in this frame. Need to unwind the next frame's REGNUM to get the value of register REGNUM in this frame. > regnum >= 0 and addr non-zero, addr is the save address - but what's > regnum mean? Nothing? Nothing. Andrew