From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6812 invoked by alias); 10 Aug 2002 03:26:21 -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 6805 invoked from network); 10 Aug 2002 03:26:18 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 10 Aug 2002 03:26:18 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 1444B3CF7; Fri, 9 Aug 2002 23:26:16 -0400 (EDT) Message-ID: <3D5487D7.2050201@ges.redhat.com> Date: Fri, 09 Aug 2002 20:26:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020802 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Rewrite mips_get_saved_register() References: <1020809003710.ZM26327@localhost.localdomain> <3D53EA0A.2030405@ges.redhat.com> <1020809205925.ZM11149@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-08/txt/msg00235.txt.bz2 >> In theory (and emphasis on the theory) things need to be changed so that: >> >> - 32 32 bit nameless pseudo-registers are added to the cooked register space >> - the 32 64 bit gprs get given a 64 bit virtual type so that they have >> identical raw and virtual sizes >> - The debug info, for a 32 bit ABI, maps the gpr register numbers onto >> the 32 bit pseudo register range >> - The gdbarch pseudo register read/write function maps the 32 bit >> pseudo-registers onto the 64 bit gprs. >> - For init saved regs, dependant on the size of the register saved, >> either the the address of the 64 bit GPR or the address of the 32 bit >> pseudo-register is set >> - a custom mips register unwind function maps the requested register (64 >> bit gpr or 32 bit pseudo) onto: the 32 bit pseudo, the 64 bit gpr, or a >> further recursive unwind call. If it has to do a 32/64 mapping then it >> sets not-an-lval. >> - you find you have to yank all sorts of register converible code >> >> But like I said, it is theory, the mips suffers from one hack (like the >> above) piled on top of another (the register convertable stuff, the >> register raw/virtual size being different, ...). I don't know if now is >> the time to be experimenting with theories :-) > > > Yes, fixing all of the above is quite a lot more work than I have time > for at the moment. > > But, assuming that my rewrite is functionally equivalent to the > original, what is the reason for preferring to inline > find_saved_register() over using the new interface? Until the MIPS is ready, I think it is better to keep it and the unwind code well separated. We otherwize run the real risk of having unwind/cfi changes going off the rails because they break the (already broken) MIPS. The patch assumes, for instance, that the unwind address returned is the exact same address that was computed by init_saved_regs(), for CFI, that won't hold. enjoy, Andrew