From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28531 invoked by alias); 19 May 2002 14:47:49 -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 28485 invoked from network); 19 May 2002 14:47:47 -0000 Received: from unknown (HELO fw-cam.cambridge.arm.com) (193.131.176.3) by sources.redhat.com with SMTP; 19 May 2002 14:47:47 -0000 Received: by fw-cam.cambridge.arm.com; id PAA07232; Sun, 19 May 2002 15:47:46 +0100 (BST) Received: from unknown(172.16.1.2) by fw-cam.cambridge.arm.com via smap (V5.5) id xma007102; Sun, 19 May 02 15:47:15 +0100 Received: from cam-mail2.cambridge.arm.com (cam-mail2.cambridge.arm.com [172.16.1.91]) by cam-admin0.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id PAA21728; Sun, 19 May 2002 15:47:14 +0100 (BST) Received: from sun18.cambridge.arm.com (sun18.cambridge.arm.com [172.16.2.18]) by cam-mail2.cambridge.arm.com (8.9.3/8.9.3) with ESMTP id PAA25151; Sun, 19 May 2002 15:47:14 +0100 (BST) Message-Id: <200205191447.PAA25151@cam-mail2.cambridge.arm.com> To: Andrew Cagney cc: Richard.Earnshaw@arm.com, gdb-patches@sources.redhat.com Reply-To: Richard.Earnshaw@arm.com Organization: ARM Ltd. X-Telephone: +44 1223 400569 (direct+voicemail), +44 1223 400400 (switchbd) X-Fax: +44 1223 400410 X-Address: ARM Ltd., 110 Fulbourn Road, Cherry Hinton, Cambridge CB1 9NJ. X-Url: http://www.arm.com/ Subject: Re: [wip/cagney_regbuf-20020515-branch] Introduce regcache_move() In-reply-to: Your message of "Sat, 18 May 2002 15:08:38 EDT." <3CE6A6B6.2030007@cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 19 May 2002 07:47:00 -0000 From: Richard Earnshaw X-SW-Source: 2002-05/txt/msg00800.txt.bz2 > There is a ``work around'' for this immediate problem. > > I'm going to add a register_bytes() method to regcache that makes the [0 > .. NUM_REGS + NUM_PSEUDO_REGS) contigious and returns an offset based on > that assumption. > > write_register_bytes(), with the suggested change, will convert the > offset back to a regnum and call write_register_gen() with that. Hmm, so each pseudo would allocate a unique address even though there was no real regbuf space for it; something like 0 4 4*(n-1) 4*n 4*(n+1) ... +---------+---------+ +---------+---------+---------+ | Phys r0 | Phys r1 | ... | Phys rn | Pseu r0 | Pseu r1 | +---------+---------+ +---------+---------+---------+ | REGBUF ... | +-------------------- ----------+ Then each reg would have a unique address. Provided we always call through the correct interfaces, and never use memcpy (grub_around...registers() + REGISTER_BYTE(PseudoN), ...) then this would work. > Rock warning: GDB uses the above to handle (with limited success) values > that cross two registers. For instance a long long in two adjacent long > registers. See value_from_register(). I've been told ARM's own C compiler can put long longs in non-adjacent register pairs. At some point I will need to support that... it will probably mean being able to read from some ordered list of registers, or some such. R.