{"record":{"id":"c0b74907c7b555d5","repo":"go-delve/delve","slug":"not-implemented-c0b749","errorCode":null,"errorMessage":"not implemented","messagePattern":"not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/gdbserial/gdbserver.go","lineNumber":269,"sourceCode":"\tcase \"amd64\":\n\t\tp.breakpointKind = 1\n\tcase \"arm64\":\n\t\tp.breakpointKind = 4\n\t}\n\n\tp.regnames.PC = registerName(p.bi.Arch, p.bi.Arch.PCRegNum)\n\tp.regnames.SP = registerName(p.bi.Arch, p.bi.Arch.SPRegNum)\n\tp.regnames.BP = registerName(p.bi.Arch, p.bi.Arch.BPRegNum)\n\n\tswitch p.bi.Arch.Name {\n\tcase \"arm64\":\n\t\tp.regnames.BP = \"fp\"\n\t\tp.regnames.CX = \"x0\"\n\tcase \"amd64\":\n\t\tp.regnames.CX = \"rcx\"\n\t\tp.regnames.FsBase = \"fs_base\"\n\tdefault:\n\t\tpanic(\"not implemented\")\n\t}\n\n\tif process != nil {\n\t\tp.waitChan = make(chan *os.ProcessState)\n\t\tgo func() {\n\t\t\tstate, _ := process.Wait()\n\t\t\tp.waitChan <- state\n\t\t}()\n\t}\n\n\treturn p\n}\n\n// Listen waits for a connection from the stub.\nfunc (p *gdbProcess) Listen(listener net.Listener, path, cmdline string, pid int, debugInfoDirs []string, stopReason proc.StopReason) (*proc.TargetGroup, error) {\n\tacceptChan := make(chan net.Conn)\n\n\tgo func() {","sourceCodeStart":251,"sourceCodeEnd":287,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/gdbserial/gdbserver.go#L251-L287","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","solutions":["Use gdbserial debugging only on supported architectures (amd64, arm64, etc.)","Add the arch case with the correct gdb/lldb register names in newProcess if porting to a new architecture","Verify the arch string being passed (from GOARCH / binary info) is correct — an empty or garbage value also lands in default"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"var supportedGdbserialArches = map[string]bool{\"amd64\":true,\"arm64\":true,\"386\":true}\nif !supportedGdbserialArches[arch] {\n\treturn fmt.Errorf(\"gdbserial backend does not support %s\", arch)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify GOARCH before choosing the gdbserial backend for lldb-server/rr/debugserver sessions","Use the native backend where available for exotic architectures","Validate the arch string passed to LLDBLaunch/LLDBAttach/Replay is non-empty and correct"],"tags":["gdbserial","register-names","architecture-support","panic"],"backgroundTag":"unsupported-architecture","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}