diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 15:47:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 15:47:21 +0000 |
commit | adb0401dac41c81571722312d4586b2693f95aa6 (patch) | |
tree | ea2b52e3c258d6b6d9356977c683c7f72a4a5fd5 /libgo/go/runtime/debug | |
parent | 5548ca3540bccbc908a45942896d635ea5f1c23f (diff) | |
download | gcc-adb0401dac41c81571722312d4586b2693f95aa6.zip gcc-adb0401dac41c81571722312d4586b2693f95aa6.tar.gz gcc-adb0401dac41c81571722312d4586b2693f95aa6.tar.bz2 |
Update Go library to r60.
From-SVN: r178910
Diffstat (limited to 'libgo/go/runtime/debug')
-rw-r--r-- | libgo/go/runtime/debug/stack.go | 2 | ||||
-rw-r--r-- | libgo/go/runtime/debug/stack_test.go | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/runtime/debug/stack.go b/libgo/go/runtime/debug/stack.go index e5fae63..a533a5c 100644 --- a/libgo/go/runtime/debug/stack.go +++ b/libgo/go/runtime/debug/stack.go @@ -52,7 +52,7 @@ func stack() []byte { if err != nil { continue } - lines = bytes.Split(data, []byte{'\n'}, -1) + lines = bytes.Split(data, []byte{'\n'}) lastFile = file } line-- // in stack trace, lines are 1-indexed but our array is 0-indexed diff --git a/libgo/go/runtime/debug/stack_test.go b/libgo/go/runtime/debug/stack_test.go index f4bdc46..94293bb 100644 --- a/libgo/go/runtime/debug/stack_test.go +++ b/libgo/go/runtime/debug/stack_test.go @@ -23,7 +23,7 @@ func (t T) method() []byte { Don't worry much about the base levels, but check the ones in our own package. /Users/r/go/src/pkg/runtime/debug/stack_test.go:15 (0x13878) - *T.ptrmethod: return Stack() + (*T).ptrmethod: return Stack() /Users/r/go/src/pkg/runtime/debug/stack_test.go:18 (0x138dd) T.method: return t.ptrmethod() /Users/r/go/src/pkg/runtime/debug/stack_test.go:23 (0x13920) @@ -35,12 +35,12 @@ func (t T) method() []byte { */ func TestStack(t *testing.T) { b := T(0).method() - lines := strings.Split(string(b), "\n", -1) + lines := strings.Split(string(b), "\n") if len(lines) <= 6 { t.Fatal("too few lines") } check(t, lines[0], "src/pkg/runtime/debug/stack_test.go") - check(t, lines[1], "\t*T.ptrmethod: return Stack()") + check(t, lines[1], "\t(*T).ptrmethod: return Stack()") check(t, lines[2], "src/pkg/runtime/debug/stack_test.go") check(t, lines[3], "\tT.method: return t.ptrmethod()") check(t, lines[4], "src/pkg/runtime/debug/stack_test.go") |