// Function represents thread-scoped function information.
typeFunctionstruct{
// Name is the function name.
Namestring`json:"name"`
Valueuint64`json:"value"`
Typebyte`json:"type"`
GoTypeuint64`json:"goType"`
}
// Variable describes a variable.
typeVariablestruct{
// Name of the variable or struct member
Namestring`json:"name"`
// Address of the variable or struct member
Addruintptr`json:"addr"`
// Only the address field is filled (result of evaluating expressions like &<expr>)
OnlyAddrbool`json:"onlyAddr"`
// Go type of the variable
Typestring`json:"type"`
// Type of the variable after resolving any typedefs
RealTypestring`json:"realType"`
Kindreflect.Kind`json:"kind"`
//Strings have their length capped at proc.maxArrayValues, use Len for the real length of a string
//Function variables will store the name of the function in this field
Valuestring`json:"value"`
// Number of elements in an array or a slice, number of keys for a map, number of struct members for a struct, length of strings
Lenint64`json:"len"`
// Cap value for slices
Capint64`json:"cap"`
// Array and slice elements, member fields of structs, key/value pairs of maps, value of complex numbers
// The Name field in this slice will always be the empty string except for structs (when it will be the field name) and for complex numbers (when it will be "real" and "imaginary")
// For maps each map entry will have to items in this slice, even numbered items will represent map keys and odd numbered items will represent their values
// This field's length is capped at proc.maxArrayValues for slices and arrays and 2*proc.maxArrayValues for maps, in the circumnstances where the cap takes effect len(Children) != Len
// The other length cap applied to this field is related to maximum recursion depth, when the maximum recursion depth is reached this field is left empty, contrary to the previous one this cap also applies to structs (otherwise structs will always have all their member fields returned)
Children[]Variable`json:"children"`
// Unreadable addresses will have this field set
Unreadablestring`json:"unreadable"`
}
// LoadConfig describes how to load values from target's memory
typeLoadConfigstruct{
// FollowPointers requests pointers to be automatically dereferenced.
FollowPointersbool
// MaxVariableRecurse is how far to recurse when evaluating nested types.
MaxVariableRecurseint
// MaxStringLen is the maximum number of bytes read from a string
MaxStringLenint
// MaxArrayValues is the maximum number of elements read from an array, a slice or a map.
MaxArrayValuesint
// MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields.
MaxStructFieldsint
}
// Goroutine represents the information relevant to Delve from the runtime's
// internal G structure.
typeGoroutinestruct{
// ID is a unique identifier for the goroutine.
IDint`json:"id"`
// Current location of the goroutine
CurrentLocLocation`json:"currentLoc"`
// Current location of the goroutine, excluding calls inside runtime
UserCurrentLocLocation`json:"userCurrentLoc"`
// Location of the go instruction that started this goroutine
GoStatementLocLocation`json:"goStatementLoc"`
// ID of the associated thread for running goroutines
ThreadIDint`json:"threadID"`
}
// DebuggerCommand is a command which changes the debugger's execution state.
typeDebuggerCommandstruct{
// Name is the command to run.
Namestring`json:"name"`
// ThreadID is used to specify which thread to use with the SwitchThread
// command.
ThreadIDint`json:"threadID,omitempty"`
// GoroutineID is used to specify which thread to use with the SwitchGoroutine