go-delve/delve · warning

type not supported by ebpf

Error message

type not supported by ebpf

What it means

This inline error is raised in the eBPF tracepoint argument loading path (pkg/proc/target.go) when a captured uprobe argument has no RealType that the eBPF backend can reconstruct, i.e. the argument's DWARF type is not one of the types supported by the eBPF tracer (map, chan, interface, func, struct, array, etc.). The captured raw bytes exist but delve cannot build a Variable from them. The variable is returned with Unreadable set to this error.

Source

Thrown at pkg/proc/target.go:513

	var results []*UProbeTraceResult
	tracepoints := t.proc.GetBufferedTracepoints()
	convertInputParamToVariable := func(ip *ebpf.RawUProbeParam) *Variable {
		v := &Variable{}
		v.Name = ip.Name
		v.RealType = ip.RealType
		v.DwarfType = ip.RealType // needed so ConstDescr doesn't panic when bi is set
		v.Len = ip.Len
		v.Base = ip.Base
		v.Addr = ip.Addr
		v.Kind = ip.Kind
		v.bi = t.BinInfo()

		if ip.Unreadable != nil {
			v.Unreadable = ip.Unreadable
			return v
		}
		if v.RealType == nil {
			v.Unreadable = errors.New("type not supported by ebpf")
			return v
		}

		cachedMem := CreateLoadedCachedMemory(ip.Data)
		compMem, compErr := CreateCompositeMemory(cachedMem, t.BinInfo().Arch, op.DwarfRegisters{}, ip.Pieces, ip.RealType.Common().ByteSize)
		if compErr != nil {
			v.Unreadable = fmt.Errorf("ebpf composite memory: %w", compErr)
			return v
		}
		v.mem = compMem

		v.loadValue(cfg)

		return v
	}
	for _, tp := range tracepoints {
		r := &UProbeTraceResult{}
		r.FnAddr = tp.FnAddr

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Trace only arguments of supported types (int/uint/bool/float/complex/string/pointer/slice)
  2. Wrap unsupported arguments: pass &arg (pointer) or log supported fields instead
  3. Extend dt.Common().ReflectKind mapping / parseFunctionParameterList if you maintain delve
  4. Fall back to regular breakpoints (dlv trace without --ebpf) for full type support

Example fix

// before
dlv trace --ebpf pkg.Func   // arg is chan: 'type not supported by ebpf'
// after
func Func(ch chan int) { /* keep */ }
func FuncTraced(n int, ch chan int) { _ = ch; dlvHook(n) } // trace scalar arg only
Defensive patterns

Strategy: fallback

Validate before calling

// pre-check argument types of traced function against supported set
for _, a := range fnArgs {
    if !ebpfSupportedKind(a.Common().ReflectKind) { skipOrFallback(a) }
}

Type guard

func ebpfSupported(k reflect.Kind) bool {
    switch k {
    case reflect.Int, reflect.Uint, reflect.Bool, reflect.Float64,
        reflect.Float32, reflect.Complex128, reflect.String, reflect.Ptr, reflect.Slice:
        return true
    }
    return false
}

Try / catch

if v.Unreadable != nil && strings.Contains(v.Unreadable.Error(), "type not supported by ebpf") {
    // fall back to breakpoint-based tracing for this arg
}

Prevention

When it happens

Trigger: Evaluating a buffered tracepoint (GetBufferedTracepoints -> loadValue) whose function argument has a type the eBPF pipeline cannot decode, or where the UProbeArgMap kind lookup fails so v.RealType stays nil.

Common situations: Tracing a function that takes interface, channel, map, func, struct or array parameters with 'dlv trace --ebpf'; tracing generic/instantiated functions whose DWARF types the reflect-kind mapping does not cover.

Related errors


AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31). Data as JSON: /api/errors/2c3ed4739da4a446. Report an issue: GitHub.