[patch/rfc] Rewrite regcache.[hc], add ``struct regcache'' object

Andrew Cagney ac131313@cygnus.com
Sat Jun 15 18:17:00 GMT 2002


Hello,

The attached patch pulls in the rewritten regcache.[hc] from the regbuf 
branch.

This patch:

- Introduces the ``struct regcache'' object.

- Adds a global current_regcache.  This is kept in sync with those 
dreaded global arrays registers[] and register_valid[] and thus keeps 
existing code working.

- Introduces a per-architecture ``struct regcache_descr''.  This 
describes the exact layout of the register cache (and saves the need to 
go through all those gdbarch register methods).

- Parameterizes the existing regcache read/write et.al. functions with 
that object (calls in sh-tdep.c are updated).

- Adds methods for saving / restoring / copying a ``struct regcache''.
Follow on patches to generic dummy frames and similar will use these 
methods when saving and restoring the register cache.

- For new architectures, the regcache no longer bothers to store pseudo 
registers - it is assumed that gdbarch_register_read/write will take 
care of this.

I've tested the patch on GNU/Linux i386 (LE) and NetBSD/PPC (BE) and not 
seen any regressions.  Baring comments, I'll check it in in a few days. 
  After that I'll start feeding in the other changes.

enjoy,
Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20020615/14b22257/attachment.ksh>


More information about the Gdb-patches mailing list