{"record":{"id":"024cf002cfd791a5","repo":"go-delve/delve","slug":"ebpf-disabled","errorCode":null,"errorMessage":"eBPF disabled","messagePattern":"eBPF disabled","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/internal/ebpf/helpers_disabled.go","lineNumber":34,"sourceCode":"\nfunc (ctx *EBPFContext) AttachUprobe(pid int, name string, offset uint32) error {\n\treturn errors.New(\"eBPF is disabled\")\n}\n\nfunc (ctx *EBPFContext) AttachURetprobe(pid int, name string, offset uint32) error {\n\treturn errors.New(\"eBPF is disabled\")\n}\n\nfunc (ctx *EBPFContext) UpdateArgMap(key uint64, goidOffset int64, args []UProbeArgMap, gAddrOffset uint64, isret bool) error {\n\treturn errors.New(\"eBPF is disabled\")\n}\n\nfunc (ctx *EBPFContext) GetBufferedTracepoints() []RawUProbeParams {\n\treturn nil\n}\n\nfunc SymbolToOffset(file, symbol string) (uint32, error) {\n\treturn 0, errors.New(\"eBPF disabled\")\n}\n\nfunc LoadEBPFTracingProgram(path string) (*EBPFContext, error) {\n\treturn nil, errors.New(\"eBPF disabled\")\n}\n\nfunc AddressToOffset(f *elf.File, addr uint64) (uint32, error) {\n\treturn 0, errors.New(\"eBPF disabled\")\n}\n","sourceCodeStart":16,"sourceCodeEnd":44,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/internal/ebpf/helpers_disabled.go#L16-L44","documentation":"SymbolToOffset in helpers_disabled.go is the no-eBPF stub that maps an ELF symbol name to a byte offset for uprobe attachment. Without eBPF support compiled in, this lookup is meaningless and always fails. It indicates the delve binary lacks eBPF tracing capability.","triggerScenarios":"Calling SymbolToOffset(file, symbol) on a delve build without the 'ebpf' tag; it is invoked as part of uprobe setup when attaching tracepoints to functions in a binary.","commonSituations":"Non-Linux build or Linux build without the ebpf tag attempting 'dlv trace --ebpf'; users of prebuilt binaries that omit ebpf.","solutions":["Rebuild with the ebpf build tag on Linux","Verify target binary and delve are both ELF (SymbolToOffset parses ELF symbols)","Use standard breakpoints instead of eBPF tracepoints"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// check that the binary is ELF and eBPF is available before SymbolToOffset\nf, err := elf.Open(file)\nif err != nil { return err } // not ELF; ebpf path unusable\n_ , err2 := ebpf.SymbolToOffset(file, symbol) // probe availability in tests","typeGuard":null,"tryCatchPattern":"off, err := ebpf.SymbolToOffset(file, sym)\nif err != nil && strings.Contains(err.Error(), \"eBPF disabled\") {\n    return fallbackToBreakpoint(sym)\n}","preventionTips":["Only invoke the eBPF path when the binary was built with the ebpf tag","Validate the target is an ELF Linux binary first","Keep a non-eBPF trace fallback in tooling that calls delve programmatically"],"tags":["ebpf","elf","build-tags"],"backgroundTag":"feature-not-compiled-in","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}