2003-04-09 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / regcache.h
index ee1050536056de08f98bd908332c3aa7a3311f6d..3fb43c437a469c21207db8a8d4a0d9a1971f74bb 100644 (file)
@@ -75,6 +75,10 @@ extern void regcache_cooked_read_signed (struct regcache *regcache,
                                         int regnum, LONGEST *val);
 extern void regcache_cooked_read_unsigned (struct regcache *regcache,
                                           int regnum, ULONGEST *val);
+extern void regcache_cooked_write_signed (struct regcache *regcache,
+                                         int regnum, LONGEST val);
+extern void regcache_cooked_write_unsigned (struct regcache *regcache,
+                                           int regnum, ULONGEST val);
 
 /* Partial transfer of a cooked register.  These perform read, modify,
    write style operations.  */
@@ -94,7 +98,7 @@ extern void regcache_collect (int regnum, void *buf);
 
 /* The register's ``offset''.
 
-   FIXME: cagney/2002-11-07: The get_saved_register() function, when
+   FIXME: cagney/2002-11-07: The frame_register() function, when
    specifying the real location of a register, does so using that
    registers offset in the register cache.  That offset is then used
    by valops.c to determine the location of the register.  The code
@@ -155,15 +159,19 @@ extern int max_register_size (struct gdbarch *gdbarch);
 extern int register_size (struct gdbarch *gdbarch, int regnum);
 
 
-/* Save/restore a register cache.  The registers saved/restored is
-   determined by the save_reggroup and restore_reggroup (although you
-   can't restore a register that wasn't saved as well :-).  You can
-   only save to a read-only cache (default from regcache_xmalloc())
-   from a live cache and you can only restore from a read-only cache
-   to a live cache.  */
+/* Save/restore a register cache.  The set of registers saved /
+   restored into the DST regcache determined by the save_reggroup /
+   restore_reggroup respectively.  COOKED_READ returns zero iff the
+   register's value can't be returned.  */
 
-extern void regcache_save (struct regcache *dst, struct regcache *src);
-extern void regcache_restore (struct regcache *dst, struct regcache *src);
+typedef int (regcache_cooked_read_ftype) (void *src, int regnum, void *buf);
+
+extern void regcache_save (struct regcache *dst,
+                          regcache_cooked_read_ftype *cooked_read,
+                          void *src);
+extern void regcache_restore (struct regcache *dst,
+                             regcache_cooked_read_ftype *cooked_read,
+                             void *src);
 
 /* Copy/duplicate the contents of a register cache.  By default, the
    operation is pass-through.  Writes to DST and reads from SRC will
This page took 0.024184 seconds and 4 git commands to generate.