package
1.24.0
Repository: https://github.com/go-delve/delve.git
Documentation: pkg.go.dev

# Packages

Package linutil contains functions and data structures used by both the linux implementation of the native backend and the core backend to deal with structures used by the linux kernel.

# Functions

AMD64Arch returns an initialized AMD64 struct.
Ancestors returns the list of ancestors for g.
AppendBytesRegister will create a new Register struct with the name and value specified and append it to the `regs` slice.
AppendUint64Register will create a new Register struct with the name and value specified and append it to the `regs` slice.
ARM64Arch returns an initialized ARM64 struct.
ConvertEvalScope returns a new EvalScope in the context of the specified goroutine ID and stack frame.
CreateCompositeMemory created a new composite memory type using the provided MemoryReadWriter as the underlying memory buffer.
DereferenceMemory returns a MemoryReadWriter that can read and write the memory pointed to by pointers in this memory.
DisableAsyncPreemptEnv returns a process environment (like os.Environ) where asyncpreemptoff is set to 1.
Disassemble disassembles target memory between startAddr and endAddr, marking the current instruction being executed in goroutine g.
EvalExpressionWithCalls is like EvalExpression but allows function calls in 'expr'.
FindFileLocation returns the PC for a given file:line.
FindFunctionLocation finds address of a function's line If lineOffset is passed FindFunctionLocation will return the address of that line.
FindGoroutine returns a G struct representing the goroutine specified by `gid`.
FirstPCAfterPrologue returns the address of the first instruction after the prologue for function fn.
FrameToScope returns a new EvalScope for frames[0].
GetG returns information on the G (goroutine) that is executing on this thread.
GoroutineScope returns an EvalScope for the goroutine running on the given thread.
GoroutinesInfo searches for goroutines starting at index 'start', and returns an array of up to 'count' (or all found elements, if 'count' is 0) G structures representing the information Delve care about from the internal runtime G structure.
GoroutineStacktrace returns the stack trace for a goroutine.
I386Arch returns an initialized I386Arch struct.
NewBinaryInfo returns an initialized but unloaded BinaryInfo struct.
NewBreakpointMap creates a new BreakpointMap.
NewGroup creates a TargetGroup containing the specified Target.
Restart copies breakpoints and follow exec status from oldgrp into grp.
RISCV64Arch returns an initialized RISCV64 struct.
RuntimeTypeToDIE returns the DIE corresponding to the runtime._type.
ThreadScope returns an EvalScope for the given thread.
ThreadStacktrace returns the stack trace for thread.

# Constants

Backward direction executes the target in reverse.
always use platform-independent notes format.
FatalThrow is the name given to the breakpoint triggered when the target process dies because of a fatal runtime error.
FloatIsNaN means the float is a special NaN value.
FloatIsNegInf means the float is a special negative infinity value.
FloatIsNormal means the value is a normal float.
FloatIsPosInf means the float is a special positive infinity value.
Forward direction executes the target normally.
8 in this state when newstack is moving the stack.
6.
7 Only the Gscanenqueue is used.
0.
5 currently unused, but hardcoded in gdb scripts.
GNUFlavour will display GNU assembly syntax.
GoFlavour will display Go assembly syntax.
1 runnable and on a run queue.
2.
3.
4.
HardcodedBreakpoint is the name given to hardcoded breakpoints (for example: calls to runtime.Breakpoint).
IntelFlavour will display Intel assembly syntax.
NextBreakpoint is a breakpoint set by Next, Continue will stop on it and delete it.
NextDeferBreakpoint is a breakpoint set by Next on the first deferred function.
NextInactivatedBreakpoint a NextBreakpoint that has been inactivated, see rangeFrameInactivateNextBreakpoints.
Logical breakpoint ID for breakpoints internal breakpoints.
PluginOpenBreakpoint is a breakpoint used to detect that a plugin has been loaded and we should try to enable suspended breakpoints.
StackResizeBreakpoint is a breakpoint used to detect stack resizes to adjust the watchpoint of stack variables.
StacktraceG requests a stacktrace starting with the register values saved in the runtime.g structure.
StacktraceReadDefers requests a stacktrace decorated with deferred calls for each frame.
StacktraceSimple requests a stacktrace where no stack switches will be attempted.
StepBreakpoint is a breakpoint set by Step on a CALL instruction, Continue will set a new breakpoint (of NextBreakpoint kind) on the destination of CALL, delete this breakpoint and then continue again.
StepIntoNewProc is a breakpoint used to step into a newly created goroutine.
The debugger stopped the process after attaching.
The target process hit one or more software breakpoints.
An injected call completed.
The target process terminated.
The target process hit a hardcoded breakpoint (for example runtime.Breakpoint()).
The process was just launched.
A manual stop was requested.
The next/step/stepout/stepInstruction command terminated.
The target process hit one or more watchpoints.
UnrecoveredPanic is the name given to the unrecovered panic breakpoint.
UserBreakpoint is a user set breakpoint.
VariableArgument means this variable is a function argument.
VariableConstant means this variable is a constant value.
VariableCPtr means the variable is a C pointer.
VariableCPURegister means this variable is a CPU register.
VariableEscaped is set for local variables that escaped to the heap The compiler performs escape analysis on local variables, the variables that may outlive the stack frame are allocated on the heap instead and only the address is recorded on the stack.
VariableFakeAddress means the address of this variable is either fake (i.e.
VariableReturnArgument means this variable is a function return value.
VariableShadowed is set for local variables that are shadowed by a variable with the same name in another scope.
WatchOutOfScopeBreakpoint is a breakpoint used to detect when a watched stack variable goes out of scope.

# Variables

ErrCouldNotDetermineRelocation is an error returned when Delve could not determine the base address of a position independent executable.
ErrNoDebugInfoFound is returned when Delve cannot open the debug_info section or find an external debug info file.
ErrNoRuntimeAllG is returned when the runtime.allg list could not be found.
ErrNotRecorded is returned when an action is requested that is only possible on recorded (traced) programs.
ErrProcessDetached indicates that we detached from the target process.
ErrUnknownRegister is returned when the value of an unknown register is requested.

# Structs

Arch represents a CPU architecture.
AsmInstruction represents one assembly instruction.
BinaryInfo holds information on the binaries being executed (this includes both the executable and also any loaded libraries).
Breaklet represents one of multiple breakpoints that can overlap on a single physical breakpoint.
Breakpoint represents a physical breakpoint.
BreakpointExistsError is returned when trying to set a breakpoint at an address that already has a breakpoint set for it.
BreakpointMap represents an (address, breakpoint) map.
BreakpointState describes the state of a breakpoint in a thread.
Checkpoint is a checkpoint.
CommonThread contains fields used by this package, common to all implementations of the Thread interface.
ContinueOnceContext is an object passed to ContinueOnce that the backend can use to communicate with the target layer.
Defer represents one deferred call.
DumpState represents the current state of a core dump in progress.
ElfDynamicSection describes the .dynamic section of an ELF executable.
ErrFunctionNotFound is returned when failing to find the function named 'FuncName' within the binary.
ErrNoGoroutine returned when a G could not be found for a specific thread.
ErrNoSourceForPC is returned when the given address does not correspond with a source file location.
ErrProcessExited indicates that the process has exited and contains both process id and exit status.
ErrUnsupportedArch is returned when attempting to debug a binary compiled for an unsupported architecture.
EvalScope is the scope for variable evaluation.
Function describes a function in the target program.
G represents a runtime G (goroutine) structure (at least the fields that Delve is interested in).
Image represents a loaded library file (shared object on linux, DLL on windows).
InlinedCall represents a concrete inlined call to a function.
InvalidAddressError represents the result of attempting to set a breakpoint at an invalid address.
IsNilErr is returned when a variable is nil.
LoadConfig controls how variables are loaded from the targets memory.
Location represents the location of a thread.
LogicalBreakpoint represents a breakpoint set by a user.
MemoryMapEntry represent a memory mapping in the target process.
ModuleData counterpart to runtime.moduleData.
NewTargetGroupConfig contains the configuration for a new TargetGroup object,.
NoBreakpointError is returned when trying to clear a breakpoint that does not exist.
NullAddrError is an error for a null address.
OutputRedirect Specifies where the target program output will be redirected to.
Register represents a CPU register.
SetBreakpoint describes how a breakpoint should be set.
Stackframe represents a frame in a system stack.
Target represents the process being debugged.
TargetGroup represents a group of target processes being debugged that will be resumed and stopped simultaneously.
ValidTargets iterates through all valid targets in Group.
Variable represents a variable.
WaitFor is passed to native.Attach and gdbserver.LLDBAttach to wait for a process to start before attaching.

# Interfaces

MemoryReader is like io.ReaderAt, but the offset is a uint64 so that it can address all of 64-bit memory.
MemoryReadWriter is an interface for reading or writing to the targets memory.
Process represents the target of the debugger.
ProcessGroup is a group of processes that are resumed at the same time.
ProcessInternal holds a set of methods that need to be implemented by a Delve backend.
RecordingManipulation is an interface for manipulating process recordings.
RecordingManipulationInternal is an interface that a Delve backend can implement if it is a recording.
Registers is an interface for a generic register type.
Thread represents a thread.

# Type aliases

AssemblyFlavour is the assembly syntax to display.
BreakpointKind determines the behavior of delve when the breakpoint is reached.
Direction is the direction of execution for the target process.
DumpFlags is used to configure (*Target).Dump.
StopReason describes the reason why the target process is stopped.
WatchType is the watchpoint type.