diff options
| author | Russ Cox <rsc@golang.org> | 2011-07-12 10:19:11 -0400 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2011-07-12 10:19:11 -0400 |
| commit | adfa87c5d754252f2bf428b38560de3d630dbe9d (patch) | |
| tree | cb81d7f1dcdab05ba79e5e6e50a2364eee45fa4c /src/pkg/debug | |
| parent | af97a0b94c5196b13eddfff6663c916af789a599 (diff) | |
| download | go-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')
| -rw-r--r-- | src/pkg/debug/dwarf/type.go | 4 | ||||
| -rw-r--r-- | src/pkg/debug/elf/file.go | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/pkg/debug/dwarf/type.go b/src/pkg/debug/dwarf/type.go index f9acf119f3..a33785b049 100644 --- a/src/pkg/debug/dwarf/type.go +++ b/src/pkg/debug/dwarf/type.go @@ -352,8 +352,8 @@ func (d *Data) Type(off Offset) (Type, os.Error) { } } if ndim == 0 { - err = DecodeError{"info", e.Offset, "missing dimension for array"} - goto Error + // LLVM generates this for x[]. + t.Count = -1 } case TagBaseType: 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 |
