From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12718 invoked by alias); 11 May 2002 20:36:13 -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 12710 invoked from network); 11 May 2002 20:36:12 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 11 May 2002 20:36:12 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 607293DFF; Sat, 11 May 2002 16:36:20 -0400 (EDT) Message-ID: <3CDD80C4.8090603@cygnus.com> Date: Sat, 11 May 2002 13:36: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 Subject: Re: ARM and virtual/raw registers References: <200205111841.TAA29351@cam-mail2.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg00117.txt.bz2 > > Argh! I've just come across another nasty gotcha in this code, if I try > to make it so that the regcache does not hold any pseudos: There's an > implicit assumption that all the physical registers will preceed the > pseudo registers. I should have warned you to not go looking under rocks :-( I think the real issue on this one is that the pseudo-registers and raw registers currently occupy the same register number space. If there was clear separation then it would be clear how many of these problems should be handled - you couldn't for instance try to put a pseudo in the middle of the raw part of the register buffer. I think it was mentioned, when adding register_{read,write} that this was likely to be sufficient rope to .... See also gdb/122. > This is a major problem when I want to implement the banked registers for > the ARM, since then r8 through r14 (which must have regnums 8 through 14 > for stabs debug info to work correctly), need to be pseudo registers (they > must access the correct physical register for the current processor mode); > which means they must appear in the middle of the register range. Make these pseudo registers (the corresponding real register_name() return ""), map stabs_regnum onto that and then (for all raw registers) use register register_{read,write} map onto the correct raw register. You'll also need to tweak saved_regs[] to set the pseudo and not the real register address. Even consider making everything a pseudo so that you know exactly what you have at any stage. > I can make my arm_register_read function correctly remap the register > numbers, but then I run into the problem that REGISTER_RAW_SIZE is used > both above and below the regcache. I don't understand why this is a problem. I think a register (pseudo or raw) should have only one size (c.f. my register_size() patch). Andrew