From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6333 invoked by alias); 9 Jul 2003 14:03:56 -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 6324 invoked from network); 9 Jul 2003 14:03:56 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Jul 2003 14:03:56 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h69E3tH18164 for ; Wed, 9 Jul 2003 10:03:55 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h69E3sS22647 for ; Wed, 9 Jul 2003 10:03:54 -0400 Received: from cygbert.vinschen.de (vpn50-7.rdu.redhat.com [172.16.50.7]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h69E3rK09260 for ; Wed, 9 Jul 2003 07:03:53 -0700 Received: by cygbert.vinschen.de (Postfix, from userid 500) id ACF23580A1; Wed, 9 Jul 2003 16:03:51 +0200 (CEST) Date: Wed, 09 Jul 2003 14:03:00 -0000 From: Corinna Vinschen To: gdb@sources.redhat.com Subject: register_size question (was Re: A matter of taste?) Message-ID: <20030709140351.GP12368@cygbert.vinschen.de> Reply-To: gdb@sources.redhat.com Mail-Followup-To: gdb@sources.redhat.com References: <20030709135543.GO12368@cygbert.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030709135543.GO12368@cygbert.vinschen.de> User-Agent: Mutt/1.4.1i X-SW-Source: 2003-07/txt/msg00092.txt.bz2 Oops, sorry for the weird subject, I mixed the subject of one mail with the content of another one. :-((( I'm going to send a patch related to this mail to gdb-patches in a minute (with a better subject, of course). Corinna On Wed, Jul 09, 2003 at 03:55:43PM +0200, Corinna Vinschen wrote: > Hi, > > I'm currently substituting a bunch of calls to REGISTER_RAW_SIZE. > Since REGISTER_RAW_SIZE should be removed entirely, I was wondering > how to do it most nicely. > > What I don't quite get is the implementation of function register_size > in regcache.c. It retrieves the size of the regsiter from the > regcache and then checks twice(!) if that size equals REGISTER_RAW_SIZE. > If I understand that correctly, a multi-arched target which got rid of > REGISTER_RAW_SIZE can't use register_size () since the REGISTER_RAW_SIZE > calls in register_size will raise an internal_error in > gdbarch_deprecated_register_raw_size(). > > What is that good for? And what's the substitute for a target with > no REGISTER_RAW_SIZE implementation? One idea is to use the constant > byte size in cases where it's clear (the tdep code typically knows > the register size). But that looks always a bit ugly. So, would > > TYPE_LENGTH (gdbarch_register_type (gdbarch, regnum)) > > be a good way to do it? > > > Corinna -- Corinna Vinschen Cygwin Developer Red Hat, Inc. mailto:vinschen@redhat.com