{"record":{"id":"055a89aa096b432a","repo":"go-delve/delve","slug":"can-not-parse-info-checkpoints-output-line-q-055a89","errorCode":null,"errorMessage":"can not parse \"info checkpoints\" output line %q: %v","messagePattern":"can not parse \"info checkpoints\" output line %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/gdbserial/gdbserver.go","lineNumber":1222,"sourceCode":"\t\treturn nil, proc.ErrNotRecorded\n\t}\n\tresp, err := p.conn.qRRCmd(\"info checkpoints\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tlines := strings.Split(resp, \"\\n\")\n\tr := make([]proc.Checkpoint, 0, len(lines)-1)\n\tfor _, line := range lines[1:] {\n\t\tif line == \"\" {\n\t\t\tcontinue\n\t\t}\n\t\tfields := strings.Split(line, \"\\t\")\n\t\tif len(fields) != 3 {\n\t\t\treturn nil, fmt.Errorf(\"can not parse \\\"info checkpoints\\\" output line %q\", line)\n\t\t}\n\t\tcpid, err := strconv.Atoi(fields[0])\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"can not parse \\\"info checkpoints\\\" output line %q: %v\", line, err)\n\t\t}\n\t\tr = append(r, proc.Checkpoint{ID: cpid, When: fields[1], Where: fields[2]})\n\t}\n\treturn r, nil\n}\n\nconst deleteCheckpointPrefix = \"Deleted checkpoint \"\n\n// ClearCheckpoint clears the checkpoint for the given ID.\nfunc (p *gdbProcess) ClearCheckpoint(id int) error {\n\tif p.tracedir == \"\" {\n\t\treturn proc.ErrNotRecorded\n\t}\n\tresp, err := p.conn.qRRCmd(\"delete checkpoint\", strconv.Itoa(id))\n\tif err != nil {\n\t\treturn err\n\t}\n\tif !strings.HasPrefix(resp, deleteCheckpointPrefix) {","sourceCodeStart":1204,"sourceCodeEnd":1240,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/gdbserial/gdbserver.go#L1204-L1240","documentation":"Second parsing failure in CheckpointsList: the line had 3 fields but the first field (checkpoint ID) is not a decimal integer, so strconv.Atoi fails; the error is wrapped into this message with the line and the Atoi error.","triggerScenarios":"The 'info checkpoints' line's first column is non-numeric — e.g. an informational line slipped past the 3-field check, a header variant with different column labels, or localized stub output.","commonSituations":"Stub variants that prepend labels or symbols to IDs; header lines with exactly 3 tab-separated column names like 'Id\\tWhen\\tWhere' where 'Id' fails Atoi on nonstandard headers.","solutions":["Ensure the stub emits the standard gdbserver header and body ('Id', 'When', 'Where' header is skipped via lines[1:])","Check the Atoi error in the message to identify the exact offending text","Patch the stub to output numeric IDs in the first column","List checkpoints with gdb directly to confirm the expected output format"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"idNumeric := func(line string) bool {\n    f := strings.Split(line, \"\\t\")\n    if len(f) != 3 { return false }\n    _, err := strconv.Atoi(f[0]); return err == nil\n}","typeGuard":null,"tryCatchPattern":"cps, err := proc.CheckpointsList()\nif err != nil {\n    var pe *strconv.NumError\n    if errors.As(err, &pe) || strings.Contains(err.Error(), \"can not parse \\\"info checkpoints\\\"\") {\n        return nil, fmt.Errorf(\"checkpoint ID column not numeric: %w\", err)\n    }\n    return nil, err\n}","preventionTips":["Confirm the first column of 'info checkpoints' is a numeric ID","Skip/strip header or informational lines in stub output","Standardize on gdbserver's output format","Log the offending line (it is quoted in the error) to fix the stub"],"tags":["gdbserial","checkpoint","parsing","gdb-remote"],"backgroundTag":"unexpected-stub-response","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}