From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2268 invoked by alias); 9 Jul 2003 13:55:50 -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 2261 invoked from network); 9 Jul 2003 13:55:49 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Jul 2003 13:55:49 -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 h69DtlH15937 for ; Wed, 9 Jul 2003 09:55:48 -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 h69DtkS22421 for ; Wed, 9 Jul 2003 09:55:46 -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 h69DtjK08939 for ; Wed, 9 Jul 2003 06:55:45 -0700 Received: by cygbert.vinschen.de (Postfix, from userid 500) id 3E145580A1; Wed, 9 Jul 2003 15:55:43 +0200 (CEST) Date: Wed, 09 Jul 2003 13:55:00 -0000 From: Corinna Vinschen To: gdb@sources.redhat.com Subject: A matter of taste? Message-ID: <20030709135543.GO12368@cygbert.vinschen.de> Reply-To: gdb@sources.redhat.com Mail-Followup-To: gdb@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2003-07/txt/msg00091.txt.bz2 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