aboutsummaryrefslogtreecommitdiff
path: root/src/debug/elf
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2015-03-04 11:04:26 -0500
committerAustin Clements <austin@google.com>2015-03-10 02:32:25 +0000
commit29ad1ae420c6f8942d885e85a51382437ba2dc65 (patch)
treec814e2980d12e7302793a94032d929c7da5b9a7e /src/debug/elf
parent4ee347b0ad1e0aa7c917138dd623cffa9b68ebbf (diff)
downloadgo-29ad1ae420c6f8942d885e85a51382437ba2dc65.tar.xz
debug/elf: load .debug_line section and pass to dwarf.New
Change-Id: Ia6f9bd77a3d4250339dcb054edc76942864dd358 Reviewed-on: https://go-review.googlesource.com/6781 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/debug/elf')
-rw-r--r--src/debug/elf/file.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug/elf/file.go b/src/debug/elf/file.go
index 9f5d5527f3..b2174d4277 100644
--- a/src/debug/elf/file.go
+++ b/src/debug/elf/file.go
@@ -749,9 +749,9 @@ 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 dat = map[string][]byte{"abbrev": nil, "info": nil, "str": nil}
+ // are the ones the debug/dwarf package uses.
+ // Don't bother loading others.
+ var dat = map[string][]byte{"abbrev": nil, "info": nil, "str": nil, "line": nil}
for i, s := range f.Sections {
if !strings.HasPrefix(s.Name, ".debug_") {
continue
@@ -766,7 +766,7 @@ func (f *File) DWARF() (*dwarf.Data, error) {
dat[s.Name[7:]] = b
}
- d, err := dwarf.New(dat["abbrev"], nil, nil, dat["info"], nil, nil, nil, dat["str"])
+ d, err := dwarf.New(dat["abbrev"], nil, nil, dat["info"], dat["line"], nil, nil, dat["str"])
if err != nil {
return nil, err
}