From adfa87c5d754252f2bf428b38560de3d630dbe9d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 12 Jul 2011 10:19:11 -0400 Subject: [release-branch.r58] cgo: handle new Apple LLVM-based gcc from Xcode 4.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ««« 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 --- src/pkg/debug/elf/file.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/pkg/debug/elf') 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 -- cgit v1.3