Fix length arg in call to breakpoint_xfer_memory.
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Fri, 21 Feb 2014 14:55:37 +0000 (15:55 +0100)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Fri, 21 Feb 2014 14:55:37 +0000 (15:55 +0100)
The patch "return target_xfer_status in to_xfer_partial" caused a
regression in various s390(x) test cases, because memory_xfer_partial
filled only the first byte of the read buffer from a breakpoint shadow:

    https://sourceware.org/ml/gdb-patches/2014-01/msg01071.html

This patch fixes the regression.

gdb/ChangeLog
gdb/target.c

index ac3844f188e2eede63882cbfdb1061bf454d2b19..9406d76922a8cfeb0a6895419b63646369ee2fd4 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-21  Andreas Arnez  <arnez@vnet.linux.ibm.com>
+
+       * target.c (memory_xfer_partial): Fix length arg in call to
+       breakpoint_xfer_memory.
+
 2014-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
 
        PR tdep/16397
index 4adc0945bcfbf768d7a394e2855668a1229ec138..0f3bd30165241bf664a5e4dcae4ab4c227df2f5f 100644 (file)
@@ -1348,7 +1348,7 @@ memory_xfer_partial (struct target_ops *ops, enum target_object object,
                                   xfered_len);
 
       if (res == TARGET_XFER_OK && !show_memory_breakpoints)
-       breakpoint_xfer_memory (readbuf, NULL, NULL, memaddr, res);
+       breakpoint_xfer_memory (readbuf, NULL, NULL, memaddr, *xfered_len);
     }
   else
     {