]> Cypherpunks repositories - gostls13.git/commitdiff
debug/gosym: update docs for changes in Go 1.3
authorHiroshi Ioka <hirochachacha@gmail.com>
Thu, 23 Nov 2017 01:37:05 +0000 (10:37 +0900)
committerIan Lance Taylor <iant@golang.org>
Thu, 30 Nov 2017 22:49:27 +0000 (22:49 +0000)
Change-Id: I850d961e0444f8d34284e994aee183afba35eaa7
Reviewed-on: https://go-review.googlesource.com/79597
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/debug/gosym/symtab.go

index f5f996309509167bb8c40380c1510058eddc88c3..a995209934ffbbe4b171d8eec168d4f2b0fba67c 100644 (file)
@@ -79,8 +79,8 @@ type Func struct {
        Entry uint64
        *Sym
        End       uint64
-       Params    []*Sym
-       Locals    []*Sym
+       Params    []*Sym // nil for Go 1.3 and later binaries
+       Locals    []*Sym // nil for Go 1.3 and later binaries
        FrameSize int
        LineTable *LineTable
        Obj       *Obj
@@ -116,7 +116,7 @@ type Obj struct {
 // symbols decoded from the program and provides methods to translate
 // between symbols, names, and addresses.
 type Table struct {
-       Syms  []Sym
+       Syms  []Sym // nil for Go 1.3 and later binaries
        Funcs []Func
        Files map[string]*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 {
        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.
+// Starting with Go 1.3, the Go symbol table no longer includes symbol data.
 func NewTable(symtab []byte, pcln *LineTable) (*Table, error) {
        var n int
        err := walksymtab(symtab, func(s sym) error {