]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
for debuglevel >=2, ensure write_buf debug output only writes the req nr of char
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 31 Oct 2012 15:07:39 +0000 (15:07 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Wed, 31 Oct 2012 15:07:39 +0000 (15:07 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13096

coregrind/vgdb.c

index ec98eef46422ec401ed6e4879bcf1694949bcf9c..34db3b98d3a4b7b2ee36b7a3889f5e14490b7c8e 100644 (file)
@@ -1343,7 +1343,8 @@ Bool write_buf(int fd, char* buf, int size, char* desc, Bool notify)
 {
    int nrwritten;
    int nrw;
-   DEBUG(2, "writing %s len %d %s notify: %d\n", desc, size, buf, notify);
+   DEBUG(2, "writing %s len %d %.*s notify: %d\n", desc, size,
+         size, buf, notify);
    nrwritten = 0;
    while (nrwritten < size) {
       nrw = write (fd, buf+nrwritten, size - nrwritten);