go-delve/delve · error
not implemented
Error message
not implemented
What it means
When unwinding injected function calls, Delve restores saved registers on the current thread. SP and PC restoration is shared across amd64/arm64/ppc64le/loong64, but the LR (link register) restore only applies to the arm64/ppc64le/loong64 group; any other architecture reaching this code path hits the default panic. It indicates function-call injection (an eval -c / expr call) is unsupported on that CPU architecture.
Source
Thrown at pkg/proc/eval.go:1067
// executed but CallInjectionComplete2 hasn't.
regs, err := curthread.Registers()
if err == nil {
callInjectionComplete2(scope, scope.BinInfo, fncall, regs, curthread)
}
} else {
// undoInjection is set if evalop.CallInjectionSetTarget has been
// executed but evalop.CallInjectionComplete hasn't, we must undo the callOP
// call in evalop.CallInjectionSetTarget before continuing.
switch scope.BinInfo.Arch.Name {
case "amd64":
regs, _ := curthread.Registers()
setSP(curthread, regs.SP()+uint64(scope.BinInfo.Arch.PtrSize()))
setPC(curthread, fncall.undoInjection.oldpc)
case "arm64", "ppc64le", "loong64":
setLR(curthread, fncall.undoInjection.oldlr)
setPC(curthread, fncall.undoInjection.oldpc)
default:
panic("not implemented")
}
}
}
stack.lastRetiredFncall = fncall
// Resume target to undo one call
stack.callInjectionContinue = true
scope.callCtx.injectionThread = nil
return
}
}
func (stack *evalStack) result(cfg *LoadConfig) (*Variable, error) {
var r *Variable
switch len(stack.stack) {
case 0:
// ok
case 1:
r = stack.peek()View on GitHub (pinned to a23773e6c3)
Solutions
- Avoid function call expressions on architectures lacking call-injection support; only use them on amd64/arm64/ppc64le/loong64
- Add the missing architecture case (setLR/setPC handling) if porting call injection to a new arch
- Report/track upstream: function calls are arch-dependent features in Delve
Example fix
// before
default:
panic("not implemented")
// after
default:
return fmt.Errorf("function call injection not supported on %s", scope.BinInfo.Arch.Name) Defensive patterns
Strategy: validation
Validate before calling
var callInjectionArches = map[string]bool{"amd64":true,"arm64":true,"ppc64le":true,"loong64":true}
if !callInjectionArches[scope.BinInfo.Arch.Name] {
return fmt.Errorf("function calls not supported on %s", scope.BinInfo.Arch.Name)
} Prevention
- Only evaluate function-call expressions on amd64/arm64/ppc64le/loong64 targets
- Treat 'call function' IDE features as an arch-dependent capability; query it before offering the UI
- Track Delve release notes for newly supported call-injection architectures
When it happens
Trigger: Evaluating a function call expression (e.g. 'print someFunc(...)' or 'eval -c') in a debug session whose target architecture is not amd64, arm64, ppc64le, or loong64 (e.g. 386, riscv64), then the call is unwound via run()'s restore path hitting the default case.
Common situations: Debugging on riscv64 or 386 and trying to call a function from the prompt; IDE 'call function' features on newly supported architectures where fncall injection isn't implemented.
Related errors
- not implemented
- not implemented
- not implemented
- not implemented: %s
- could not get precheck error reason: %v
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/fa9fce0aa6587b49.
Report an issue: GitHub.