{"record":{"id":"d7f0d70160fd2536","repo":"go-delve/delve","slug":"function-s-is-inlined","errorCode":null,"errorMessage":"function %s is inlined","messagePattern":"function (.+?) is inlined","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/proc/eval.go","lineNumber":832,"sourceCode":"\t\tif pkgvar.name == name || strings.HasSuffix(pkgvar.name, \"/\"+name) {\n\t\t\treader := pkgvar.cu.image.dwarfReader\n\t\t\treader.Seek(pkgvar.offset)\n\t\t\tentry, err := reader.Next()\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\treturn extractVarInfoFromEntry(scope.target, scope.BinInfo, pkgvar.cu.image, regsReplaceStaticBase(scope.Regs, pkgvar.cu.image), scope.Mem, godwarf.EntryToTree(entry), 0)\n\t\t}\n\t}\n\tfor _, fn := range scope.BinInfo.Functions {\n\t\tif fn.Name == name || strings.HasSuffix(fn.Name, \"/\"+name) {\n\t\t\t//TODO(aarzilli): convert function entry into a function type?\n\t\t\tr := newVariable(fn.Name, fn.Entry, &godwarf.FuncType{}, scope.BinInfo, scope.Mem)\n\t\t\tr.Value = constant.MakeString(fn.Name)\n\t\t\tr.Base = fn.Entry\n\t\t\tr.loaded = true\n\t\t\tif fn.Entry == 0 {\n\t\t\t\tr.Unreadable = fmt.Errorf(\"function %s is inlined\", fn.Name)\n\t\t\t}\n\t\t\treturn r, nil\n\t\t}\n\t}\n\tfor dwref, ctyp := range scope.BinInfo.consts {\n\t\tfor _, cval := range ctyp.values {\n\t\t\tif cval.fullName == name || strings.HasSuffix(cval.fullName, \"/\"+name) {\n\t\t\t\tt, err := scope.BinInfo.Images[dwref.imageIndex].Type(dwref.offset)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tv := newVariable(name, 0x0, t, scope.BinInfo, scope.Mem)\n\t\t\t\tswitch v.Kind {\n\t\t\t\tcase reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:\n\t\t\t\t\tv.Value = constant.MakeInt64(cval.value)\n\t\t\t\tcase reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:\n\t\t\t\t\tv.Value = constant.MakeUint64(uint64(cval.value))\n\t\t\t\tdefault:","sourceCodeStart":814,"sourceCodeEnd":850,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/eval.go#L814-L850","documentation":"findGlobalInternal resolves a name to package variables, functions, then constants. When the name matches a function whose DWARF entry has Entry == 0 — meaning the function only exists as an inlined body with no standalone code address — the returned variable is marked Unreadable with this error. The name matched, but there is no concrete function object to represent.","triggerScenarios":"Evaluating a symbol (findGlobal via EvalExpression, or callInjectionStartSpecial resolving a callable) where the only DWARF match is an inlined function instance with fn.Entry == 0; common with generic function instantiations or inlined-only helper symbols in optimized builds.","commonSituations":"Referencing an inlined helper by name in an expression; using a function name as a call-injection target when DWARF records it as inlined-only; name suffix matching (`/pkg/name`) accidentally matching an inlined clone in a different package; stripped/optimized binaries where out-of-line copies were removed.","solutions":["Reference a non-inlined function with the same logic, or disable inlining when building: -gcflags=\"all=-l\".","Use the fully-qualified symbol name to avoid suffix matches landing on inlined clones.","If the goal is reading a value, evaluate a variable/constant instead of the function symbol.","For call injection, choose a target function whose DWARF entry has a real Entry address (check with the `functions` listing)."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"for _, fn := range binInfo.Functions {\n    if fn.Name == sym && fn.Entry != 0 { /* usable function symbol */ }\n}","typeGuard":"func isCallableFunction(fn gosym.Func) bool { return fn.Entry != 0 }","tryCatchPattern":"v, err := scope.EvalExpression(sym, cfg)\nif err != nil || (v != nil && v.Unreadable != nil) {\n    // fall back to a fully-qualified name or a non-inlined equivalent\n    v, err = scope.EvalExpression(\"pkg.\"+sym, cfg)\n}","preventionTips":["Build with -gcflags=\"all=-l\" to keep out-of-line function copies when symbols must be addressable","Use fully-qualified package-qualified names to avoid suffix matches on inlined clones","Check fn.Entry != 0 in the functions listing before using a function as a call-injection target","Prefer variables/constants over function symbols when reading values"],"tags":["go","debugger","inlining","symbol-resolution"],"backgroundTag":"inlined-function-symbol","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}