From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6661 invoked by alias); 2 Nov 2002 16:22:52 -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 6307 invoked from network); 2 Nov 2002 16:22:49 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 2 Nov 2002 16:22:49 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 96C8E3CB1; Sat, 2 Nov 2002 11:22:36 -0500 (EST) Message-ID: <3DC3FBCC.8050801@redhat.com> Date: Sat, 02 Nov 2002 08:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] Deprecate read_register_gen() / write_register_gen() References: <3DC3E5A3.4090803@redhat.com> <20021102145850.GA24106@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-11/txt/msg00013.txt.bz2 > On Sat, Nov 02, 2002 at 09:48:03AM -0500, Andrew Cagney wrote: > >> These functions are now really redundant - equivalent regcache variants >> are available. Apart from the fringes (-tdep files) there are hardly >> any references left. > > > When you deprecate without removing, would you mind adding a pointer to > the replacement interfaces in headers near the declaration? Otherwise > the remaining references are a pain for individual maintainers to clean > up later. I forgot :-( I'll add something but it's going to be pretty wishy washy :-( The problem is that the obvious change, vis: read_register_gen (regnum, buf); to: regcache_cooked_read (current_regcache, regnum, buf) is wrong. Invariably, the containing function is what really needs an overhaul, vis: static void mips_push_register (CORE_ADDR * sp, int regno) { .... deprecated_read_register_gen (regno, buffer); write_memory (*sp, buffer + offset, regsize); } (this should be parameterized with a register cache). Andrew