From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29589 invoked by alias); 1 Jul 2003 12:28:30 -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 29378 invoked from network); 1 Jul 2003 12:28:29 -0000 Received: from unknown (HELO localhost.redhat.com) (24.157.166.107) by sources.redhat.com with SMTP; 1 Jul 2003 12:28:29 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 70BC62B74; Tue, 1 Jul 2003 08:28:27 -0400 (EDT) Message-ID: <3F017E6B.90003@redhat.com> Date: Tue, 01 Jul 2003 12:28: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: Andrew Cagney , Jim Blandy Cc: gdb@sources.redhat.com Subject: Re: IBM S/390 prologue analysis revisited References: <3F00DC8C.5040908@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00010.txt.bz2 > You mean: [just for the record]: new prologue analyzer for S/390 > http://sources.redhat.com/ml/gdb-patches/2003-04/msg00352.html One PS, Since this was posted (but you'd declined to commit) I added trad-frame.[hc]. This provides functionality that overlaps what is found in the s390 patch (it's slightly more compact). > /* A traditional saved regs table, indexed by REGNUM, encoding where > the value of REGNUM for the previous frame can be found in this > frame. > > The table is initialized with an identity encoding (ADDR == -1, > REALREG == REGNUM) indicating that the value of REGNUM in the > previous frame can be found in register REGNUM (== REALREG) in this > frame. > > The initial encoding can then be changed: > > Modify ADDR (REALREG >= 0, ADDR != -1) to indicate that the value > of register REGNUM in the previous frame can be found in memory at > ADDR in this frame (addr_p, !realreg_p, !value_p). > > Modify REALREG (REALREG >= 0, ADDR == -1) to indicate that the > value of register REGNUM in the previous frame is found in register > REALREG in this frame (!addr_p, realreg_p, !value_p). > > Call trad_frame_register_value (REALREG == -1) to indicate that the > value of register REGNUM in the previous frame is found in ADDR > (!addr_p, !realreg_p, value_p). */ Editor note: It's missing the undefined state. I'll add it. > struct trad_frame_saved_reg > { > LONGEST addr; /* A CORE_ADDR fits in a longest. */ > int realreg; > }; > Vs: > ! struct prologue_value { > ! > ! /* What sort of value is this? This determines the interpretation > ! of subsequent fields. */ > ! enum { > ! > ! /* We don't know anything about the value. This is also used for > ! values we could have kept track of, when doing so would have > ! been too complex and we don't want to bother. The bottom of > ! our lattice. */ > ! pv_unknown, > ! > ! /* A known constant. K is its value. */ > ! pv_constant, > ! > ! /* The value that register REG originally had *UPON ENTRY TO THE > ! FUNCTION*, plus K. If K is zero, this means, obviously, just > ! the value REG had upon entry to the function. REG is a GDB > ! register number. Before we start interpreting, we initialize > ! every register R to { pv_register, R, 0 }. */ > ! pv_register, > ! > ! } kind; > ! > ! /* The meanings of the following fields depend on 'kind'; see the > ! comments for the specific 'kind' values. */ > ! int reg; > ! CORE_ADDR k; > ! }; Given I'm, in the background, converting the old unwinders to the trad-frame framework (I've an i386 patch in my sandbox), it would probably be a good idea to merge the two. (note that I need to commit the above revised version to trunk and branch) enjoy, Andrew