From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20189 invoked by alias); 15 Nov 2001 06:41:26 -0000 Mailing-List: contact gdb-patches-help@sourceware.cygnus.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 20130 invoked from network); 15 Nov 2001 06:41:21 -0000 Received: from unknown (HELO localhost.cygnus.com) (24.114.42.213) by sourceware.cygnus.com with SMTP; 15 Nov 2001 06:41:21 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.cygnus.com (Postfix) with ESMTP id B12963CF6; Thu, 15 Nov 2001 01:41:20 -0500 (EST) Message-ID: <3BF36390.2050605@cygnus.com> Date: Tue, 06 Nov 2001 03:06:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.3) Gecko/20011020 X-Accept-Language: en-us MIME-Version: 1.0 To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfc] replace register_buffer() with regcache_collect() References: <3BEEBC01.30409@cygnus.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2001-11/txt/msg00078.txt.bz2 > Hello, > > The attached patch replaces the function register_buffer(regnum) with regcache_collect(regnum, buffer). > > regcache_collect() is the counter-part to supply_register(). It extracts a single raw register from the register cache as part of processing a target_store_registers() request. Unlike register_buffer() this interface doesn't make assumptions about the underlying register cache. > > Targets that are directly manipulating the registers[] and register_valid[] arrays should consider themselves as being ``on notice''. > > Potential follow-ons to this patch are: add a ``struct regcache'' parameter; and add ``struct regcache'' to ``struct thread_info''; and parameterise target_{fetch,store}_registers() with ``struct regcache'' or ``struct thread_info''. > > Testing continues... Testing has finished. Doesn't appear to break anything .... I've added registers[] and register_valid[] to the ARI. New targets and natives had better not use them :-) enjoy, Andrew