{"record":{"id":"bcc414dd82332c99","repo":"go-delve/delve","slug":"unknown-type-t","errorCode":null,"errorMessage":"unknown type: %T","messagePattern":"unknown type: %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/proc/variables.go","lineNumber":789,"sourceCode":"\tcase *godwarf.UintType:\n\t\tv.Kind = reflect.Uint\n\tcase *godwarf.FloatType:\n\t\tswitch t.ByteSize {\n\t\tcase 4:\n\t\t\tv.Kind = reflect.Float32\n\t\tcase 8:\n\t\t\tv.Kind = reflect.Float64\n\t\t}\n\tcase *godwarf.BoolType:\n\t\tv.Kind = reflect.Bool\n\tcase *godwarf.FuncType:\n\t\tv.Kind = reflect.Func\n\tcase *godwarf.VoidType:\n\t\tv.Kind = reflect.Invalid\n\tcase *godwarf.UnspecifiedType:\n\t\tv.Kind = reflect.Invalid\n\tdefault:\n\t\tv.Unreadable = fmt.Errorf(\"unknown type: %T\", t)\n\t}\n\n\treturn v\n}\n\nvar constantMaxInt64 = constant.MakeInt64(1<<63 - 1)\n\nfunc newConstant(val constant.Value, bi *BinaryInfo, mem MemoryReadWriter) *Variable {\n\tv := &Variable{Value: val, mem: mem, loaded: true, bi: bi}\n\tswitch val.Kind() {\n\tcase constant.Int:\n\t\tv.Kind = reflect.Int\n\t\tif constant.Sign(val) >= 0 && constant.Compare(val, token.GTR, constantMaxInt64) {\n\t\t\tv.Kind = reflect.Uint64\n\t\t}\n\tcase constant.Float:\n\t\tv.Kind = reflect.Float64\n\tcase constant.Bool:","sourceCodeStart":771,"sourceCodeEnd":807,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/variables.go#L771-L807","documentation":"convertDBFType (the DWARF-type-to-Variable conversion switch) encountered a godwarf.Type implementation it does not recognize, so the variable is marked Unreadable with this error. Delve supports the standard set of DWARF type kinds (Int, Ptr, Struct, Func, Void, Unspecified, etc.); anything else falls into the default branch.","triggerScenarios":"Evaluating a variable whose DIE resolves to a godwarf type variant outside the handled cases — typically a custom/exotic DWARF type produced by a non-Go compiler or a DWARF parser edge case producing an unexpected type object.","commonSituations":"Mixed-language binaries (C/C++ via cgo) with type constructs Delve does not model; DWARF version or producer features newer than the Delve version in use.","solutions":["Inspect the variable's DWARF type (call TypeString()) to identify the unsupported kind and report it to go-delve/delve.","Upgrade Delve — newer versions handle more DWARF type variants.","Restrict evaluation to variables with plain Go types; restructure code so the exotic type is not on the evaluated path."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":"// Skip evaluation when the variable is marked unreadable\nif v.Unreadable != nil {\n    return fmt.Sprintf(\"<unreadable: %v>\", v.Unreadable)\n}","tryCatchPattern":"v, err := client.EvalVariable(scope, expr, cfg)\nif err == nil && v.Unreadable != nil && strings.Contains(v.Unreadable.Error(), \"unknown type:\") {\n    // unsupported DWARF type: degrade gracefully, show raw info instead\n}","preventionTips":["Keep Delve updated to cover newer DWARF producers","Avoid evaluating mixed-language (cgo) exotic types","Prefer plain Go types on inspected code paths"],"tags":["go","debugger","dwarf","types"],"backgroundTag":"unsupported-dwarf-type","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}