PR record/18691: Fix fails in solib-precsave.exp

Message ID 868u9zfb3t.fsf@gmail.com
State New, archived
Headers

Commit Message

Yao Qi July 29, 2015, 11:37 a.m. UTC
  Pedro Alves <palves@redhat.com> writes:

>> +enum target_xfer_status
>> +raw_memory_xfer_partial (struct target_ops *ops, gdb_byte *readbuf,
>> + const gdb_byte *writebuf, ULONGEST memaddr, LONGEST len,
>> +			 ULONGEST *xfered_len);
>
> Being a declaration, the function name shouldn't be on column 0, but
> on column 2 instead.

Oh, it is fixed in the updated patch.  I'll push the patch below.
  

Patch

diff --git a/gdb/dcache.c b/gdb/dcache.c
index 3c8319f..f87c529 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -498,9 +498,8 @@  dcache_read_memory_partial (struct target_ops *ops, DCACHE *dcache,
     {
       /* Even though reading the whole line failed, we may be able to
 	 read a piece starting where the caller wanted.  */
-      return ops->to_xfer_partial (ops, TARGET_OBJECT_MEMORY, NULL,
-				   myaddr, NULL, memaddr, len,
-				   xfered_len);
+      return raw_memory_xfer_partial (ops, myaddr, NULL, memaddr, len,
+				      xfered_len);
     }
   else
     {
diff --git a/gdb/target.c b/gdb/target.c
index 4e2d005..01bac7e 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -1060,7 +1060,7 @@  memory_xfer_check_region (gdb_byte *readbuf, const gdb_byte *writebuf,
    instance, could have some of memory but delegate other bits to
    the target below it.  So, we must manually try all targets.  */
 
-static enum target_xfer_status
+enum target_xfer_status
 raw_memory_xfer_partial (struct target_ops *ops, gdb_byte *readbuf,
 			 const gdb_byte *writebuf, ULONGEST memaddr, LONGEST len,
 			 ULONGEST *xfered_len)
diff --git a/gdb/target.h b/gdb/target.h
index 32234f7..cad5c52 100644
--- a/gdb/target.h
+++ b/gdb/target.h
@@ -265,6 +265,11 @@  typedef enum target_xfer_status
 			     ULONGEST len,
 			     ULONGEST *xfered_len);
 
+enum target_xfer_status
+  raw_memory_xfer_partial (struct target_ops *ops, gdb_byte *readbuf,
+			   const gdb_byte *writebuf, ULONGEST memaddr,
+			   LONGEST len, ULONGEST *xfered_len);
+
 /* Request that OPS transfer up to LEN addressable units of the target's
    OBJECT.  When reading from a memory object, the size of an addressable unit
    is architecture dependent and can be found using