diff options
| author | Austin Clements <austin@google.com> | 2015-03-06 11:05:46 -0500 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2015-03-10 02:32:31 +0000 |
| commit | de1693f984d0ad720d72c58b2040d484357004ef (patch) | |
| tree | 3c538211a3500b73ce99953820fcb74f663f0bf8 /src/debug/macho | |
| parent | 29ad1ae420c6f8942d885e85a51382437ba2dc65 (diff) | |
| download | go-de1693f984d0ad720d72c58b2040d484357004ef.tar.xz | |
debug/macho, debug/pe: load DWARF line section and pass to dwarf.New
Change-Id: I1e6c6b3e2984528c0331e17755cc057e7199193e
Reviewed-on: https://go-review.googlesource.com/7071
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/debug/macho')
| -rw-r--r-- | src/debug/macho/file.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/debug/macho/file.go b/src/debug/macho/file.go index eefb744442..a7599aa5b2 100644 --- a/src/debug/macho/file.go +++ b/src/debug/macho/file.go @@ -472,9 +472,9 @@ func (f *File) Section(name string) *Section { // DWARF returns the DWARF debug information for the Mach-O file. 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"} + // are the ones the debug/dwarf package uses. + // Don't bother loading others. + var names = [...]string{"abbrev", "info", "line", "str"} var dat [len(names)][]byte for i, name := range names { name = "__debug_" + name @@ -489,8 +489,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 |
