go-delve/delve · error

not implemented

Error message

not implemented

What it means

pkg/proc/dump.go writes a core dump of the debugged process. When constructing the ELF file header it maps the target's GOARCH string to an ELF machine type (EM_X86_64, EM_AARCH64, ...). If the architecture is one the dump writer has no case for, it panics 'not implemented' — meaning 'dlv dump' does not support producing a core file for that architecture yet.

Source

Thrown at pkg/proc/dump.go:146

	}

	fhdr.Type = elf.ET_CORE

	switch bi.Arch.Name {
	case "amd64":
		fhdr.Machine = elf.EM_X86_64
	case "386":
		fhdr.Machine = elf.EM_386
	case "arm64":
		fhdr.Machine = elf.EM_AARCH64
	case "ppc64le":
		fhdr.Machine = elf.EM_PPC64
	case "riscv64":
		fhdr.Machine = elf.EM_RISCV
	case "loong64":
		fhdr.Machine = elf.EM_LOONGARCH
	default:
		panic("not implemented")
	}

	fhdr.Entry = 0

	w := elfwriter.New(out, &fhdr)

	notes := []elfwriter.Note{}

	entryPoint, err := t.EntryPoint()
	if err != nil {
		state.setErr(err)
		return
	}

	notes = append(notes, elfwriter.Note{
		Type: elfwriter.DelveHeaderNoteType,
		Name: "Delve Header",
		Data: fmt.Appendf(nil, "%s/%s\n%s\n%s%d\n%s%#x\n", bi.GOOS, bi.Arch.Name, version.DelveVersion.String(), elfwriter.DelveHeaderTargetPidPrefix, t.pid, elfwriter.DelveHeaderEntryPointPrefix, entryPoint),

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Use a supported architecture (amd64, arm64, 386, ppc64le, riscv64, loong64) when creating dumps
  2. Inspect the arch string reaching Dump and add the missing elf.EM_* case if adding support for a new architecture
  3. For unsupported arches, capture a core dump via the OS instead (ulimit -c unlimited + core_pattern) rather than 'dlv dump'

Example fix

// before
default:
	panic("not implemented")
// after
default:
	return fmt.Errorf("core dump generation not implemented for architecture %q", arch)
Defensive patterns

Strategy: validation

Validate before calling

var supportedDumpArches = map[string]bool{"amd64":true,"arm64":true,"386":true,"ppc64le":true,"riscv64":true,"loong64":true}
if !supportedDumpArches[arch] {
	return fmt.Errorf("dlv dump not supported on %s; capture an OS core dump instead", arch)
}

Prevention

When it happens

Trigger: Running the dump command (debugger.Dump → pkg/proc/dump.go) with a target whose arch is any value other than amd64, arm64, 386, ppc64le, riscv64, or loong64 — e.g. an unrecognized or missing arch string.

Common situations: Creating core dumps on unsupported architectures; cross-debugging binaries built for a GOARCH Delve's dumper doesn't cover; running on newly ported architectures before dump support lands.

Related errors


AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31). Data as JSON: /api/errors/1eb30b0f7a9abf45. Report an issue: GitHub.