debug

package
v0.0.0-...-3869400 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Distributed under the MIT license. See the LICENSE file. * Copyright (c) 2014--2016 Thomas Fogal

Distributed under the MIT license. See the LICENSE file. * Copyright (c) 2014--2016 Thomas Fogal

Distributed under the MIT license. See the LICENSE file. * Copyright (c) 2014--2016 Thomas Fogal

Distributed under the MIT license. See the LICENSE file. * Copyright (c) 2014--2016 Thomas Fogal

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSegFault      = errors.New("SIGSEGV")
	ErrAlreadyBroken = errors.New("Breakpoint is already there")
)

Functions

func Exec

func Exec(program string, argv []string, env []string) error

func Fork

func Fork() int

func Stepback

func Stepback(inferior *ptrace.Tracee) error

Move the instruction pointer back one. Needed after we hit a breakpoint, otherwise we'd essentially be jumping into the middle of an instruction!

func Unbreak

func Unbreak(inferior *ptrace.Tracee, bp Breakpoint) error

Removes the given breakpoint.

func WaitUntil

func WaitUntil(inferior *ptrace.Tracee, address uintptr) error

Types

type Breakpoint

type Breakpoint struct {
	Address uintptr // where it was inserted
	// contains filtered or unexported fields
}

func Break

func Break(inferior *ptrace.Tracee, address uintptr) (Breakpoint, error)

Inserts a breakpoint at the given address. You'll need the return value to remove the breakpoint.

func (Breakpoint) String

func (b Breakpoint) String() string

type Type

type Type struct {
	Type dwarf.Type
	// contains filtered or unexported fields
}

func Basetype

func Basetype(program string, typ Type) (Type, error)

func TypeGlobalVar

func TypeGlobalVar(program string, address uintptr) (Type, error)

identifies the type of a global variable, as given by its address.

func TypeLocal

func TypeLocal(program string, fqn string, rel int64) (Type, error)

identifies a local (parameter or local variable), described by a (fqn, offset-off-of-fptr) pair.

func (Type) Signed

func (t Type) Signed() bool

Jump to

Keyboard shortcuts

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