patch

package
v0.0.0-...-9549ca7 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2016 License: CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Patch

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

Patch is used to modify functions at runtime.

func NewPatch

func NewPatch(fn interface{}, soFile string, addr int) (*Patch, error)

NewPatch patches the fn using the provided .so file. soFile must be the path to a .so file and addr must be the index of the byte in the file where the function you want to patch with starts. fn *must* be a function, *not* a method.

func (*Patch) Close

func (p *Patch) Close() error

Close releases the shared object file and invalidates the patch.

func (*Patch) Patch

func (p *Patch) Patch() error

Patch patches the function and returns any errors that occur.

func (*Patch) Unpatch

func (p *Patch) Unpatch() error

Unatch undos the previous patch and returns any errors that occur.

Jump to

Keyboard shortcuts

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