From: Philippe Waroquiers Date: Wed, 31 Oct 2012 15:07:39 +0000 (+0000) Subject: for debuglevel >=2, ensure write_buf debug output only writes the req nr of char X-Git-Tag: svn/VALGRIND_3_9_0~572 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd8e4e9bdeb138d02ae4589c6f2e2ddd5155b018;p=thirdparty%2Fvalgrind.git for debuglevel >=2, ensure write_buf debug output only writes the req nr of char git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13096 --- diff --git a/coregrind/vgdb.c b/coregrind/vgdb.c index ec98eef464..34db3b98d3 100644 --- a/coregrind/vgdb.c +++ b/coregrind/vgdb.c @@ -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);