This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] replace register_buffer() with regcache_collect()
- From: Andrew Cagney <ac131313 at cygnus dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Thu, 15 Nov 2001 01:41:20 -0500
- Subject: Re: [rfc] replace register_buffer() with regcache_collect()
- References: <3BEEBC01.30409@cygnus.com>
> 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