{"record":{"id":"019d5a8b7349b021","repo":"go-delve/delve","slug":"func-type-not-yet-supported-by-ebpf-tracing","errorCode":null,"errorMessage":"func type not yet supported by ebpf tracing","messagePattern":"func type not yet supported by ebpf tracing","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/proc/internal/ebpf/helpers.go","lineNumber":571,"sourceCode":"\tcase reflect.String:\n\t\tif len(iparam.Data) >= 16 {\n\t\t\tiparam.Base = fakeAddressUnresolv + uint64(valSize)\n\t\t\tiparam.Len = int64(binary.LittleEndian.Uint64(iparam.Data[8:16]))\n\t\t}\n\t\tiparam.RealType = &godwarf.StringType{\n\t\t\tStructType: godwarf.StructType{\n\t\t\t\tCommonType: godwarf.CommonType{ByteSize: 16, ReflectKind: reflect.String},\n\t\t\t\tKind:       \"struct\",\n\t\t\t},\n\t\t}\n\tcase reflect.Map:\n\t\tiparam.Unreadable = fmt.Errorf(\"map type not yet supported by ebpf tracing\")\n\tcase reflect.Chan:\n\t\tiparam.Unreadable = fmt.Errorf(\"chan type not yet supported by ebpf tracing\")\n\tcase reflect.Interface:\n\t\tiparam.Unreadable = fmt.Errorf(\"interface type not yet supported by ebpf tracing\")\n\tcase reflect.Func:\n\t\tiparam.Unreadable = fmt.Errorf(\"func type not yet supported by ebpf tracing\")\n\tcase reflect.Struct:\n\t\tiparam.Unreadable = fmt.Errorf(\"struct type not yet supported by ebpf tracing without DWARF type\")\n\tcase reflect.Array:\n\t\tiparam.Unreadable = fmt.Errorf(\"array type not yet supported by ebpf tracing without DWARF type\")\n\tdefault:\n\t\tiparam.Unreadable = fmt.Errorf(\"unrecognized reflect.Kind %d from eBPF\", iparam.Kind)\n\t}\n}\n\nfunc createFunctionParameterList(entry uint64, goidOffset int64, args []UProbeArgMap, isret bool) function_parameter_list_t {\n\tvar params function_parameter_list_t\n\tparams.goid_offset = uint32(goidOffset)\n\tparams.fn_addr = entry\n\tparams.is_ret = isret\n\tparams.n_parameters = 0\n\tparams.n_ret_parameters = 0\n\tfor _, arg := range args {\n\t\tvar param function_parameter_t","sourceCodeStart":553,"sourceCodeEnd":589,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/internal/ebpf/helpers.go#L553-L589","documentation":"Func-typed arguments fall in the same unsupported branch set of synthesizeTypeFromKind: when only reflect.Func is known (no DWARF type), the parameter is marked Unreadable because a function value's code pointer/closure cannot be meaningfully reconstructed from the captured raw bytes. The trace event completes with this argument unreadable.","triggerScenarios":"Tracing a function that takes a func value or method value as a parameter via the eBPF backend when the DWARF type is unavailable, causing handleParamEvent to fall back to synthesizeTypeFromKind and hit 'case reflect.Func'.","commonSituations":"'dlv trace --ebpf' on callbacks-based APIs (e.g. http.HandlerFunc, sort.Slice less funcs); tracing higher-order functions; binaries with stripped or partial DWARF info.","solutions":["Avoid tracing functions whose parameters are func values; trace a wrapper with scalar/pointer arguments instead.","Keep full DWARF info in the target binary so the argument type is resolved before the Kind-only fallback.","Check and surface iparam.Unreadable in any tooling consuming GetBufferedTracepoints results.","Track delve eBPF type support; func/struct/array support requires DWARF types today."],"exampleFix":"// before\ndlv trace --ebpf scheduler.Run   // Run(task func(ctx context.Context) error)\n// parameter shows: func type not yet supported by ebpf tracing\n// after\n// trace a named, concrete-typed entry point:\ntype TaskFn func(ctx context.Context) error\nfunc (s *Scheduler) RunNamed(t TaskFn) { ... } // still unsupported; instead trace:\nfunc (s *Scheduler) RunID(id int) { s.run(tasks[id]) }\ndlv trace --ebpf scheduler.RunID","handlingStrategy":"type-guard","validationCode":"// Detect func-typed parameters before tracing:\nfunc hasFuncParam(types []godwarf.Type) bool {\n\tfor _, t := range types {\n\t\tif t != nil && t.Common().ReflectKind == reflect.Func {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}","typeGuard":"func isFuncParam(p *RawUProbeParam) bool {\n\treturn p != nil && p.Kind == reflect.Func\n}","tryCatchPattern":"if p.Unreadable != nil && strings.Contains(p.Unreadable.Error(), \"func type not yet supported\") {\n\tfmt.Printf(\"param %s: <func value unavailable via eBPF>\\n\", p.Name)\n\tcontinue\n}","preventionTips":["Avoid eBPF tracing of higher-order functions taking func values or method values.","Maintain full DWARF info in traced binaries so typed resolution is attempted.","Check Unreadable on parameters before value loading in any eBPF consumer.","Use regular breakpoints or a scalar-argument wrapper for callback-style APIs."],"tags":["ebpf","tracing","unsupported-type","func"],"backgroundTag":"ebpf-unsupported-arg-type","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}