aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/debug/elf
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-07-12 10:19:11 -0400
committerRuss Cox <rsc@golang.org>2011-07-12 10:19:11 -0400
commitadfa87c5d754252f2bf428b38560de3d630dbe9d (patch)
treecb81d7f1dcdab05ba79e5e6e50a2364eee45fa4c /src/pkg/debug/elf
parentaf97a0b94c5196b13eddfff6663c916af789a599 (diff)
downloadgo-release.r58.1.tar.xz
[release-branch.r58] cgo: handle new Apple LLVM-based gcc from Xcode 4.2release.r58.1
««« CL 4607045 / 142f0bc0d6e7 cgo: handle new Apple LLVM-based gcc from Xcode 4.2 That gcc does not include enumerator names and values in its DWARF debug output. Create a data block from which we can read the values instead. Fixes #1881. R=iant CC=golang-dev https://golang.org/cl/4607045 »»» R=adg CC=golang-dev https://golang.org/cl/4708042
Diffstat (limited to 'src/pkg/debug/elf')
-rw-r--r--src/pkg/debug/elf/file.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/pkg/debug/elf/file.go b/src/pkg/debug/elf/file.go
index 9ae8b413d9..220ab94083 100644
--- a/src/pkg/debug/elf/file.go
+++ b/src/pkg/debug/elf/file.go
@@ -546,6 +546,12 @@ func (f *File) DWARF() (*dwarf.Data, os.Error) {
return dwarf.New(abbrev, nil, nil, info, nil, nil, nil, str)
}
+// Symbols returns the symbol table for f.
+func (f *File) Symbols() ([]Symbol, os.Error) {
+ sym, _, err := f.getSymbols(SHT_SYMTAB)
+ return sym, err
+}
+
type ImportedSymbol struct {
Name string
Version string