Documentation
¶
Index ¶
- Constants
- type Integer
- type RegScanner
- type SafeELFFile
- func (se *SafeELFFile) Address(name string) (uint64, error)
- func (se *SafeELFFile) Offset(name string) (uint64, error)
- func (se *SafeELFFile) OffsetFromAddr(addr uint64) (uint64, error)
- func (se *SafeELFFile) ProgByVaddr(vaddr uint64) *elf.Prog
- func (se *SafeELFFile) SectionsByName(name string) []*elf.Section
- func (se *SafeELFFile) SectionsByType(typ elf.SectionType) []*elf.Section
- func (se *SafeELFFile) UsdtTargets() ([]*UsdtTarget, error)
- type UsdtArg
- type UsdtArgType
- type UsdtSpec
- type UsdtTarget
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Integer ¶ added in v1.6.0
type Integer interface {
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr
}
Integer represents all possible integer types. Remove when x/exp/constraints is moved to the standard library.
type RegScanner ¶ added in v1.6.0
type RegScanner struct {
// contains filtered or unexported fields
}
func (*RegScanner) Reset ¶ added in v1.6.0
func (sc *RegScanner) Reset() *RegScanner
type SafeELFFile ¶
func NewSafeELFFile ¶
func NewSafeELFFile(r io.ReaderAt) (safe *SafeELFFile, err error)
NewSafeELFFile reads an ELF safely.
Any panic during parsing is turned into an error. This is necessary since there are a bunch of unfixed bugs in debug/elf.
https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+debug%2Felf+in%3Atitle
func OpenSafeELFFile ¶
func OpenSafeELFFile(path string) (safe *SafeELFFile, err error)
OpenSafeELFFile reads an ELF from a file.
It works like NewSafeELFFile, with the exception that safe.Close will close the underlying file.
func (*SafeELFFile) Address ¶ added in v1.6.0
func (se *SafeELFFile) Address(name string) (uint64, error)
func (*SafeELFFile) OffsetFromAddr ¶ added in v1.6.0
func (se *SafeELFFile) OffsetFromAddr(addr uint64) (uint64, error)
func (*SafeELFFile) ProgByVaddr ¶ added in v1.6.0
func (se *SafeELFFile) ProgByVaddr(vaddr uint64) *elf.Prog
ProgByVaddr returns elf program header for the specified vaddr.
func (*SafeELFFile) SectionsByName ¶ added in v1.6.0
func (se *SafeELFFile) SectionsByName(name string) []*elf.Section
SectionsByName returns all sections in the file with the specified section name.
func (*SafeELFFile) SectionsByType ¶ added in v1.6.0
func (se *SafeELFFile) SectionsByType(typ elf.SectionType) []*elf.Section
SectionsByType returns all sections in the file with the specified section type.
func (*SafeELFFile) UsdtTargets ¶ added in v1.6.0
func (se *SafeELFFile) UsdtTargets() ([]*UsdtTarget, error)
type UsdtArgType ¶ added in v1.6.0
type UsdtArgType int