From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19683 invoked by alias); 2 May 2003 01:30:17 -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 19676 invoked from network); 2 May 2003 01:30:17 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 2 May 2003 01:30:17 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id BF7852B2F; Thu, 1 May 2003 21:30:14 -0400 (EDT) Message-ID: <3EB1CA26.5080508@redhat.com> Date: Fri, 02 May 2003 01:30:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner Cc: gdb@sources.redhat.com Subject: Re: register_offset_hack() vs REGISTER_BYTE() References: <1030502003824.ZM26690@localhost.localdomain> <3EB1C2C8.5080502@redhat.com> <1030502010944.ZM27038@localhost.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00013.txt.bz2 >> Er, for a legacy architecture, register_offset_hack(i) (aka >> current_regcache->descr->register_offset) should be REGISTER_BYTE(i). >> See init_legacy_regcache_descr. >> >> Sounds like the MIPS is sneeking past: >> >> /* If an old style architecture, fill in the remainder of the >> register cache descriptor using the register macros. */ >> if (!gdbarch_pseudo_register_read_p (gdbarch) >> && !gdbarch_pseudo_register_write_p (gdbarch) >> && !gdbarch_register_type_p (gdbarch)) >> { >> descr->legacy_p = 1; >> init_legacy_regcache_descr (gdbarch, descr); >> return descr; >> } > > > Hmm, yes. I just added some pseudo registers... Can probably change REGISTER_BYTE to a pre-initialized method with predicate (see DEPRECATED_PC_IN_CALL_DUMMY for an example), and then add a predicate test for it to the above mix. Sentinel frame should probably also be switched to using register_offset_hack(), instead of REGISTER_BYTE(), so that it is more consistent with the frame code. Sounds like it's time to s/ REGISTER_BYTE / DEPRECATED_REGISTER_BYTE /. It isn't yet possible to eliminate that macro from the MIPS since it is that hardwired mystery that defines the MIPS remote protocol :-( Andrew