go-delve/delve · error
unsupported machine type
Error message
unsupported machine type
What it means
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.
Source
Thrown at pkg/proc/core/linux_core.go:162
if exeELF.Type != elf.ET_EXEC && exeELF.Type != elf.ET_DYN {
return nil, nil, fmt.Errorf("%v is not an exe file", exeELF)
}
}
memory := buildMemory(coreFile, exeELF, exe, notes)
// TODO support 386
var bi *proc.BinaryInfo
if platformIndependentDelveCore {
goos, goarch, err := platformFromNotes(notes)
if err != nil {
return nil, nil, err
}
bi = proc.NewBinaryInfo(goos, goarch)
} else if goarch, ok := supportedLinuxMachines[machineType]; ok {
bi = proc.NewBinaryInfo("linux", goarch)
} else {
return nil, nil, errors.New("unsupported machine type")
}
entryPoint := findEntryPoint(notes, bi.Arch.PtrSize())
p := &process{
mem: memory,
Threads: map[int]*thread{},
entryPoint: entryPoint,
bi: bi,
breakpoints: proc.NewBreakpointMap(),
}
if platformIndependentDelveCore {
currentThread, err := threadsFromDelveNotes(p, notes)
return p, currentThread, err
}
currentThread := linuxThreadsFromNotes(p, notes, machineType)View on GitHub (pinned to a23773e6c3)
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).
Defensive patterns
Strategy: validation
Validate before calling
// inspect ELF header before OpenCore
f, _ := elf.Open(corePath); defer f.Close()
switch f.Machine {
case elf.EM_X86_64, elf.EM_AARCH64, elf.EM_386, elf.EM_PPC64, elf.EM_RISCV, elf.EM_LOONGARCH:
// supported
default:
return fmt.Errorf("architecture %v not supported by this delve build", f.Machine)
} Type guard
func supportedMachine(m elf.Machine) bool {
switch m {
case elf.EM_X86_64, elf.EM_AARCH64, elf.EM_386, elf.EM_PPC64, elf.EM_RISCV, elf.EM_LOONGARCH:
return true
}
return false
} Try / catch
tg, err := core.OpenCore(corePath, exePath, dirs)
if err != nil && strings.Contains(err.Error(), "unsupported machine type") {
return fmt.Errorf("core architecture not supported; readelf -h %s | grep Machine", corePath)
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- short read
- can not continue execution of core process
- can not change register values of core process
- unrecognized core format
- cannot write a breakpoint to a core file
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/6b200b9c146cc10b.
Report an issue: GitHub.