gdbserial

package
v0.0.0-...-96212cb Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDirChange = errors.New("direction change with internal breakpoints")

ErrDirChange is returned when trying to change execution direction while there are still internal breakpoints set.

View Source
var ErrStartCallInjectionBackwards = errors.New("can not start a call injection while running backwards")

ErrStartCallInjectionBackwards is returned when trying to start a call injection while the recording is being run backwards.

View Source
var ErrTooManyAttempts = errors.New("too many transmit attempts")
View Source
var ErrUnsupportedOS = errors.New("lldb backend not supported on Windows")

ErrUnsupportedOS is returned when trying to use the lldb backend on Windows.

Functions

func LLDBAttach

func LLDBAttach(pid int, path string, debugInfoDirs []string) (*proc.Target, error)

LLDBAttach starts an instance of lldb-server and connects to it, asking it to attach to the specified pid. Path is path to the target's executable, path only needs to be specified for some stubs that do not provide an automated way of determining it (for example debugserver).

func LLDBLaunch

func LLDBLaunch(cmd []string, wd string, flags proc.LaunchFlags, debugInfoDirs []string, tty string, redirects [3]string) (*proc.Target, error)

LLDBLaunch starts an instance of lldb-server and connects to it, asking it to launch the specified target program with the specified arguments (cmd) on the specified directory wd.

func Record

func Record(cmd []string, wd string, quiet bool, redirects [3]string) (tracedir string, err error)

Record uses rr to record the execution of the specified program and returns the trace directory's path.

func RecordAndReplay

func RecordAndReplay(cmd []string, wd string, quiet bool, debugInfoDirs []string, redirects [3]string) (*proc.Target, string, error)

RecordAndReplay acts like calling Record and then Replay.

func RecordAsync

func RecordAsync(cmd []string, wd string, quiet bool, redirects [3]string) (run func() (string, error), stop func() error, err error)

RecordAsync configures rr to record the execution of the specified program. Returns a run function which will actually record the program, a stop function which will prematurely terminate the recording of the program.

func Replay

func Replay(tracedir string, quiet, deleteOnDetach bool, debugInfoDirs []string) (*proc.Target, error)

Replay starts an instance of rr in replay mode, with the specified trace directory, and connects to it.

Types

type ErrBackendUnavailable

type ErrBackendUnavailable struct{}

ErrBackendUnavailable is returned when the stub program can not be found.

func (*ErrBackendUnavailable) Error

func (err *ErrBackendUnavailable) Error() string

type ErrMalformedRRGdbCommand

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

func (*ErrMalformedRRGdbCommand) Error

func (err *ErrMalformedRRGdbCommand) Error() string

type ErrPerfEventParanoid

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

ErrPerfEventParanoid is the error returned by Reply and Record if /proc/sys/kernel/perf_event_paranoid is greater than 1.

func (ErrPerfEventParanoid) Error

func (err ErrPerfEventParanoid) Error() string

type GdbMalformedThreadIDError

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

GdbMalformedThreadIDError is returned when a the stub responds with a thread ID that does not conform with the Gdb Remote Serial Protocol specification.

func (*GdbMalformedThreadIDError) Error

func (err *GdbMalformedThreadIDError) Error() string

type GdbProtocolError

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

GdbProtocolError is an error response (Exx) of Gdb Remote Serial Protocol or an "unsupported command" response (empty packet).

func (*GdbProtocolError) Error

func (err *GdbProtocolError) Error() string

Jump to

Keyboard shortcuts

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