This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rfc] replace register_buffer() with regcache_collect()


> 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]