{"record":{"id":"bacb6ba8c5a5e025","repo":"go-delve/delve","slug":"can-not-parse-checkpoint-response-q","errorCode":null,"errorMessage":"can not parse checkpoint response %q","messagePattern":"can not parse checkpoint response %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/gdbserial/gdbserver.go","lineNumber":1184,"sourceCode":"\treturn strings.TrimSpace(event), nil\n}\n\nconst (\n\tcheckpointPrefix = \"Checkpoint \"\n)\n\n// Checkpoint creates a checkpoint from which you can restart the program.\nfunc (p *gdbProcess) Checkpoint(where string) (int, error) {\n\tif p.tracedir == \"\" {\n\t\treturn -1, proc.ErrNotRecorded\n\t}\n\tresp, err := p.conn.qRRCmd(\"checkpoint\", where)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\n\tif !strings.HasPrefix(resp, checkpointPrefix) {\n\t\treturn -1, fmt.Errorf(\"can not parse checkpoint response %q\", resp)\n\t}\n\n\tidstr := resp[len(checkpointPrefix):]\n\tspace := strings.Index(idstr, \" \")\n\tif space < 0 {\n\t\treturn -1, fmt.Errorf(\"can not parse checkpoint response %q\", resp)\n\t}\n\tidstr = idstr[:space]\n\n\tcpid, err := strconv.Atoi(idstr)\n\tif err != nil {\n\t\treturn -1, err\n\t}\n\treturn cpid, nil\n}\n\n// Checkpoints returns a list of all checkpoints set.\nfunc (p *gdbProcess) Checkpoints() ([]proc.Checkpoint, error) {","sourceCodeStart":1166,"sourceCodeEnd":1202,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/gdbserial/gdbserver.go#L1166-L1202","documentation":"Delve's Checkpoint command sends the gdb 'checkpoint' packet and expects a reply starting with the known prefix (\"Checkpoint \"). If the reply does not have that prefix, the response cannot be parsed and this error is returned with the raw response quoted.","triggerScenarios":"Calling Checkpoint against a stub that does not implement checkpoints but returns an error-style or unrecognized reply to the 'checkpoint' command instead of the gdb-remote format 'Checkpoint N at ...'.","commonSituations":"Using checkpoint/reverse-continue features against gdbserver builds without checkpoint support, or against stubs (lldb-server, debugserver, rr variants) that reply with an error string like 'E01' or a custom message.","solutions":["Verify the stub supports checkpoints (test `checkpoint` in native gdb against the same target first)","Use gdbserver (not lldb-server/debugserver) when checkpoints are required","Check the quoted response %q in the error to see what the stub actually returned and adapt","Use rr's native checkpoint interface (rr checkpoints) instead of the Delve gdbserial path if the stub differs"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"// confirm stub supports checkpoints before calling:\nsupportsCheckpoints := func(stubName string) bool {\n    return strings.Contains(stubName, \"gdbserver\") || strings.Contains(stubName, \"rr\")\n}","typeGuard":null,"tryCatchPattern":"id, err := proc.Checkpoint(where)\nif err != nil && strings.Contains(err.Error(), \"can not parse checkpoint response\") {\n    // stub lacks gdb-format checkpoint support; surface to user\n    return fmt.Errorf(\"checkpoints unsupported by this stub: %w\", err)\n}","preventionTips":["Use gdbserver or rr when checkpoints are needed","Test the 'checkpoint' packet against your stub before exposing the feature","Do not enable checkpoint UI for lldb-server/debugserver backends","Log raw stub replies to diagnose format drift early"],"tags":["gdbserial","checkpoint","gdb-remote","parsing"],"backgroundTag":"unexpected-stub-response","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}