diff options
| author | Austin Clements <aclements@csail.mit.edu> | 2009-09-25 09:39:08 -0700 |
|---|---|---|
| committer | Austin Clements <aclements@csail.mit.edu> | 2009-09-25 09:39:08 -0700 |
| commit | 4211384976c55f326671253c8d25d1be01fa8f23 (patch) | |
| tree | 3953c656d29f7babbcd97c70bb9be9f5e650f74f /src/pkg/debug | |
| parent | 60098a41fb9c6781c4f17067187ba42d848d41c5 (diff) | |
| download | go-4211384976c55f326671253c8d25d1be01fa8f23.tar.xz | |
Switch ogle to in-tree gosym package. Delete my private sym
package. If a Sym is a function symbol, include a reference
to the Func so it's easily accessible when you're traversing
the list of all symbols. This diff is more interesting than
the proc switch because the gosym interface differs from the
old sym interface.
R=rsc
APPROVED=rsc
DELTA=1957 (34 added, 1868 deleted, 55 changed)
OCL=34969
CL=35008
Diffstat (limited to 'src/pkg/debug')
| -rw-r--r-- | src/pkg/debug/gosym/symtab.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pkg/debug/gosym/symtab.go b/src/pkg/debug/gosym/symtab.go index ece74f19d5..b531db6e06 100644 --- a/src/pkg/debug/gosym/symtab.go +++ b/src/pkg/debug/gosym/symtab.go @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. - // Package gosym implements access to the Go symbol // and line number tables embedded in Go binaries generated // by the gc compilers. @@ -31,6 +30,8 @@ type Sym struct { Type byte; Name string; GoType uint64; + // If this symbol if a function symbol, the corresponding Func + Func *Func; } // Static returns whether this symbol is static (not visible outside its file). @@ -287,6 +288,7 @@ func NewTable(symtab []byte, pcln *LineTable) (*Table, os.Error) { n := len(t.Funcs); t.Funcs = t.Funcs[0:n+1]; fn := &t.Funcs[n]; + sym.Func = fn; fn.Params = make([]*Sym, 0, np); fn.Locals = make([]*Sym, 0, na); fn.Sym = sym; |
