debug

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(opts ...LoadConfigOption) api.LoadConfig

Types

type Address

type Address uint64

Address is deprecated, use Addrs.

func (Address) ApplyTracepoint

func (a Address) ApplyTracepoint(b *g.Tracepoint)

type BreakOnEntry

type BreakOnEntry bool

BreakOnEntry will stop the debugged process directly after launch. So that the user can set break- and watchpoints before continuing the execution.

func (BreakOnEntry) ApplyDebugger

func (b BreakOnEntry) ApplyDebugger(d *g.Debugger)

type Condition

type Condition string

Breakpoint condition.

func (Condition) ApplyTracepoint

func (c Condition) ApplyTracepoint(b *g.Tracepoint)

type Disabled

type Disabled bool

Disabled flag, signifying the state of the breakpoint

func (Disabled) ApplyTracepoint

func (d Disabled) ApplyTracepoint(b *g.Tracepoint)

type File

type File string

File is the source file for the breakpoint.

func (File) ApplyTracepoint

func (f File) ApplyTracepoint(b *g.Tracepoint)

type FollowPointers

type FollowPointers bool

FollowPointers requests pointers to be automatically dereferenced.

func (FollowPointers) ApplyLoadConfig

func (f FollowPointers) ApplyLoadConfig(lc *api.LoadConfig)

type FunctionName

type FunctionName string

FunctionName is the name of the function at the current breakpoint, and may not always be available.

func (FunctionName) ApplyTracepoint

func (fn FunctionName) ApplyTracepoint(b *g.Tracepoint)

type Goroutine

type Goroutine bool

Retrieve goroutine information

func (Goroutine) ApplyTracepoint

func (g Goroutine) ApplyTracepoint(b *g.Tracepoint)

type HitCondition

type HitCondition string

Breakpoint hit count condition. Supported hit count conditions are "NUMBER" and "OP NUMBER".

func (HitCondition) ApplyTracepoint

func (hc HitCondition) ApplyTracepoint(b *g.Tracepoint)

type HitConditionPerGoroutine

type HitConditionPerGoroutine bool

HitConditionPerGoroutine use per goroutine hitcount as HitCond operand, instead of total hitcount.

func (HitConditionPerGoroutine) ApplyTracepoint

func (hc HitConditionPerGoroutine) ApplyTracepoint(b *g.Tracepoint)

type InfoDirectory

type InfoDirectory string

InfoDirectory appends a debug info directory which is used by the debugger to parse debug information.

See also: https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

func (InfoDirectory) ApplyDebugger

func (b InfoDirectory) ApplyDebugger(d *g.Debugger)

type Line

type Line int

Line is a line in File for the breakpoint.

func (Line) ApplyTracepoint

func (l Line) ApplyTracepoint(b *g.Tracepoint)

type ListenAddr

type ListenAddr string

ListenAddr opens a TCP socket listening for DAP connections.

This allows attaching a DAP-compatible IDE like VScode to the debugger.

See: https://microsoft.github.io/debug-adapter-protocol/

func (ListenAddr) ApplyDebugger

func (l ListenAddr) ApplyDebugger(d *g.Debugger)

type LoadArgumentsConfig

type LoadArgumentsConfig api.LoadConfig

LoadArguments requests loading function arguments when the breakpoint is hit

func LoadArguments

func LoadArguments(opts ...LoadConfigOption) LoadArgumentsConfig

func (LoadArgumentsConfig) ApplyTracepoint

func (l LoadArgumentsConfig) ApplyTracepoint(b *g.Tracepoint)

type LoadConfigOption

type LoadConfigOption interface {
	ApplyLoadConfig(lc *api.LoadConfig)
}

LoadConfigOption is an interface implemented by all options which modify Delves api.LoadConfig to configure which information is loaded when a breakpoint is hit.

type LoadLocalsConfig

type LoadLocalsConfig api.LoadConfig

LoadLocals requests loading function locals when the breakpoint is hit

func LoadLocals

func LoadLocals(opts ...LoadConfigOption) LoadLocalsConfig

func (LoadLocalsConfig) ApplyTracepoint

func (l LoadLocalsConfig) ApplyTracepoint(b *g.Tracepoint)

type Location

type Location string

Location is a Delve locspec See: https://github.com/go-delve/delve/blob/master/Documentation/cli/locspec.md

func FunctionNameRegex

func FunctionNameRegex(expr string) Location

FunctionNameRegex is a regular expression which matches against all available functions in the debugged executable. A dedicated tracepoint will be created for each matched function.

func (Location) ApplyTracepoint

func (l Location) ApplyTracepoint(b *g.Tracepoint)

type MaxArrayValues

type MaxArrayValues int

MaxArrayValues is the maximum number of elements read from an array, a slice or a map.

func (MaxArrayValues) ApplyLoadConfig

func (m MaxArrayValues) ApplyLoadConfig(lc *api.LoadConfig)

type MaxStringLen

type MaxStringLen int

MaxStringLen is the maximum number of bytes read from a string

func (MaxStringLen) ApplyLoadConfig

func (m MaxStringLen) ApplyLoadConfig(lc *api.LoadConfig)

type MaxStructFields

type MaxStructFields int

MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields.

func (MaxStructFields) ApplyLoadConfig

func (m MaxStructFields) ApplyLoadConfig(lc *api.LoadConfig)

type MaxVariableRecurse

type MaxVariableRecurse int

MaxVariableRecurse is how far to recurse when evaluating nested types.

func (MaxVariableRecurse) ApplyLoadConfig

func (m MaxVariableRecurse) ApplyLoadConfig(lc *api.LoadConfig)

type Message

type Message string

Message overwrite the message of the trace events which are produced when the tracepoint is hit.

The message can contain placeholders which are substituted with variables in the scope of the breakpoint.

Example: "The variable myVar has currently the value {myVar}"

func (Message) ApplyTracepoint

func (m Message) ApplyTracepoint(b *g.Tracepoint)

type Name

type Name string

User defined name of the breakpoint.

func (Name) ApplyTracepoint

func (n Name) ApplyTracepoint(b *g.Tracepoint)

type Stacktrace

type Stacktrace int

Stack frames to retrieve

func (Stacktrace) ApplyTracepoint

func (s Stacktrace) ApplyTracepoint(b *g.Tracepoint)

type TraceReturn

type TraceReturn bool

TraceReturn flag signifying this is a breakpoint set at a return statement in a traced function.

func (TraceReturn) ApplyTracepoint

func (tr TraceReturn) ApplyTracepoint(b *g.Tracepoint)

type Tracepoint

type Tracepoint bool

Tracepoint flag, signifying this is a tracepoint.

func (Tracepoint) ApplyTracepoint

func (tp Tracepoint) ApplyTracepoint(b *g.Tracepoint)

type Tracer

type Tracer struct {
	*g.Tracer
}

Tracer attaches a tracer to the debugger.

All tracepoints will be send as trace events to the tracer. This allows for recording tracepoints to files, or handling them via a channel or callback.

It also enables the recording of debugger tracepoints to a Capture and hence recording them to a PCAPng file. This enables the user to analyze both network data, tracing events and debugger break/watchpoints in a single stream of events in WireShark.

func ToTracer

func ToTracer(t *g.Tracer) Tracer

func (Tracer) ApplyDebugger

func (t Tracer) ApplyDebugger(d *g.Debugger)

type UserData

type UserData struct {
	Data any
}

UserData carries arbitrary data which will be attached to the trace events.

func Data

func Data(d any) UserData

func (UserData) ApplyTracepoint

func (u UserData) ApplyTracepoint(b *g.Tracepoint)

type Variable

type Variable string

Expressions to evaluate

func (Variable) ApplyTracepoint

func (v Variable) ApplyTracepoint(b *g.Tracepoint)

type VerboseDescription

type VerboseDescription []string

func Description

func Description(strs ...string) VerboseDescription

func (VerboseDescription) ApplyTracepoint

func (v VerboseDescription) ApplyTracepoint(b *g.Tracepoint)

type WatchExpression

type WatchExpression struct {
	Expr string
	Type api.WatchType
}

WatchExpression is the expression used to create this watchpoint

func Watch

func Watch(expr string, typ api.WatchType) WatchExpression

func (WatchExpression) ApplyTracepoint

func (w WatchExpression) ApplyTracepoint(b *g.Tracepoint)

Jump to

Keyboard shortcuts

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