Commit b23096b5 authored by Hiroshi Ioka's avatar Hiroshi Ioka Committed by Ian Lance Taylor

debug/gosym: update docs for changes in Go 1.3

Change-Id: I850d961e0444f8d34284e994aee183afba35eaa7
Reviewed-on: https://go-review.googlesource.com/79597Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 73f284e2
...@@ -79,8 +79,8 @@ type Func struct { ...@@ -79,8 +79,8 @@ type Func struct {
Entry uint64 Entry uint64
*Sym *Sym
End uint64 End uint64
Params []*Sym Params []*Sym // nil for Go 1.3 and later binaries
Locals []*Sym Locals []*Sym // nil for Go 1.3 and later binaries
FrameSize int FrameSize int
LineTable *LineTable LineTable *LineTable
Obj *Obj Obj *Obj
...@@ -116,7 +116,7 @@ type Obj struct { ...@@ -116,7 +116,7 @@ type Obj struct {
// symbols decoded from the program and provides methods to translate // symbols decoded from the program and provides methods to translate
// between symbols, names, and addresses. // between symbols, names, and addresses.
type Table struct { type Table struct {
Syms []Sym Syms []Sym // nil for Go 1.3 and later binaries
Funcs []Func Funcs []Func
Files map[string]*Obj // nil for Go 1.2 and later binaries Files map[string]*Obj // nil for Go 1.2 and later binaries
Objs []Obj // nil for Go 1.2 and later binaries Objs []Obj // nil for Go 1.2 and later binaries
...@@ -277,8 +277,9 @@ func walksymtab(data []byte, fn func(sym) error) error { ...@@ -277,8 +277,9 @@ func walksymtab(data []byte, fn func(sym) error) error {
return nil return nil
} }
// NewTable decodes the Go symbol table in data, // NewTable decodes the Go symbol table (the ".gosymtab" section in ELF),
// returning an in-memory representation. // returning an in-memory representation.
// Starting with Go 1.3, the Go symbol table no longer includes symbol data.
func NewTable(symtab []byte, pcln *LineTable) (*Table, error) { func NewTable(symtab []byte, pcln *LineTable) (*Table, error) {
var n int var n int
err := walksymtab(symtab, func(s sym) error { err := walksymtab(symtab, func(s sym) error {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment