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]

[patch] Mention what replaced the deprecated functions


FYI,

Per daniel's suggestion, I've checked in the attached. It tries to explain the approach to take when updating the code to remove the deprecated references.

committed,
Andrew
2002-11-02  Andrew Cagney  <ac131313@redhat.com>

	* regcache.h: Add coment indicating replacements for deprecated
	functions.

Index: regcache.h
===================================================================
RCS file: /cvs/src/src/gdb/regcache.h,v
retrieving revision 1.20
diff -u -r1.20 regcache.h
--- regcache.h	2 Nov 2002 14:59:10 -0000	1.20
+++ regcache.h	2 Nov 2002 18:40:46 -0000
@@ -169,8 +169,24 @@
 extern void regcache_cpy (struct regcache *dest, struct regcache *src);
 extern void regcache_cpy_no_passthrough (struct regcache *dest, struct regcache *src);
 
+/* NOTE: cagney/2002-11-02: The below have been superseded by the
+   regcache_cooked_*() functions found above, and the frame_*()
+   functions found in "frame.h".  Take care though, often more than a
+   simple substitution is required when updating the code.  The
+   change, as far as practical, should avoid adding references to
+   global variables (e.g., current_regcache, current_frame,
+   current_gdbarch or selected_frame) and instead refer to the FRAME
+   or REGCACHE that has been passed into the containing function as
+   parameters.  Consequently, the change typically involves modifying
+   the containing function so that it takes a FRAME or REGCACHE
+   parameter.  In the case of an architecture vector method, there
+   should already be a non-deprecated variant that is parameterized
+   with FRAME or REGCACHE.  */
+
 extern char *deprecated_grub_regcache_for_registers (struct regcache *);
 extern char *deprecated_grub_regcache_for_register_valid (struct regcache *);
+extern void deprecated_read_register_gen (int regnum, char *myaddr);
+extern void deprecated_write_register_gen (int regnum, char *myaddr);
 
 extern int register_cached (int regnum);
 
@@ -183,10 +199,6 @@
 extern void registers_fetched (void);
 
 extern void read_register_bytes (int regbyte, char *myaddr, int len);
-
-extern void deprecated_read_register_gen (int regnum, char *myaddr);
-
-extern void deprecated_write_register_gen (int regnum, char *myaddr);
 
 extern void write_register_bytes (int regbyte, char *myaddr, int len);
 

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