summaryrefslogtreecommitdiffstats
path: root/libgo/go/debug/macho
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-07 01:16:20 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-07 01:16:20 +0000
commita2fe6cb095bbd0d5fe68a33b1faa9f6e417a2401 (patch)
tree28d4e50a31f7428050763b36e3c7bbdeeb541a0f /libgo/go/debug/macho
parent7070a9f28245b3378b8e8eb36a61b1e6c30586ad (diff)
downloadppe42-gcc-a2fe6cb095bbd0d5fe68a33b1faa9f6e417a2401.tar.gz
ppe42-gcc-a2fe6cb095bbd0d5fe68a33b1faa9f6e417a2401.zip
libgo: Implement and use runtime.Caller, runtime.Func.FileLine.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185025 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/debug/macho')
-rw-r--r--libgo/go/debug/macho/file.go6
-rw-r--r--libgo/go/debug/macho/file_test.go3
2 files changed, 5 insertions, 4 deletions
diff --git a/libgo/go/debug/macho/file.go b/libgo/go/debug/macho/file.go
index fa73a315c77..6577803a075 100644
--- a/libgo/go/debug/macho/file.go
+++ b/libgo/go/debug/macho/file.go
@@ -467,7 +467,7 @@ func (f *File) DWARF() (*dwarf.Data, error) {
// There are many other DWARF sections, but these
// are the required ones, and the debug/dwarf package
// does not use the others, so don't bother loading them.
- var names = [...]string{"abbrev", "info", "str"}
+ var names = [...]string{"abbrev", "info", "line", "str"}
var dat [len(names)][]byte
for i, name := range names {
name = "__debug_" + name
@@ -482,8 +482,8 @@ func (f *File) DWARF() (*dwarf.Data, error) {
dat[i] = b
}
- abbrev, info, str := dat[0], dat[1], dat[2]
- return dwarf.New(abbrev, nil, nil, info, nil, nil, nil, str)
+ abbrev, info, line, str := dat[0], dat[1], dat[2], dat[3]
+ return dwarf.New(abbrev, nil, nil, info, line, nil, nil, str)
}
// ImportedSymbols returns the names of all symbols
diff --git a/libgo/go/debug/macho/file_test.go b/libgo/go/debug/macho/file_test.go
index 640225b3291..ecc6f68a947 100644
--- a/libgo/go/debug/macho/file_test.go
+++ b/libgo/go/debug/macho/file_test.go
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package macho
+package macho_test
import (
+ . "debug/macho"
"reflect"
"testing"
)
OpenPOWER on IntegriCloud