Namespace: go.std.debug.gosym
v1.0Contents
Summary
Provides a low-level interface to the debug/gosym package.
Package gosym implements access to the Go symbol
and line number tables embedded in Go binaries generated
by the gc compilers.
Index
- *DecodingError
- *Func
- *LineTable
- *Obj
- *Sym
- *Table
- *UnknownFileError
- *UnknownLineError
- DecodingError
- Func
- LineTable
- NewLineTable
- NewTable
- Obj
- Sym
- Table
- UnknownFileError
- UnknownLineError
- arrayOfDecodingError
- arrayOfFunc
- arrayOfLineTable
- arrayOfObj
- arrayOfSym
- arrayOfTable
- arrayOfUnknownFileError
- arrayOfUnknownLineError
Legend
-
Constant
Variable
Function
Macro
Special form
Type
GoVar
Receiver/Method
Constants
Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.-
(None.)
Variables
-
(None.)
Functions, Macros, and Special Forms
-
NewLineTable
Function v1.0(NewLineTable data text)
NewLineTable returns a new PC/line table
corresponding to the encoded data.
Text must be the start address of the
corresponding text segment.
Go input arguments: (data []byte, text uint64)
Go returns: *LineTable
Joker input arguments: [^arrayOfByte data, ^Number text]
Joker returns: ^*LineTable -
NewTable
Function v1.0(NewTable symtab pcln)
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.
Go input arguments: (symtab []byte, pcln *LineTable)
Go returns: (*Table, error)
Joker input arguments: [^arrayOfByte symtab, ^*LineTable pcln]
Joker returns: [^*Table, ^Error]
Types
-
*DecodingError
Concrete Type v1.0DecodingError represents an error during the decoding of
the symbol table.
-
Error
Receiver for *DecodingError v1.0([])
-
*Func
Concrete Type v1.0A Func collects information about a single function.
-
BaseName
Receiver for *Func v1.0([])
BaseName returns the symbol name without the package or receiver name.
-
PackageName
Receiver for *Func v1.0([])
PackageName returns the package part of the symbol name,
or the empty string if there is none.
-
ReceiverName
Receiver for *Func v1.0([])
ReceiverName returns the receiver type name of this symbol,
or the empty string if there is none. A receiver name is only detected in
the case that s.Name is fully-specified with a package name.
-
Static
Receiver for *Func v1.0([])
Static reports whether this symbol is static (not visible outside its file).
-
*LineTable
Concrete Type v1.0A LineTable is a data structure mapping program counters to line numbers.
In Go 1.1 and earlier, each function (represented by a Func) had its own LineTable,
and the line number corresponded to a numbering of all source lines in the
program, across all files. That absolute line number would then have to be
converted separately to a file name and line number within the file.
In Go 1.2, the format of the data changed so that there is a single LineTable
for the entire program, shared by all Funcs, and there are no absolute line
numbers, just line numbers within specific files.
For the most part, LineTable's methods should be treated as an internal
detail of the package; callers should use the methods on Table instead.
-
LineToPC
Receiver for *LineTable v1.0([line maxpc])
LineToPC returns the program counter for the given line number,
considering only program counters before maxpc.
Deprecated: Use Table's LineToPC method instead.
-
PCToLine
Receiver for *LineTable v1.0([pc])
PCToLine returns the line number for the given program counter.
Deprecated: Use Table's PCToLine method instead.
-
*Obj
Concrete Type v1.0An Obj represents a collection of functions in a symbol table.
The exact method of division of a binary into separate Objs is an internal detail
of the symbol table format.
In early versions of Go each source file became a different Obj.
In Go 1 and Go 1.1, each package produced one Obj for all Go sources
and one Obj per C source file.
In Go 1.2, there is a single Obj for the entire program.
-
*Sym
Concrete Type v1.0A Sym represents a single symbol table entry.
-
BaseName
Receiver for *Sym v1.0([])
BaseName returns the symbol name without the package or receiver name.
-
PackageName
Receiver for *Sym v1.0([])
PackageName returns the package part of the symbol name,
or the empty string if there is none.
-
ReceiverName
Receiver for *Sym v1.0([])
ReceiverName returns the receiver type name of this symbol,
or the empty string if there is none. A receiver name is only detected in
the case that s.Name is fully-specified with a package name.
-
Static
Receiver for *Sym v1.0([])
Static reports whether this symbol is static (not visible outside its file).
-
*Table
Concrete Type v1.0Table represents a Go symbol table. It stores all of the
symbols decoded from the program and provides methods to translate
between symbols, names, and addresses.
-
LineToPC
Receiver for *Table v1.0([file line])
LineToPC looks up the first program counter on the given line in
the named file. It returns UnknownPathError or UnknownLineError if
there is an error looking up this line.
-
LookupFunc
Receiver for *Table v1.0([name])
LookupFunc returns the text, data, or bss symbol with the given name,
or nil if no such symbol is found.
-
LookupSym
Receiver for *Table v1.0([name])
LookupSym returns the text, data, or bss symbol with the given name,
or nil if no such symbol is found.
-
PCToFunc
Receiver for *Table v1.0([pc])
PCToFunc returns the function containing the program counter pc,
or nil if there is no such function.
-
PCToLine
Receiver for *Table v1.0([pc])
PCToLine looks up line number information for a program counter.
If there is no information, it returns fn == nil.
-
SymByAddr
Receiver for *Table v1.0([addr])
SymByAddr returns the text, data, or bss symbol starting at the given address.
-
*UnknownFileError
Concrete Type v1.0UnknownFileError represents a failure to find the specific file in
the symbol table.
-
*UnknownLineError
Concrete Type v1.0UnknownLineError represents a failure to map a line to a program
counter, either because the line is beyond the bounds of the file
or because there is no code on the given line.
-
Error
Receiver for *UnknownLineError v1.0([])
-
DecodingError
Concrete Type v1.0DecodingError represents an error during the decoding of
the symbol table.
-
Func
Concrete Type v1.0A Func collects information about a single function.
-
BaseName
Receiver for Func v1.0([])
BaseName returns the symbol name without the package or receiver name.
-
PackageName
Receiver for Func v1.0([])
PackageName returns the package part of the symbol name,
or the empty string if there is none.
-
ReceiverName
Receiver for Func v1.0([])
ReceiverName returns the receiver type name of this symbol,
or the empty string if there is none. A receiver name is only detected in
the case that s.Name is fully-specified with a package name.
-
Static
Receiver for Func v1.0([])
Static reports whether this symbol is static (not visible outside its file).
-
LineTable
Concrete Type v1.0A LineTable is a data structure mapping program counters to line numbers.
In Go 1.1 and earlier, each function (represented by a Func) had its own LineTable,
and the line number corresponded to a numbering of all source lines in the
program, across all files. That absolute line number would then have to be
converted separately to a file name and line number within the file.
In Go 1.2, the format of the data changed so that there is a single LineTable
for the entire program, shared by all Funcs, and there are no absolute line
numbers, just line numbers within specific files.
For the most part, LineTable's methods should be treated as an internal
detail of the package; callers should use the methods on Table instead.
-
Obj
Concrete Type v1.0An Obj represents a collection of functions in a symbol table.
The exact method of division of a binary into separate Objs is an internal detail
of the symbol table format.
In early versions of Go each source file became a different Obj.
In Go 1 and Go 1.1, each package produced one Obj for all Go sources
and one Obj per C source file.
In Go 1.2, there is a single Obj for the entire program.
-
Sym
Concrete Type v1.0A Sym represents a single symbol table entry.
-
Table
Concrete Type v1.0Table represents a Go symbol table. It stores all of the
symbols decoded from the program and provides methods to translate
between symbols, names, and addresses.
-
UnknownFileError
Concrete Type v1.0UnknownFileError represents a failure to find the specific file in
the symbol table.
-
Error
Receiver for UnknownFileError v1.0([])
-
UnknownLineError
Concrete Type v1.0UnknownLineError represents a failure to map a line to a program
counter, either because the line is beyond the bounds of the file
or because there is no code on the given line.
-
arrayOfDecodingError
Concrete Type v1.0DecodingError represents an error during the decoding of
the symbol table.
-
arrayOfFunc
Concrete Type v1.0A Func collects information about a single function.
-
arrayOfLineTable
Concrete Type v1.0A LineTable is a data structure mapping program counters to line numbers.
In Go 1.1 and earlier, each function (represented by a Func) had its own LineTable,
and the line number corresponded to a numbering of all source lines in the
program, across all files. That absolute line number would then have to be
converted separately to a file name and line number within the file.
In Go 1.2, the format of the data changed so that there is a single LineTable
for the entire program, shared by all Funcs, and there are no absolute line
numbers, just line numbers within specific files.
For the most part, LineTable's methods should be treated as an internal
detail of the package; callers should use the methods on Table instead.
-
arrayOfObj
Concrete Type v1.0An Obj represents a collection of functions in a symbol table.
The exact method of division of a binary into separate Objs is an internal detail
of the symbol table format.
In early versions of Go each source file became a different Obj.
In Go 1 and Go 1.1, each package produced one Obj for all Go sources
and one Obj per C source file.
In Go 1.2, there is a single Obj for the entire program.
-
arrayOfSym
Concrete Type v1.0A Sym represents a single symbol table entry.
-
arrayOfTable
Concrete Type v1.0Table represents a Go symbol table. It stores all of the
symbols decoded from the program and provides methods to translate
between symbols, names, and addresses.
-
arrayOfUnknownFileError
Concrete Type v1.0UnknownFileError represents a failure to find the specific file in
the symbol table.
-
arrayOfUnknownLineError
Concrete Type v1.0UnknownLineError represents a failure to map a line to a program
counter, either because the line is beyond the bounds of the file
or because there is no code on the given line.