aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2015-02-20 13:15:56 -0500
committerDavid Crawshaw <crawshaw@golang.org>2015-02-20 18:30:09 +0000
commit84e200cbcbbef74bd0eb587ae460a37b6b9463c6 (patch)
tree95ffc1d8ab020247d77f7ddf37b81e53e5700101
parentadff896e4c8c89a692b93c4db44be7f019925134 (diff)
downloadgo-84e200cbcbbef74bd0eb587ae460a37b6b9463c6.tar.gz
go-84e200cbcbbef74bd0eb587ae460a37b6b9463c6.zip
[dev.cc] runtime: print to stderr as well as android logd
Restores stack traces in the android/arm builder. Change-Id: If637aa2ed6f8886126b77cf9cc8a0535ec7c4369 Reviewed-on: https://go-review.googlesource.com/5453 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
-rw-r--r--src/runtime/print1_write_android.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/runtime/print1_write_android.go b/src/runtime/print1_write_android.go
index 1f4f0996fe..54d4826375 100644
--- a/src/runtime/print1_write_android.go
+++ b/src/runtime/print1_write_android.go
@@ -45,6 +45,9 @@ func writeErr(b []byte) {
}
}
+ // Write to stderr for command-line programs.
+ write(2, unsafe.Pointer(&b[0]), int32(len(b)))
+
// Log format: "<header>\x00<message m bytes>\x00"
//
// <header>