mirror of
https://github.com/go-delve/delve.git
synced 2026-05-11 07:06:25 +02:00
* Extend feature to print procedure parameters in trace on eBPF backend Fixes #4266 * address review comments * ran go fmt
41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
package ebpf
|
|
|
|
import (
|
|
"reflect"
|
|
|
|
"github.com/go-delve/delve/pkg/dwarf/godwarf"
|
|
"github.com/go-delve/delve/pkg/dwarf/op"
|
|
)
|
|
|
|
type UProbeArgMap struct {
|
|
Name string // Parameter name from DWARF.
|
|
Offset int64 // Offset from the stackpointer.
|
|
Size int64 // Size in bytes.
|
|
Kind reflect.Kind // Kind of variable.
|
|
TypeName string // Original type name from DWARF (e.g., "*int", "[]byte").
|
|
Pieces []int // Pieces of the variables as stored in registers.
|
|
InReg bool // True if this param is contained in a register.
|
|
Ret bool // True if this param is a return value.
|
|
}
|
|
|
|
type RawUProbeParam struct {
|
|
Name string // Parameter name from DWARF.
|
|
TypeName string // Original type name from DWARF (e.g., "*int", "[]byte").
|
|
Pieces []op.Piece
|
|
RealType godwarf.Type
|
|
Kind reflect.Kind
|
|
Len int64
|
|
Base uint64
|
|
Addr uint64
|
|
Data []byte
|
|
Unreadable error // If set, the parameter could not be read (e.g., XMM register, unsupported type).
|
|
}
|
|
|
|
type RawUProbeParams struct {
|
|
FnAddr int
|
|
GoroutineID int
|
|
IsRet bool
|
|
InputParams []*RawUProbeParam
|
|
ReturnParams []*RawUProbeParam
|
|
}
|