Debugging prints to figure out fmt issue

Change-Id: I9a89b7cebebee138ecd98c228d49a783207b0de1
diff --git a/src/fmt/print.go b/src/fmt/print.go
index f67f805..54def9b 100644
--- a/src/fmt/print.go
+++ b/src/fmt/print.go
@@ -186,6 +186,7 @@
 func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
 	p := newPrinter()
 	p.doPrintf(format, a)
+	println("Fprintf pbuf len=", len(p.buf), " cap=", cap(p.buf), "'", p.buf, "'")
 	n, err = w.Write(p.buf)
 	p.free()
 	return
diff --git a/src/internal/poll/fd_fuchsia.go b/src/internal/poll/fd_fuchsia.go
index ccdd9e5..0876179 100644
--- a/src/internal/poll/fd_fuchsia.go
+++ b/src/internal/poll/fd_fuchsia.go
@@ -151,9 +151,12 @@
 	var nn int
 	for {
 		n, err := fd.Handle.Write(p[nn:])
+		println("XXX: len(p) = ", len(p), " cap(p) = ", cap(p), " nn = ", nn)
+		println("XXX: wrote ", p[nn:])
 		if n > 0 {
 			nn += n
 		}
+		println("XXX: n = ", n, " nn = ", nn, "len(p) = ", len(p))
 		if nn == len(p) {
 			return nn, err
 		}
diff --git a/src/syscall/syscall_fuchsia.go b/src/syscall/syscall_fuchsia.go
index 68c138b..e2d998e 100644
--- a/src/syscall/syscall_fuchsia.go
+++ b/src/syscall/syscall_fuchsia.go
@@ -404,17 +404,20 @@
 	switch fd {
 	case Stdout:
 		stdioMu.Lock()
+		println("stdout.Write p=", p)
 		n, err := stdout.Write(p)
 		stdioMu.Unlock()
 		return n, err
 	case Stderr:
 		stdioMu.Lock()
+		println("stderr.Write p=", p)
 		n, err := stderr.Write(p)
 		stdioMu.Unlock()
 		return n, err
 	default:
 		fdsMu.Lock()
 		f := fds[fd-fdsOff]
+		println("syscall.Write p=", p, "fd=", f)
 		fdsMu.Unlock()
 		return f.Write(p)
 	}
diff --git a/src/syscall/zx/fdio/file.go b/src/syscall/zx/fdio/file.go
index 2d847d0..c15afe4 100644
--- a/src/syscall/zx/fdio/file.go
+++ b/src/syscall/zx/fdio/file.go
@@ -106,16 +106,20 @@
 			)
 		}
 		if err != nil {
+			println("XXX: with err fdio.(*File).Write wrote ", ptr, " for ", data)
 			return ptr, err
 		} else if status != zx.ErrOk {
+			println("XXX: with sys err fdio.(*File).Write wrote ", ptr, " for ", data)
 			return ptr, zx.Error{Status: status, Text: "io.file"}
 		}
 		ptr += int(written)
 		// Error on a short write.
 		if int(written) < bytesToWrite {
+			println("XXX: with short write err fdio.(*File).Write wrote ", ptr, " for ", data)
 			return ptr, zx.Error{Status: zx.ErrIO, Text: "io.file"}
 		}
 	}
+	println("XXX: fdio.(*File).Write wrote ", ptr, " for ", data)
 	return ptr, nil
 }