From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22589 invoked by alias); 17 May 2002 16:22:31 -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 22582 invoked from network); 17 May 2002 16:22:30 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 17 May 2002 16:22:30 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6C69D3E98; Fri, 17 May 2002 12:22:39 -0400 (EDT) Message-ID: <3CE52E4F.70009@cygnus.com> Date: Fri, 17 May 2002 09:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0rc1) Gecko/20020429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Richard.Earnshaw@arm.com Cc: gdb@sources.redhat.com, Elena Zannoni Subject: Re: pseudo registers in the regcache References: <200205171353.OAA00746@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg00224.txt.bz2 > Grepping through the sources for the targets that were using regcache > entries for pseudos it turns out that in current CVS only two targets are > using pseudos at all: sh and mc68hc11. > > > The sh code is known not to put its pseudos in the regcache, which only > leaves the mc68hc11. Elena? Is the sh5 clear of all edge conditions? The mc68hc11 pre-dates register_{read,write}. > Looking at that code it appears that it uses the pseudos for registers > that are really part of the memory map, so it seems like we are really > overloading the "pseudo" name for two different things. The origins of the register_{read,write} stem from a target David Taylor encountered that needed to represent memory locations as registers! Code that was caching memory values in the register cache had [obvious] coherency problems. > How about renaming the 68k stuff as being MEMORY_REGS and reserving the > PSEUDO concept for what we really seem to want -- a view of a (or a > combination of) physical (or memory) register(s)? Or update mc68hc11 :-) > That would, I think allow us to say that pseudos are never in the regcache > and it should simplify many bits of code significantly. > Oh, and I'd make NUM_REGS (the define) be NUM_PHYS_REGS + NUM_MEMORY_REGS > so that gdb-core sees these as a single resource (ie the separation is > below gdb-core). No need. Andrew PS: Or NUM_COOKED_REGS being NUM_RAW_REGS + NUM_PSEUDO_REGS? Something like that is on a few hit lists. I've been resisting the temptation to do this since it was noise compared to eliminating registers[].