summaryrefslogtreecommitdiffstats
path: root/libgo/go/runtime/debug
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-16 15:47:21 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2011-09-16 15:47:21 +0000
commit49b4e44b7d540fa846d353b10237848a67789cbf (patch)
treeea2b52e3c258d6b6d9356977c683c7f72a4a5fd5 /libgo/go/runtime/debug
parent82ceb8f6a88a0193971f53e0571e017f2764f7d7 (diff)
downloadppe42-gcc-49b4e44b7d540fa846d353b10237848a67789cbf.tar.gz
ppe42-gcc-49b4e44b7d540fa846d353b10237848a67789cbf.zip
Update Go library to r60.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/runtime/debug')
-rw-r--r--libgo/go/runtime/debug/stack.go2
-rw-r--r--libgo/go/runtime/debug/stack_test.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/libgo/go/runtime/debug/stack.go b/libgo/go/runtime/debug/stack.go
index e5fae632b13..a533a5c3bf4 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 f4bdc46244f..94293bb934b 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")
OpenPOWER on IntegriCloud