From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20271 invoked by alias); 15 Apr 2004 15:34:37 -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 20256 invoked from network); 15 Apr 2004 15:34:37 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 15 Apr 2004 15:34:37 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 326322B9C; Thu, 15 Apr 2004 11:34:33 -0400 (EDT) Message-ID: <407EAB89.1040506@gnu.org> Date: Thu, 15 Apr 2004 15:34:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Randolph Chung Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/resend/rfa] (3/4) Remove DEPRECATED_CLEAN_UP_REGISTER_VALUE References: <20040414062447.GL31873@tausq.org> In-Reply-To: <20040414062447.GL31873@tausq.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00312.txt.bz2 > +static void > +hppa_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache, > + int regnum, void *buf) > +{ > + regcache_raw_read (regcache, regnum, buf); > + if (regnum == PCOQ_HEAD_REGNUM || regnum == PCOQ_TAIL_REGNUM) > + ((char *)buf)[sizeof(CORE_ADDR) -1 ] &= ~0x3; > +} > + Almost, this needs to be portable across byte-orders which means using something like: [U]LONGEST tmp; regcache_raw_read_[un]signed (&tmp) mask tmp store_[un]signed_integer buf, tmp with that tweak it is ok to commit (for reference, post the final patch) andrew (this also lets me clean-up more of the register code, ya!)