gdbserial

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 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, waitFor *proc.WaitFor, debugInfoDirs []string) (*proc.TargetGroup, 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.TargetGroup, 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, stdin string, stdout proc.OutputRedirect, stderr proc.OutputRedirect) (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, stdin string, stdout proc.OutputRedirect, stderr proc.OutputRedirect) (*proc.TargetGroup, string, error)

RecordAndReplay acts like calling Record and then Replay.

func RecordAsync added in v1.21.1

func RecordAsync(cmd []string, wd string, quiet bool, stdin string, stdout proc.OutputRedirect, stderr proc.OutputRedirect) (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, rrOnProcessPid int, cmdline string) (*proc.TargetGroup, error)

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

Types

type ErrBackendUnavailable added in v1.1.0

type ErrBackendUnavailable struct{}

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

func (*ErrBackendUnavailable) Error added in v1.1.0

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 added in v1.1.0

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 added in v1.1.0

func (err ErrPerfEventParanoid) Error() string

type GdbMalformedThreadIDError

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

GdbMalformedThreadIDError is returned when 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