]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Update comments to to_xfer_partial implementations.
authorYao Qi <yao@codesourcery.com>
Thu, 30 Jan 2014 00:23:14 +0000 (08:23 +0800)
committerYao Qi <yao@codesourcery.com>
Tue, 11 Feb 2014 06:20:39 +0000 (14:20 +0800)
Some comments to to_xfer_partial implementations are out of date.
This patch updates them using the "Implement the to_xfer_partial
target_ops method" pattern.

gdb:

2014-02-11  Yao Qi  <yao@codesourcery.com>

* aix-thread.c (aix_thread_xfer_partial): Update comments.
* auxv.c (procfs_xfer_auxv, memory_xfer_auxv): Likewise.
* bsd-uthread.c (bsd_uthread_xfer_partial): Likewise.
* gnu-nat.c (gnu_xfer_memory): Likewise.
* inf-ptrace.c (inf_ptrace_xfer_partial):  Likewise.
* rs6000-nat.c (rs6000_xfer_partial): Likewise.
* sparc-nat.c (sparc_xfer_wcookie): Likewise.
* spu-linux-nat.c (spu_proc_xfer_spu): Likewise.

gdb/ChangeLog
gdb/aix-thread.c
gdb/auxv.c
gdb/bsd-uthread.c
gdb/gnu-nat.c
gdb/inf-ptrace.c
gdb/rs6000-nat.c
gdb/sparc-nat.c
gdb/spu-linux-nat.c

index 75eee7d9fb1f961a2b24f8a054e2fef0709ecf39..2fcd4a92bdab55d9b02276170f576fd529835d6f 100644 (file)
@@ -1,3 +1,14 @@
+2014-02-11  Yao Qi  <yao@codesourcery.com>
+
+       * aix-thread.c (aix_thread_xfer_partial): Update comments.
+       * auxv.c (procfs_xfer_auxv, memory_xfer_auxv): Likewise.
+       * bsd-uthread.c (bsd_uthread_xfer_partial): Likewise.
+       * gnu-nat.c (gnu_xfer_memory): Likewise.
+       * inf-ptrace.c (inf_ptrace_xfer_partial):  Likewise.
+       * rs6000-nat.c (rs6000_xfer_partial): Likewise.
+       * sparc-nat.c (sparc_xfer_wcookie): Likewise.
+       * spu-linux-nat.c (spu_proc_xfer_spu): Likewise.
+
 2014-02-11  Yao Qi  <yao@codesourcery.com>
 
        * target.h (enum target_xfer_error): Rename to ...
index 4feb0cb98dc6cc3e0886078e6571462240224203..bd2a3a1293813e11c7d2f9dc99691fcb66d56671 100644 (file)
@@ -1678,9 +1678,7 @@ aix_thread_store_registers (struct target_ops *ops,
     }
 }
 
-/* Attempt a transfer all LEN bytes starting at OFFSET between the
-   inferior's OBJECT:ANNEX space and GDB's READBUF/WRITEBUF buffer.
-   Return the number of bytes actually transferred.  */
+/* Implement the to_xfer_partial target_ops method.  */
 
 static enum target_xfer_status
 aix_thread_xfer_partial (struct target_ops *ops, enum target_object object,
index 012f27b92c9a74e3c9772987412edc6b47350902..2f4acf3da30d2a0c855db61fa8574a98a8ca00f4 100644 (file)
@@ -35,8 +35,9 @@
 #include <fcntl.h>
 
 
-/* This function handles access via /proc/PID/auxv, which is a common
-   method for native targets.  */
+/* Implement the to_xfer_partial target_ops method.  This function
+   handles access via /proc/PID/auxv, which is a common method for
+   native targets.  */
 
 static enum target_xfer_status
 procfs_xfer_auxv (gdb_byte *readbuf,
@@ -215,8 +216,8 @@ ld_so_xfer_auxv (gdb_byte *readbuf,
   return TARGET_XFER_OK;
 }
 
-/* This function is called like a to_xfer_partial hook, but must be
-   called with TARGET_OBJECT_AUXV.  It handles access to AUXV.  */
+/* Implement the to_xfer_partial target_ops method for
+   TARGET_OBJECT_AUXV.  It handles access to AUXV.  */
 
 enum target_xfer_status
 memory_xfer_auxv (struct target_ops *ops,
index 446bbd29dfc618b9ca8b1e731e0dfc6cbb7c3e96..bf6c390f376a4fcc0f7114d2a03cd38b10a79d0e 100644 (file)
@@ -331,8 +331,9 @@ bsd_uthread_store_registers (struct target_ops *ops,
     }
 }
 
-/* FIXME: This function is only there because otherwise GDB tries to
-   invoke deprecate_xfer_memory.  */
+/* Implement the to_xfer_partial target_ops method.  FIXME: This
+   function is only there because otherwise GDB tries to invoke
+   deprecate_xfer_memory.  */
 
 static enum target_xfer_status
 bsd_uthread_xfer_partial (struct target_ops *ops, enum target_object object,
index b5a8da0271266a94e437a9e734ea10e801a4d63b..efafc3557580bef14f3c79a98674c1a2d5d0eb70 100644 (file)
@@ -2473,7 +2473,8 @@ out:
 
 \f
 
-/* Helper for gnu_xfer_partial that handles memory transfers.  */
+/* Implement the to_xfer_partial target_ops method for
+   TARGET_OBJECT_MEMORY.  */
 
 static enum target_xfer_status
 gnu_xfer_memory (gdb_byte *readbuf, const gdb_byte *writebuf,
index edcad5aa82640ed0ace71b9025b3d0b18ec8202b..1ab6b0beee29074947af26bcc4c2880c16ba013a 100644 (file)
@@ -455,9 +455,7 @@ inf_ptrace_wait (struct target_ops *ops,
   return pid_to_ptid (pid);
 }
 
-/* Attempt a transfer all LEN bytes starting at OFFSET between the
-   inferior's OBJECT:ANNEX space and GDB's READBUF/WRITEBUF buffer.
-   Return the number of bytes actually transferred.  */
+/* Implement the to_xfer_partial target_ops method.  */
 
 static enum target_xfer_status
 inf_ptrace_xfer_partial (struct target_ops *ops, enum target_object object,
index 81a0874e42300ce56f9f9d39b88f2b6c1bb1daef..4ba955c5cc0acc3cf346bc92669304cffd421fdb 100644 (file)
@@ -374,10 +374,7 @@ rs6000_store_inferior_registers (struct target_ops *ops,
     }
 }
 
-
-/* Attempt a transfer all LEN bytes starting at OFFSET between the
-   inferior's OBJECT:ANNEX space and GDB's READBUF/WRITEBUF buffer.
-   Return the number of bytes actually transferred.  */
+/* Implement the to_xfer_partial target_ops method.  */
 
 static enum target_xfer_status
 rs6000_xfer_partial (struct target_ops *ops, enum target_object object,
index 169ba25a1e518873c5f5b93791bd8b8538ce2549..30b512484b7128a80fe1a05a47299d41774ebdf3 100644 (file)
@@ -256,7 +256,8 @@ sparc_store_inferior_registers (struct target_ops *ops,
 }
 
 \f
-/* Fetch StackGhost Per-Process XOR cookie.  */
+/* Implement the to_xfer_partial target_ops method for
+   TARGET_OBJECT_WCOOKIE.  Fetch StackGhost Per-Process XOR cookie.  */
 
 static enum target_xfer_status
 sparc_xfer_wcookie (struct target_ops *ops, enum target_object object,
index a3fd36992cc5293976274f4e75ce438be366361a..a68e4e0531d4cbb0651f2a1ca392b55eb31bb9d3 100644 (file)
@@ -226,8 +226,10 @@ parse_spufs_run (int *fd, ULONGEST *addr)
 }
 
 
-/* Copy LEN bytes at OFFSET in spufs file ANNEX into/from READBUF or WRITEBUF,
+/* Implement the to_xfer_partial target_ops method for TARGET_OBJECT_SPU.
+   Copy LEN bytes at OFFSET in spufs file ANNEX into/from READBUF or WRITEBUF,
    using the /proc file system.  */
+
 static enum target_xfer_status
 spu_proc_xfer_spu (const char *annex, gdb_byte *readbuf,
                   const gdb_byte *writebuf,