Versions in this module Expand all Collapse all v1 v1.1.0 Aug 16, 2018 Changes in this version + const GNUFlavour + const Gcopystack + const Gdead + const Genqueue + const Gidle + const GmoribundUnused + const GoFlavour + const Grunnable + const Grunning + const Gsyscall + const Gwaiting + const IntelFlavour + const UnrecoveredPanic + var ErrFuncCallInProgress = errors.New("cannot call function while another function call is already in progress") + var ErrFuncCallUnsupported = errors.New("function calls not supported by this version of Go") + var ErrFuncCallUnsupportedBackend = errors.New("backend does not support function calls") + var ErrGoroutineNotRunning = errors.New("selected goroutine not running") + var ErrNoAddrUnsupported = errors.New("arguments to a function call must have an address") + var ErrNoGoroutine = errors.New("no goroutine selected") + var ErrNotACallExpr = errors.New("not a function call") + var ErrNotAGoFunction = errors.New("not a Go function") + var ErrNotEnoughArguments = errors.New("not enough arguments") + var ErrNotEnoughStack = errors.New("not enough stack space") + var ErrTooManyArguments = errors.New("too many arguments") + var NotExecutableErr = errors.New("not an executable file") + var NotRecordedErr = errors.New("not a recording") + var OperationOnSpecialFloatError = errors.New("operations on non-finite floats not implemented") + var UnknownRegisterError = errors.New("unknown register") + var UnsupportedDarwinArchErr = errors.New("unsupported architecture - only darwin/amd64 is supported") + var UnsupportedLinuxArchErr = errors.New("unsupported architecture - only linux/amd64 is supported") + var UnsupportedWindowsArchErr = errors.New("unsupported architecture of windows/386 - only windows/amd64 is supported") + func CallFunction(p Process, expr string, retLoadCfg *LoadConfig) error + func Continue(dbp Process) error + func CreateUnrecoveredPanicBreakpoint(p Process, writeBreakpoint writeBreakpointFn, breakpoints *BreakpointMap) + func FindFileLocation(p Process, fileName string, lineno int) (uint64, error) + func FindFunctionLocation(p Process, funcName string, firstLine bool, lineOffset int) (uint64, error) + func FirstPCAfterPrologue(p Process, fn *Function, sameline bool) (uint64, error) + func GetDwarfRegister(regs Registers, i int) []byte — darwin/amd64, linux/amd64, windows/amd64 + func LinuxX86XstateRead(xstateargs []byte, readLegacy bool, regset *LinuxX86Xstate) error + func Next(dbp Process) (err error) + func SameGoroutineCondition(g *G) ast.Expr + func Step(dbp Process) (err error) + func StepOut(dbp Process) error + type AMD64 struct + func AMD64Arch(goos string) *AMD64 + func (a *AMD64) BreakpointInstruction() []byte + func (a *AMD64) BreakpointSize() int + func (a *AMD64) DerefTLS() bool + func (a *AMD64) FixFrameUnwindContext(fctxt *frame.FrameContext, pc uint64, bi *BinaryInfo) *frame.FrameContext + func (a *AMD64) GoroutineToDwarfRegisters(g *G) op.DwarfRegisters + func (a *AMD64) PtrSize() int + func (a *AMD64) RegSize(regnum uint64) int + func (a *AMD64) RegistersToDwarfRegisters(regs Registers) op.DwarfRegisters + type Arch interface + BreakpointInstruction func() []byte + BreakpointSize func() int + DerefTLS func() bool + FixFrameUnwindContext func(fctxt *frame.FrameContext, pc uint64, bi *BinaryInfo) *frame.FrameContext + GoroutineToDwarfRegisters func(*G) op.DwarfRegisters + PtrSize func() int + RegSize func(uint64) int + RegistersToDwarfRegisters func(Registers) op.DwarfRegisters + type ArchInst x86asm.Inst — darwin/amd64, linux/amd64, windows/amd64 + func (inst *ArchInst) Size() int + type AsmInstruction struct + AtPC bool + Breakpoint bool + Bytes []byte + DestLoc *Location + Inst *ArchInst + Loc Location + func Disassemble(dbp Process, g *G, startPC, endPC uint64) ([]AsmInstruction, error) + func (inst *AsmInstruction) IsCall() bool + func (inst *AsmInstruction) Text(flavour AssemblyFlavour, bi *BinaryInfo) string + type AssemblyFlavour int + type BinaryInfo struct + Arch Arch + Functions []Function + GOOS string + LookupFunc map[string]*Function + Sources []string + func NewBinaryInfo(goos, goarch string) BinaryInfo + func (bi *BinaryInfo) AllPCsForFileLine(filename string, lineno int) []uint64 + func (bi *BinaryInfo) Close() error + func (bi *BinaryInfo) DwarfReader() *reader.Reader + func (bi *BinaryInfo) GStructOffset() uint64 + func (bi *BinaryInfo) LastModified() time.Time + func (bi *BinaryInfo) LineToPC(filename string, lineno int) (pc uint64, fn *Function, err error) + func (bi *BinaryInfo) LoadBinaryInfoElf(path string, wg *sync.WaitGroup) error + func (bi *BinaryInfo) LoadBinaryInfoMacho(path string, wg *sync.WaitGroup) error + func (bi *BinaryInfo) LoadBinaryInfoPE(path string, wg *sync.WaitGroup) error + func (bi *BinaryInfo) LoadError() error + func (bi *BinaryInfo) LoadFromData(dwdata *dwarf.Data, debugFrameBytes, debugLineBytes, debugLocBytes []byte) + func (bi *BinaryInfo) Location(entry reader.Entry, attr dwarf.Attr, pc uint64, regs op.DwarfRegisters) (int64, []op.Piece, string, error) + func (bi *BinaryInfo) PCToFunc(pc uint64) *Function + func (bi *BinaryInfo) PCToLine(pc uint64) (string, int, *Function) + func (bi *BinaryInfo) Producer() string + func (bi *BinaryInfo) Type(offset dwarf.Offset) (godwarf.Type, error) + func (bi *BinaryInfo) Types() ([]string, error) + func (bininfo *BinaryInfo) LoadBinaryInfo(path string, wg *sync.WaitGroup) error + type Breakpoint struct + Addr uint64 + Cond ast.Expr + DeferReturns []uint64 + File string + FunctionName string + Goroutine bool + HitCount map[int]uint64 + ID int + Kind BreakpointKind + Line int + LoadArgs *LoadConfig + LoadLocals *LoadConfig + Name string + OriginalData []byte + Stacktrace int + TotalHitCount uint64 + Tracepoint bool + Variables []string + func (bp *Breakpoint) CheckCondition(thread Thread) BreakpointState + func (bp *Breakpoint) IsInternal() bool + func (bp *Breakpoint) IsUser() bool + func (bp *Breakpoint) String() string + type BreakpointExistsError struct + Addr uint64 + File string + Line int + func (bpe BreakpointExistsError) Error() string + type BreakpointKind uint16 + const NextBreakpoint + const NextDeferBreakpoint + const StepBreakpoint + const UserBreakpoint + type BreakpointManipulation interface + Breakpoints func() *BreakpointMap + ClearBreakpoint func(addr uint64) (*Breakpoint, error) + ClearInternalBreakpoints func() error + SetBreakpoint func(addr uint64, kind BreakpointKind, cond ast.Expr) (*Breakpoint, error) + type BreakpointMap struct + M map[uint64]*Breakpoint + func NewBreakpointMap() BreakpointMap + func (bpmap *BreakpointMap) Clear(addr uint64, clearBreakpoint clearBreakpointFn) (*Breakpoint, error) + func (bpmap *BreakpointMap) ClearInternalBreakpoints(clearBreakpoint clearBreakpointFn) error + func (bpmap *BreakpointMap) HasInternalBreakpoints() bool + func (bpmap *BreakpointMap) ResetBreakpointIDCounter() + func (bpmap *BreakpointMap) Set(addr uint64, kind BreakpointKind, cond ast.Expr, ...) (*Breakpoint, error) + func (bpmap *BreakpointMap) SetWithID(id int, addr uint64, writeBreakpoint writeBreakpointFn) (*Breakpoint, error) + type BreakpointState struct + Active bool + CondError error + Internal bool + func (bpstate *BreakpointState) Clear() + func (bpstate *BreakpointState) String() string + type Checkpoint struct + ID int + When string + Where string + type CommonProcess struct + func NewCommonProcess(fncallEnabled bool) CommonProcess + func (p *CommonProcess) ClearAllGCache() + type CommonThread struct + func (t *CommonThread) ReturnValues(cfg LoadConfig) []*Variable + type Defer struct + DeferPC uint64 + DeferredPC uint64 + SP uint64 + Unreadable error + func (d *Defer) Next() *Defer + type Direction int8 + const Backward + const Forward + type EvalScope struct + BinInfo *BinaryInfo + Gvar *Variable + Mem MemoryReadWriter + Regs op.DwarfRegisters + func ConvertEvalScope(dbp Process, gid, frame int) (*EvalScope, error) + func FrameToScope(bi *BinaryInfo, thread MemoryReadWriter, g *G, frames ...Stackframe) *EvalScope + func GoroutineScope(thread Thread) (*EvalScope, error) + func ThreadScope(thread Thread) (*EvalScope, error) + func (scope *EvalScope) DwarfReader() *reader.Reader + func (scope *EvalScope) EvalExpression(expr string, cfg LoadConfig) (*Variable, error) + func (scope *EvalScope) EvalVariable(name string, cfg LoadConfig) (*Variable, error) + func (scope *EvalScope) FunctionArguments(cfg LoadConfig) ([]*Variable, error) + func (scope *EvalScope) LocalVariables(cfg LoadConfig) ([]*Variable, error) + func (scope *EvalScope) Locals() ([]*Variable, error) + func (scope *EvalScope) PackageVariables(cfg LoadConfig) ([]*Variable, error) + func (scope *EvalScope) PtrSize() int + func (scope *EvalScope) SetVariable(name, value string) error + type FloatSpecial uint8 + const FloatIsNaN + const FloatIsNegInf + const FloatIsNormal + const FloatIsPosInf + type Function struct + End uint64 + Entry uint64 + Name string + func (fn *Function) BaseName() string + func (fn *Function) Optimized() bool + func (fn *Function) PackageName() string + func (fn *Function) ReceiverName() string + type FunctionNotFoundError struct + FuncName string + func (err *FunctionNotFoundError) Error() string + type G struct + BP uint64 + CurrentLoc Location + GoPC uint64 + ID int + PC uint64 + SP uint64 + StartPC uint64 + Status uint64 + SystemStack bool + Thread Thread + WaitReason string + func FindGoroutine(dbp Process, gid int) (*G, error) + func GetG(thread Thread) (*G, error) + func GoroutinesInfo(dbp Process) ([]*G, error) + func (g *G) Defer() *Defer + func (g *G) Go() Location + func (g *G) Stacktrace(depth int, readDefers bool) ([]Stackframe, error) + func (g *G) StartLoc() Location + func (g *G) UserCurrent() Location + type GoroutineInfo interface + SelectedGoroutine func() *G + type Info interface + BinInfo func() *BinaryInfo + Common func() *CommonProcess + Pid func() int + ResumeNotify func(chan<- struct{}) + Valid func() (bool, error) + type InvalidAddressError struct + Address uint64 + func (iae InvalidAddressError) Error() string + type IsNilErr struct + func (err *IsNilErr) Error() string + type LinuxX86Xstate struct + AvxState bool + Xsave []byte + YmmSpace [256]byte + func (xsave *LinuxX86Xstate) Decode() (regs []Register) + type LoadConfig struct + FollowPointers bool + MaxArrayValues int + MaxStringLen int + MaxStructFields int + MaxVariableRecurse int + type Location struct + File string + Fn *Function + Line int + PC uint64 + type MemoryReadWriter interface + WriteMemory func(addr uintptr, data []byte) (written int, err error) + func DereferenceMemory(mem MemoryReadWriter) MemoryReadWriter + type MemoryReader interface + ReadMemory func(buf []byte, addr uintptr) (n int, err error) + type NoBreakpointError struct + Addr uint64 + func (nbp NoBreakpointError) Error() string + type NoBuildIdNoteError struct + func (e *NoBuildIdNoteError) Error() string + type NoGError struct + func (ng NoGError) Error() string + type NoSourceForPCError struct + func (err *NoSourceForPCError) Error() string + type NullAddrError struct + func (n NullAddrError) Error() string + type Process interface + type ProcessDetachedError struct + func (pe ProcessDetachedError) Error() string + type ProcessExitedError struct + Pid int + Status int + func (pe ProcessExitedError) Error() string + type ProcessManipulation interface + CheckAndClearManualStopRequest func() bool + ContinueOnce func() (trapthread Thread, err error) + Detach func(bool) error + RequestManualStop func() error + StepInstruction func() error + SwitchGoroutine func(int) error + SwitchThread func(int) error + type PtraceFpRegs struct + Cwd uint16 + Fop uint16 + Ftw uint16 + MxcrMask uint32 + Mxcsr uint32 + Padding [24]uint32 + Rdp uint64 + Rip uint64 + StSpace [32]uint32 + Swd uint16 + XmmSpace [256]byte + type RecordingManipulation interface + Checkpoint func(where string) (id int, err error) + Checkpoints func() ([]Checkpoint, error) + ClearCheckpoint func(id int) error + Direction func(Direction) error + Recorded func() (recorded bool, tracedir string) + Restart func(pos string) error + When func() (string, error) + type Register struct + Bytes []byte + Name string + Value string + func AppendDwordReg(regs []Register, name string, value uint32) []Register + func AppendEflagReg(regs []Register, name string, value uint64) []Register + func AppendMxcsrReg(regs []Register, name string, value uint64) []Register + func AppendQwordReg(regs []Register, name string, value uint64) []Register + func AppendSSEReg(regs []Register, name string, xmm []byte) []Register + func AppendWordReg(regs []Register, name string, value uint16) []Register + func AppendX87Reg(regs []Register, index int, exponent uint16, mantissa uint64) []Register + type Registers interface + BP func() uint64 + CX func() uint64 + GAddr func() (uint64, bool) + Get func(int) (uint64, error) + PC func() uint64 + SP func() uint64 + Save func() SavedRegisters + Slice func() []Register + TLS func() uint64 + type SavedRegisters interface + type Stackframe struct + Call Location + Current Location + Defers []*Defer + Err error + Inlined bool + Regs op.DwarfRegisters + Ret uint64 + SystemStack bool + TopmostDefer *Defer + func ThreadStacktrace(thread Thread, depth int) ([]Stackframe, error) + func (frame *Stackframe) FrameOffset() int64 + func (frame *Stackframe) FramePointerOffset() int64 + type Thread interface + Arch func() Arch + BinInfo func() *BinaryInfo + Blocked func() bool + Breakpoint func() BreakpointState + Common func() *CommonThread + Location func() (*Location, error) + Registers func(floatingPoint bool) (Registers, error) + RestoreRegisters func(SavedRegisters) error + SetCurrentBreakpoint func() error + SetDX func(uint64) error + SetPC func(uint64) error + SetSP func(uint64) error + StepInstruction func() error + ThreadID func() int + type ThreadBlockedError struct + func (tbe ThreadBlockedError) Error() string + type ThreadInfo interface + CurrentThread func() Thread + FindThread func(threadID int) (Thread, bool) + ThreadList func() []Thread + type Variable struct + Addr uintptr + Base uintptr + Cap int64 + Children []Variable + DeclLine int64 + DwarfType godwarf.Type + Flags VariableFlags + FloatSpecial FloatSpecial + Kind reflect.Kind + Len int64 + LocationExpr string + Name string + OnlyAddr bool + RealType godwarf.Type + Unreadable error + Value constant.Value + func (v *Variable) ConstDescr() string + func (v *Variable) TypeString() string + type VariableFlags uint16 + const VariableArgument + const VariableConstant + const VariableEscaped + const VariableReturnArgument + const VariableShadowed