{"record":{"id":"2ecbe7393c110028","repo":"go-delve/delve","slug":"function-calls-not-supported-by-this-version-of-go","errorCode":null,"errorMessage":"function calls not supported by this version of Go","messagePattern":"function calls not supported by this version of Go","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/fncall.go","lineNumber":59,"sourceCode":"// done by:\n//\n//  - evalop.CallInjectionStart\n//  - evalop.CallInjectionSetTarget\n//  - evalCallInjectionCopyArg\n//  - evalCallInjectionComplete\n//\n// When the target has runtime.debugPinner then evalCallInjectionPinPointer\n// must be also called in a loop until it returns false.\n\nconst (\n\tdebugCallFunctionNamePrefix1 = \"debugCall\"\n\tdebugCallFunctionNamePrefix2 = \"runtime.debugCall\"\n\tmaxDebugCallVersion          = 2\n\tmaxArgFrameSize              = 65535\n)\n\nvar (\n\terrFuncCallUnsupported        = errors.New(\"function calls not supported by this version of Go\")\n\terrFuncCallUnsupportedBackend = errors.New(\"backend does not support function calls\")\n\terrFuncCallInProgress         = errors.New(\"cannot call function while another function call is already in progress\")\n\terrNoGoroutine                = errors.New(\"no goroutine selected\")\n\terrGoroutineNotRunning        = errors.New(\"selected goroutine not running\")\n\terrNotEnoughStack             = errors.New(\"not enough stack space\")\n\terrTooManyArguments           = errors.New(\"too many arguments\")\n\terrNotEnoughArguments         = errors.New(\"not enough arguments\")\n\terrNotAGoFunction             = errors.New(\"not a Go function\")\n\terrFuncCallNotAllowedStrAlloc = errors.New(\"literal string can not be allocated because function calls are not allowed without using 'call'\")\n)\n\ntype functionCallState struct {\n\t// savedRegs contains the saved registers\n\tsavedRegs Registers\n\t// err contains a saved error\n\terr error\n\t// expr is the expression being evaluated\n\texpr *ast.CallExpr","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/fncall.go#L41-L77","documentation":"errFuncCallUnsupported is returned when a function call is requested but the Go runtime of the debugged program does not support Delve's call-injection mechanism: the binary must be built by a Go version that provides runtime.debugCallV1/V2 (maxDebugCallVersion 2). Returned by EvalExpressionWithCalls and evalCallInjectionStart in pkg/proc/fncall.go.","triggerScenarios":"Calling EvalExpressionWithCalls (or the 'call' terminal command) on a target built with a Go version older than the minimum supported for debugCall injection, so no runtime.debugCall* symbol is found.","commonSituations":"Debugging legacy binaries compiled with old Go toolchains; attaching to system/production binaries that were never rebuilt; mixing a modern Delve with an ancient target binary.","solutions":["Rebuild the target binary with a Go version that supports debugCallV2 (Go >= 1.11/1.12 era; ideally current)","If a rebuild is impossible, step into the code manually or use breakpoints to observe instead of injecting calls","Verify the target's Go version with the 'version' / version-related commands in the debugger"],"exampleFix":"// before: target built with go1.9\ndlv> call foo(1)\n// after: rebuild target with modern Go\ngo build -gcflags=\"all=-N -l\" -o app ./cmd/app\ndlv exec ./app","handlingStrategy":"fallback","validationCode":"// check target Go version supports runtime.debugCallV2 (Go >= 1.11)\n// dlv> version   (shows target's Go producer)","typeGuard":null,"tryCatchPattern":"if errors.Is(err, proc.ErrFuncCallUnsupported) {\n    // fall back to breakpoints + variable inspection instead of injecting calls\n}","preventionTips":["Always build debug targets with a current Go toolchain","Verify the target binary's Go version before scripting 'call' commands","Avoid attaching Delve to very old prebuilt binaries if you need call injection"],"tags":["go","function-call","version-compat"],"backgroundTag":"func-call-unsupported-go-version","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}