go-delve/delve · error

not implemented

Error message

not implemented

What it means

The gdbserial backend (used for lldb-server, Mozilla's rr, macOS debugserver) configures a register-name table based on the target architecture. newProcess only has name mappings for a fixed set of architectures; if the arch string is anything else it panics 'not implemented' during process setup. This means the gdbserial connection backend only supports a fixed set of architectures.

Source

Thrown at pkg/proc/gdbserial/gdbserver.go:269

	case "amd64":
		p.breakpointKind = 1
	case "arm64":
		p.breakpointKind = 4
	}

	p.regnames.PC = registerName(p.bi.Arch, p.bi.Arch.PCRegNum)
	p.regnames.SP = registerName(p.bi.Arch, p.bi.Arch.SPRegNum)
	p.regnames.BP = registerName(p.bi.Arch, p.bi.Arch.BPRegNum)

	switch p.bi.Arch.Name {
	case "arm64":
		p.regnames.BP = "fp"
		p.regnames.CX = "x0"
	case "amd64":
		p.regnames.CX = "rcx"
		p.regnames.FsBase = "fs_base"
	default:
		panic("not implemented")
	}

	if process != nil {
		p.waitChan = make(chan *os.ProcessState)
		go func() {
			state, _ := process.Wait()
			p.waitChan <- state
		}()
	}

	return p
}

// Listen waits for a connection from the stub.
func (p *gdbProcess) Listen(listener net.Listener, path, cmdline string, pid int, debugInfoDirs []string, stopReason proc.StopReason) (*proc.TargetGroup, error) {
	acceptChan := make(chan net.Conn)

	go func() {

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Use gdbserial debugging only on supported architectures (amd64, arm64, etc.)
  2. Add the arch case with the correct gdb/lldb register names in newProcess if porting to a new architecture
  3. Verify the arch string being passed (from GOARCH / binary info) is correct — an empty or garbage value also lands in default
Defensive patterns

Strategy: validation

Validate before calling

var supportedGdbserialArches = map[string]bool{"amd64":true,"arm64":true,"386":true}
if !supportedGdbserialArches[arch] {
	return fmt.Errorf("gdbserial backend does not support %s", arch)
}

Prevention

When it happens

Trigger: Launching/attaching via gdbserial entry points (LLDBLaunch, LLDBAttach, gdbserial.Replay) with an architecture string not in the switch — e.g. an exotic or empty arch — when connecting to lldb-server/debugserver/rr.

Common situations: Using 'dlv connect' or lldb-server based debugging on an unsupported architecture; rr replay on a non-x86 host; misconfigured arch passed to newProcess (empty or wrong GOARCH string).

Related errors


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