Versions in this module Expand all Collapse all v0 v0.12.2 Apr 13, 2017 Changes in this version + const GNUFlavour + const Gcopystack + const Gdead + const Genqueue + const Gidle + const GmoribundUnused + const Grunnable + const Grunning + const Gsyscall + const Gwaiting + const IntelFlavour + const StatusRunning — linux/amd64 + const StatusSleeping — linux/amd64 + const StatusTraceStop — linux/amd64 + const StatusTraceStopT — linux/amd64 + const StatusZombie — linux/amd64 + var ErrContinueThread = fmt.Errorf("could not continue thread") — darwin/amd64 + var GoVer18Beta = GoVersion + var NotExecutableErr = errors.New("not an executable file") + 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 PtraceAttach(pid int) error — darwin/amd64, linux/amd64, windows/amd64 + func PtraceCont(tid, sig int) error — darwin/amd64, linux/amd64 + func PtraceDetach(tid, sig int) error — darwin/amd64, linux/amd64, windows/amd64 + func PtracePeekUser(tid int, off uintptr) (uintptr, error) — linux/amd64 + func PtracePokeUser(tid int, off, addr uintptr) error — linux/amd64 + func PtraceSingleStep(tid int) error — darwin/amd64, linux/amd64 + type AMD64 struct + func AMD64Arch(goos string) *AMD64 + func (a *AMD64) BreakpointInstruction() []byte + func (a *AMD64) BreakpointSize() int + func (a *AMD64) GStructOffset() uint64 + func (a *AMD64) PtrSize() int + func (a *AMD64) SetGStructOffset(ver GoVersion, isextld bool) + type Arch interface + BreakpointInstruction func() []byte + BreakpointSize func() int + GStructOffset func() uint64 + PtrSize func() int + SetGStructOffset func(ver GoVersion, iscgo bool) + 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 (inst *AsmInstruction) IsCall() bool + func (inst *AsmInstruction) Text(flavour AssemblyFlavour) string + type AssemblyFlavour int + type BinaryInfo struct + func NewBinaryInfo(goos, goarch string) BinaryInfo + func (bi *BinaryInfo) Close() error + func (bi *BinaryInfo) DwarfReader() *reader.Reader + func (bi *BinaryInfo) Funcs() []gosym.Func + func (bi *BinaryInfo) LastModified() time.Time + 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) PCToLine(pc uint64) (string, int, *gosym.Func) + func (bi *BinaryInfo) Sources() map[string]*gosym.Obj + 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) Clear(thread *Thread) (*Breakpoint, error) + func (bp *Breakpoint) Internal() bool + func (bp *Breakpoint) String() string + type BreakpointExistsError struct + func (bpe BreakpointExistsError) Error() string + type BreakpointKind int + const NextBreakpoint + const NextDeferBreakpoint + const StepBreakpoint + const UserBreakpoint + type EvalScope struct + CFA int64 + PC uint64 + Thread *Thread + 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) PackageVariables(cfg LoadConfig) ([]*Variable, error) + func (scope *EvalScope) PtrSize() int + func (scope *EvalScope) SetVariable(name, value string) error + func (scope *EvalScope) Type(offset dwarf.Offset) (dwarf.Type, error) + type FloatSpecial uint8 + const FloatIsNaN + const FloatIsNegInf + const FloatIsNormal + const FloatIsPosInf + type G struct + CurrentLoc Location + GoPC uint64 + ID int + PC uint64 + SP uint64 + Status uint64 + WaitReason string + func (g *G) ChanRecvBlocked() bool + func (g *G) DeferPC() uint64 + func (g *G) Go() Location + func (g *G) Stacktrace(depth int) ([]Stackframe, error) + func (g *G) Thread() *Thread + func (g *G) UserCurrent() Location + type GoVersion struct + Beta int + Major int + Minor int + RC int + Rev int + func ParseVersionString(ver string) (GoVersion, bool) + func (v *GoVersion) AfterOrEqual(b GoVersion) bool + func (v *GoVersion) IsDevel() bool + type InvalidAddressError struct + func (iae InvalidAddressError) Error() string + type IsNilErr struct + func (err *IsNilErr) Error() string + type LoadConfig struct + FollowPointers bool + MaxArrayValues int + MaxStringLen int + MaxStructFields int + MaxVariableRecurse int + type Location struct + File string + Fn *gosym.Func + Line int + PC uint64 + type M struct + type NoBreakpointError struct + func (nbp NoBreakpointError) Error() string + type NoGError struct + func (ng NoGError) Error() string + type NoReturnAddr struct + func (nra NoReturnAddr) Error() string + type NullAddrError struct + func (n NullAddrError) Error() string + type OSProcessDetails struct — darwin/amd64, linux/amd64, windows/amd64 + type OSSpecificDetails struct — darwin/amd64, linux/amd64, windows/amd64 + type Process struct + Process *os.Process + func Attach(pid int) (*Process, error) + func Launch(cmd []string, wd string) (*Process, error) + func New(pid int) *Process + func (dbp *Process) BinInfo() *BinaryInfo + func (dbp *Process) Breakpoints() map[uint64]*Breakpoint + func (dbp *Process) ClearBreakpoint(addr uint64) (*Breakpoint, error) + func (dbp *Process) ClearInternalBreakpoints() error + func (dbp *Process) Continue() error + func (dbp *Process) ConvertEvalScope(gid, frame int) (*EvalScope, error) + func (dbp *Process) CurrentBreakpoint() *Breakpoint + func (dbp *Process) CurrentLocation() (*Location, error) + func (dbp *Process) CurrentThread() *Thread + func (dbp *Process) Detach(kill bool) (err error) + func (dbp *Process) EvalPackageVariable(name string, cfg LoadConfig) (*Variable, error) + func (dbp *Process) Exited() bool + func (dbp *Process) FindBreakpoint(pc uint64) (*Breakpoint, bool) + func (dbp *Process) FindBreakpointByID(id int) (*Breakpoint, bool) + func (dbp *Process) FindFileLocation(fileName string, lineno int) (uint64, error) + func (dbp *Process) FindFunctionLocation(funcName string, firstLine bool, lineOffset int) (uint64, error) + func (dbp *Process) FindGoroutine(gid int) (*G, error) + func (dbp *Process) FirstPCAfterPrologue(fn *gosym.Func, sameline bool) (uint64, error) + func (dbp *Process) GoroutineLocation(g *G) *Location + func (dbp *Process) GoroutinesInfo() ([]*G, error) + func (dbp *Process) Halt() (err error) + func (dbp *Process) Kill() (err error) + func (dbp *Process) Kill() error + func (dbp *Process) LoadInformation(path string) error + func (dbp *Process) Next() (err error) + func (dbp *Process) PC() (uint64, error) + func (dbp *Process) Pid() int + func (dbp *Process) Registers() (Registers, error) + func (dbp *Process) RequestManualStop() error + func (dbp *Process) Running() bool + func (dbp *Process) SelectedGoroutine() *G + func (dbp *Process) SetBreakpoint(addr uint64, kind BreakpointKind, cond ast.Expr) (*Breakpoint, error) + func (dbp *Process) Status() *WaitStatus + func (dbp *Process) Step() (err error) + func (dbp *Process) StepInstruction() (err error) + func (dbp *Process) StepOut() error + func (dbp *Process) SwitchGoroutine(gid int) error + func (dbp *Process) SwitchThread(tid int) error + func (dbp *Process) Threads() map[int]*Thread + type ProcessExitedError struct + Pid int + Status int + func (pe ProcessExitedError) Error() string + type PtraceFpRegs struct — linux/amd64 + Cwd uint16 + Fop uint16 + Ftw uint16 + MxcrMask uint32 + Mxcsr uint32 + Rdp uint64 + Rip uint64 + StSpace [32]uint32 + Swd uint16 + XmmSpace [256]byte + type PtraceXsave struct — linux/amd64 + AvxState bool + YmmSpace [256]byte + func PtraceGetRegset(tid int) (regset PtraceXsave, err error) + type Register struct + Name string + Value string + type Registers interface + BP func() uint64 + CX func() uint64 + Get func(int) (uint64, error) + PC func() uint64 + SP func() uint64 + SetPC func(*Thread, uint64) error + Slice func() []Register + TLS func() uint64 + type Regs struct — darwin/amd64, linux/amd64, windows/amd64 + func (r *Regs) BP() uint64 + func (r *Regs) CX() uint64 + func (r *Regs) Get(n int) (uint64, error) + func (r *Regs) PC() uint64 + func (r *Regs) SP() uint64 + func (r *Regs) SetPC(thread *Thread, pc uint64) (err error) + func (r *Regs) SetPC(thread *Thread, pc uint64) error + func (r *Regs) Slice() []Register + func (r *Regs) TLS() uint64 + type Stackframe struct + CFA int64 + Call Location + Current Location + FDE *frame.FrameDescriptionEntry + Ret uint64 + func (frame *Stackframe) Scope(thread *Thread) *EvalScope + type Thread struct + BreakpointConditionError error + BreakpointConditionMet bool + CurrentBreakpoint *Breakpoint + ID int + Status *WaitStatus + func (t *Thread) PC() (uint64, error) + func (t *Thread) Registers(floatingPoint bool) (Registers, error) + func (t *Thread) ReturnAddress() (uint64, error) + func (t *Thread) Stacktrace(depth int) ([]Stackframe, error) + func (thread *Thread) Continue() error + func (thread *Thread) Disassemble(startPC, endPC uint64, currentGoroutine bool) ([]AsmInstruction, error) + func (thread *Thread) GetG() (g *G, err error) + func (thread *Thread) Halt() (err error) + func (thread *Thread) Location() (*Location, error) + func (thread *Thread) Scope() (*EvalScope, error) + func (thread *Thread) SetCurrentBreakpoint() error + func (thread *Thread) SetPC(pc uint64) error + func (thread *Thread) StepInstruction() (err error) + func (thread *Thread) Stopped() bool + type ThreadBlockedError struct + func (tbe ThreadBlockedError) Error() string + type Variable struct + Addr uintptr + Base uintptr + Cap int64 + Children []Variable + DwarfType dwarf.Type + FloatSpecial FloatSpecial + Kind reflect.Kind + Len int64 + Name string + OnlyAddr bool + RealType dwarf.Type + Unreadable error + Value constant.Value + func (v *Variable) TypeString() string + type WaitStatus sys.WaitStatus — darwin/amd64, linux/amd64, windows/amd64