2005-05-23 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Mon, 23 May 2005 19:32:28 +0000 (19:32 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 23 May 2005 19:32:28 +0000 (19:32 +0000)
* 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.

gdb/ChangeLog
gdb/dcache.c
gdb/infptrace.c
gdb/inftarg.c
gdb/rs6000-nat.c
gdb/target.h
gdb/win32-nat.c
gdb/wince.c
gdb/windows-nat.c

index 7187608..f68f9a8 100644 (file)
@@ -1,5 +1,17 @@
 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.
+
        * auxv.h (target_auxv_read, procfs_xfer_auxv)
        (target_auxv_parse): Use gdb_byte for byte buffer parameters.
        * auxv.c (target_auxv_read, procfs_xfer_auxv, target_auxv_parse) 
index 72e9866..acfb6cd 100644 (file)
@@ -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_ADDR addr, char *ptr)
  */
 
 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_ADDR memaddr, gdb_byte *myaddr,
                    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 a612d13..3035967 100644 (file)
@@ -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 cd8674d..279f3a7 100644 (file)
@@ -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 c930097..3aaa77c 100644 (file)
@@ -449,7 +449,7 @@ read_word (CORE_ADDR from, int *to, int arch64)
    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 80fd783..bc10b25 100644 (file)
@@ -545,7 +545,7 @@ extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
 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 bfdf9dc..bd775ad 100644 (file)
@@ -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 14f28e4..9be5e6f 100644 (file)
@@ -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 bfdf9dc..bd775ad 100644 (file)
@@ -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)
 {