{"record":{"id":"fa9fce0aa6587b49","repo":"go-delve/delve","slug":"not-implemented-fa9fce","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/eval.go","lineNumber":1067,"sourceCode":"\t\t\t\t// executed but CallInjectionComplete2 hasn't.\n\t\t\t\tregs, err := curthread.Registers()\n\t\t\t\tif err == nil {\n\t\t\t\t\tcallInjectionComplete2(scope, scope.BinInfo, fncall, regs, curthread)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// undoInjection is set if evalop.CallInjectionSetTarget has been\n\t\t\t\t// executed but evalop.CallInjectionComplete hasn't, we must undo the callOP\n\t\t\t\t// call in evalop.CallInjectionSetTarget before continuing.\n\t\t\t\tswitch scope.BinInfo.Arch.Name {\n\t\t\t\tcase \"amd64\":\n\t\t\t\t\tregs, _ := curthread.Registers()\n\t\t\t\t\tsetSP(curthread, regs.SP()+uint64(scope.BinInfo.Arch.PtrSize()))\n\t\t\t\t\tsetPC(curthread, fncall.undoInjection.oldpc)\n\t\t\t\tcase \"arm64\", \"ppc64le\", \"loong64\":\n\t\t\t\t\tsetLR(curthread, fncall.undoInjection.oldlr)\n\t\t\t\t\tsetPC(curthread, fncall.undoInjection.oldpc)\n\t\t\t\tdefault:\n\t\t\t\t\tpanic(\"not implemented\")\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstack.lastRetiredFncall = fncall\n\t\t// Resume target to undo one call\n\t\tstack.callInjectionContinue = true\n\t\tscope.callCtx.injectionThread = nil\n\t\treturn\n\t}\n}\n\nfunc (stack *evalStack) result(cfg *LoadConfig) (*Variable, error) {\n\tvar r *Variable\n\tswitch len(stack.stack) {\n\tcase 0:\n\t\t// ok\n\tcase 1:\n\t\tr = stack.peek()","sourceCodeStart":1049,"sourceCodeEnd":1085,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/eval.go#L1049-L1085","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\ndefault:\n\tpanic(\"not implemented\")\n// after\ndefault:\n\treturn fmt.Errorf(\"function call injection not supported on %s\", scope.BinInfo.Arch.Name)","handlingStrategy":"validation","validationCode":"var callInjectionArches = map[string]bool{\"amd64\":true,\"arm64\":true,\"ppc64le\":true,\"loong64\":true}\nif !callInjectionArches[scope.BinInfo.Arch.Name] {\n\treturn fmt.Errorf(\"function calls not supported on %s\", scope.BinInfo.Arch.Name)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["function-calls","architecture-support","fncall","panic"],"backgroundTag":"unsupported-architecture","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}