{"record":{"id":"6b200b9c146cc10b","repo":"go-delve/delve","slug":"unsupported-machine-type","errorCode":null,"errorMessage":"unsupported machine type","messagePattern":"unsupported machine type","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/core/linux_core.go","lineNumber":162,"sourceCode":"\t\tif exeELF.Type != elf.ET_EXEC && exeELF.Type != elf.ET_DYN {\n\t\t\treturn nil, nil, fmt.Errorf(\"%v is not an exe file\", exeELF)\n\t\t}\n\t}\n\n\tmemory := buildMemory(coreFile, exeELF, exe, notes)\n\n\t// TODO support 386\n\tvar bi *proc.BinaryInfo\n\tif platformIndependentDelveCore {\n\t\tgoos, goarch, err := platformFromNotes(notes)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tbi = proc.NewBinaryInfo(goos, goarch)\n\t} else if goarch, ok := supportedLinuxMachines[machineType]; ok {\n\t\tbi = proc.NewBinaryInfo(\"linux\", goarch)\n\t} else {\n\t\treturn nil, nil, errors.New(\"unsupported machine type\")\n\t}\n\n\tentryPoint := findEntryPoint(notes, bi.Arch.PtrSize())\n\n\tp := &process{\n\t\tmem:         memory,\n\t\tThreads:     map[int]*thread{},\n\t\tentryPoint:  entryPoint,\n\t\tbi:          bi,\n\t\tbreakpoints: proc.NewBreakpointMap(),\n\t}\n\n\tif platformIndependentDelveCore {\n\t\tcurrentThread, err := threadsFromDelveNotes(p, notes)\n\t\treturn p, currentThread, err\n\t}\n\n\tcurrentThread := linuxThreadsFromNotes(p, notes, machineType)","sourceCodeStart":144,"sourceCodeEnd":180,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/core/linux_core.go#L144-L180","documentation":"readLinuxOrPlatformIndependentCore (pkg/proc/core/linux_core.go:162) returns 'unsupported machine type' when the core's ELF e_machine value maps neither to a known non-Linux (platform-independent) goarch nor to an entry in supportedLinuxMachines. Delve cannot pick a register layout/pointer size for that architecture, so opening the core aborts.","triggerScenarios":"Calling OpenCore on a Linux ELF core dumped on an architecture absent from supportedLinuxMachines (e.g. 32-bit arm, s390x, mips), or a core whose ELF header was corrupted so machineType parses to an unknown value.","commonSituations":"Cores captured on embedded/uncommon CPUs then analyzed on a delve build supporting only amd64/arm64/386/ppc64le/riscv64/loong64; cross-arch debugging with an old delve version missing a newer port; corrupted downloads flipping header bytes.","solutions":["Check the core's architecture (readelf -h core | grep Machine) and confirm your delve version supports it (amd64, arm64, 386, ppc64le, riscv64, loong64).","Upgrade delve to the latest version, which may have added support for that machine type.","Reproduce the crash on a supported architecture if possible, or analyze the core with gdb instead.","Re-acquire the core file if the header is corrupted (verify with checksums)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// inspect ELF header before OpenCore\nf, _ := elf.Open(corePath); defer f.Close()\nswitch f.Machine {\ncase elf.EM_X86_64, elf.EM_AARCH64, elf.EM_386, elf.EM_PPC64, elf.EM_RISCV, elf.EM_LOONGARCH:\n    // supported\ndefault:\n    return fmt.Errorf(\"architecture %v not supported by this delve build\", f.Machine)\n}","typeGuard":"func supportedMachine(m elf.Machine) bool {\n    switch m {\n    case elf.EM_X86_64, elf.EM_AARCH64, elf.EM_386, elf.EM_PPC64, elf.EM_RISCV, elf.EM_LOONGARCH:\n        return true\n    }\n    return false\n}","tryCatchPattern":"tg, err := core.OpenCore(corePath, exePath, dirs)\nif err != nil && strings.Contains(err.Error(), \"unsupported machine type\") {\n    return fmt.Errorf(\"core architecture not supported; readelf -h %s | grep Machine\", corePath)\n}","preventionTips":["Check `readelf -h core` Machine field before analyzing cross-arch cores.","Match your delve build to the architecture the core came from.","Keep delve up to date for newly added architecture ports.","Reject unsupported-arch cores early in collection pipelines."],"tags":["core-dump","architecture","elf","go","delve"],"backgroundTag":"unsupported-architecture","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}