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]

[commit] gdb_byte dcache and more of target.h


fyi

2005-05-23  Andrew Cagney  <cagney@gnu.org>

	* target.h (child_xfer_memory): Use gdb_byte for byte buffer
	parameters.
	* inftarg.c (child_xfer_partial): Update.
	* wince.c (child_xfer_memory): Update.
	* win32-nat.c (child_xfer_memory): Update.
	* rs6000-nat.c (child_xfer_memory): Update.
	* infptrace.c (child_xfer_memory): Update.
	* dcache.c (struct dcache_block): Use gdb_byte for the byte
	buffers.
	(dcache_read_line, dcache_xfer_memory, dcache_poke_byte) 
	(dcache_peek_byte, dcache_write_line): Ditto.

Index: dcache.c
===================================================================
RCS file: /cvs/src/src/gdb/dcache.c,v
retrieving revision 1.24
diff -p -u -r1.24 dcache.c
--- dcache.c	16 May 2005 04:45:42 -0000	1.24
+++ dcache.c	23 May 2005 19:30:30 -0000
@@ -124,7 +124,7 @@ struct dcache_block
   {
     struct dcache_block *p;	/* next in list */
     CORE_ADDR addr;		/* Address for which data is recorded.  */
-    char data[LINE_SIZE];	/* bytes at given address */
+    gdb_byte data[LINE_SIZE];	/* bytes at given address */
     unsigned char state[LINE_SIZE];	/* what state the data is in */
 
     /* whether anything in state is dirty - used to speed up the 
@@ -162,10 +162,6 @@ struct dcache_struct
     struct dcache_block *the_cache;
   };
 
-static int dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr);
-
-static int dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr);
-
 static struct dcache_block *dcache_hit (DCACHE *dcache, CORE_ADDR addr);
 
 static int dcache_write_line (DCACHE *dcache, struct dcache_block *db);
@@ -250,7 +246,7 @@ static int
 dcache_write_line (DCACHE *dcache, struct dcache_block *db)
 {
   CORE_ADDR memaddr;
-  char *myaddr;
+  gdb_byte *myaddr;
   int len;
   int res;
   int reg_len;
@@ -331,7 +327,7 @@ static int
 dcache_read_line (DCACHE *dcache, struct dcache_block *db)
 {
   CORE_ADDR memaddr;
-  char *myaddr;
+  gdb_byte *myaddr;
   int len;
   int res;
   int reg_len;
@@ -450,7 +446,7 @@ dcache_writeback (DCACHE *dcache)
    Returns 0 on error. */
 
 static int
-dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
+dcache_peek_byte (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr)
 {
   struct dcache_block *db = dcache_hit (dcache, addr);
 
@@ -477,7 +473,7 @@ dcache_peek_byte (DCACHE *dcache, CORE_A
  */
 
 static int
-dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, char *ptr)
+dcache_poke_byte (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr)
 {
   struct dcache_block *db = dcache_hit (dcache, addr);
 
@@ -536,7 +532,7 @@ dcache_xfer_memory (DCACHE *dcache, CORE
 		    int len, int should_write)
 {
   int i;
-  int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, char *ptr);
+  int (*xfunc) (DCACHE *dcache, CORE_ADDR addr, gdb_byte *ptr);
   xfunc = should_write ? dcache_poke_byte : dcache_peek_byte;
 
   for (i = 0; i < len; i++)
Index: infptrace.c
===================================================================
RCS file: /cvs/src/src/gdb/infptrace.c,v
retrieving revision 1.54
diff -p -u -r1.54 infptrace.c
--- infptrace.c	21 Feb 2005 17:22:43 -0000	1.54
+++ infptrace.c	23 May 2005 19:30:30 -0000
@@ -332,7 +332,7 @@ store_inferior_registers (int regnum)
    us in the target stack anyway.  */
 
 int
-child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+child_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int write,
 		   struct mem_attrib *attrib, struct target_ops *target)
 {
   int i;
Index: inftarg.c
===================================================================
RCS file: /cvs/src/src/gdb/inftarg.c,v
retrieving revision 1.41
diff -p -u -r1.41 inftarg.c
--- inftarg.c	12 Feb 2005 00:39:19 -0000	1.41
+++ inftarg.c	23 May 2005 19:30:30 -0000
@@ -531,8 +531,8 @@ child_core_file_to_sym_file (char *core)
 
 static LONGEST
 child_xfer_partial (struct target_ops *ops, enum target_object object,
-		    const char *annex, void *readbuf,
-		    const void *writebuf, ULONGEST offset, LONGEST len)
+		    const char *annex, gdb_byte *readbuf,
+		    const gdb_byte *writebuf, ULONGEST offset, LONGEST len)
 {
   switch (object)
     {
Index: rs6000-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-nat.c,v
retrieving revision 1.58
diff -p -u -r1.58 rs6000-nat.c
--- rs6000-nat.c	11 Feb 2005 18:13:52 -0000	1.58
+++ rs6000-nat.c	23 May 2005 19:30:31 -0000
@@ -449,7 +449,7 @@ read_word (CORE_ADDR from, int *to, int 
    us in the target stack anyway.  */
 
 int
-child_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
+child_xfer_memory (CORE_ADDR memaddr, gdb_byte *myaddr, int len,
 		   int write, struct mem_attrib *attrib,
 		   struct target_ops *target)
 {
Index: target.h
===================================================================
RCS file: /cvs/src/src/gdb/target.h,v
retrieving revision 1.73
diff -p -u -r1.73 target.h
--- target.h	16 May 2005 04:45:43 -0000	1.73
+++ target.h	23 May 2005 19:30:31 -0000
@@ -545,7 +545,7 @@ extern int target_write_memory (CORE_ADD
 extern int xfer_memory (CORE_ADDR, gdb_byte *, int, int,
 			struct mem_attrib *, struct target_ops *);
 
-extern int child_xfer_memory (CORE_ADDR, char *, int, int,
+extern int child_xfer_memory (CORE_ADDR, gdb_byte *, int, int,
 			      struct mem_attrib *, struct target_ops *);
 
 /* Make a single attempt at transfering LEN bytes.  On a successful
Index: win32-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/win32-nat.c,v
retrieving revision 1.110
diff -p -u -r1.110 win32-nat.c
--- win32-nat.c	27 Mar 2005 05:21:12 -0000	1.110
+++ win32-nat.c	23 May 2005 19:30:32 -0000
@@ -1931,7 +1931,7 @@ child_stop (void)
 }
 
 int
-child_xfer_memory (CORE_ADDR memaddr, char *our, int len,
+child_xfer_memory (CORE_ADDR memaddr, gdb_byte *our, int len,
 		   int write, struct mem_attrib *mem,
 		   struct target_ops *target)
 {
Index: wince.c
===================================================================
RCS file: /cvs/src/src/gdb/wince.c,v
retrieving revision 1.41
diff -p -u -r1.41 wince.c
--- wince.c	18 Feb 2005 15:25:31 -0000	1.41
+++ wince.c	23 May 2005 19:30:32 -0000
@@ -1839,7 +1839,7 @@ child_mourn_inferior (void)
 
 /* Move memory from child to/from gdb.  */
 int
-child_xfer_memory (CORE_ADDR memaddr, char *our, 
+child_xfer_memory (CORE_ADDR memaddr, gdb_byte *our, 
 		   int len, int write,
 		   struct mem_attrib *attrib,
 		   struct target_ops *target)

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