tracer

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2022 License: Unlicense Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	// contains filtered or unexported fields
}

func (Arg) Annotation

func (s Arg) Annotation() string

func (Arg) Array

func (s Arg) Array() []Arg

func (Arg) Data

func (s Arg) Data() []byte

func (Arg) Int

func (s Arg) Int() int

func (Arg) Known

func (s Arg) Known() bool

func (Arg) Name

func (s Arg) Name() string

func (Arg) Object

func (s Arg) Object() *Object

func (Arg) Raw

func (s Arg) Raw() uintptr

func (Arg) ReplaceValueWithAnnotation

func (s Arg) ReplaceValueWithAnnotation() bool

func (*Arg) SetAnnotation

func (s *Arg) SetAnnotation(annotation string, replace bool)

func (Arg) Type

func (s Arg) Type() ArgType

type ArgMetadata

type ArgMetadata struct {
	Name        string
	Type        ArgType
	Annotator   func(arg annotation.Arg, pid int)
	LenSource   LenSource
	Optional    bool
	Destination bool
	FixedCount  int
}

type ArgType

type ArgType int
const (
	// public
	ArgTypeUnknown ArgType = iota
	ArgTypeData
	ArgTypeInt
	ArgTypeLong
	ArgTypeAddress
	ArgTypeUnsignedInt
	ArgTypeUnsignedLong
	ArgTypeObject
	ArgTypeErrorCode
	ArgTypeArray
)

type LenSource

type LenSource uint8
const (
	LenSourceNone LenSource = iota
	LenSourcePrev
	LenSourceNext
	LenSourceNextPointer
	LenSourceReturnValue
	LenSourceFixed
)

type Object

type Object struct {
	Name       string
	Properties []Arg
}

type ReturnMetadata

type ReturnMetadata ArgMetadata

type SigInfo

type SigInfo struct {
	Signo  int32
	Errno  int32
	Code   int32
	TrapNo int32
	Pid    int32
	Uid    int32
}

type Syscall

type Syscall struct {
	// contains filtered or unexported fields
}

func (*Syscall) Args

func (s *Syscall) Args() []Arg

func (*Syscall) Complete

func (s *Syscall) Complete() bool

func (*Syscall) Name

func (s *Syscall) Name() string

func (*Syscall) Number

func (s *Syscall) Number() int

func (*Syscall) Paths

func (s *Syscall) Paths() []string

func (*Syscall) Return

func (s *Syscall) Return() Arg

func (*Syscall) Unknown

func (s *Syscall) Unknown() bool

type SyscallMetadata

type SyscallMetadata struct {
	Name        string
	Args        []ArgMetadata
	ReturnValue ReturnMetadata
	Modifier    func(call *Syscall)
}

type Tracer

type Tracer struct {
	// contains filtered or unexported fields
}

func FromCommand

func FromCommand(suppressOutput bool, command string, args ...string) (*Tracer, error)

func New

func New(pid int) *Tracer

func (*Tracer) SetAttachHandler

func (t *Tracer) SetAttachHandler(handler func(int))

func (*Tracer) SetDetachHandler

func (t *Tracer) SetDetachHandler(handler func(int))

func (*Tracer) SetProcessExitHandler

func (t *Tracer) SetProcessExitHandler(handler func(int))

func (*Tracer) SetSignalHandler

func (t *Tracer) SetSignalHandler(handler func(*SigInfo))

func (*Tracer) SetSyscallEnterHandler

func (t *Tracer) SetSyscallEnterHandler(handler func(*Syscall))

func (*Tracer) SetSyscallExitHandler

func (t *Tracer) SetSyscallExitHandler(handler func(*Syscall))

func (*Tracer) Start

func (t *Tracer) Start() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL