go-delve/delve · error
can not parse "info checkpoints" output line %q
Error message
can not parse "info checkpoints" output line %q
What it means
CheckpointsList runs the 'info checkpoints' command and parses each tab-separated line as id/when/where (3 fields). If a non-empty line does not split into exactly 3 tab-separated fields, this error is returned quoting the offending line.
Source
Thrown at pkg/proc/gdbserial/gdbserver.go:1218
// Checkpoints returns a list of all checkpoints set.
func (p *gdbProcess) Checkpoints() ([]proc.Checkpoint, error) {
if p.tracedir == "" {
return nil, proc.ErrNotRecorded
}
resp, err := p.conn.qRRCmd("info checkpoints")
if err != nil {
return nil, err
}
lines := strings.Split(resp, "\n")
r := make([]proc.Checkpoint, 0, len(lines)-1)
for _, line := range lines[1:] {
if line == "" {
continue
}
fields := strings.Split(line, "\t")
if len(fields) != 3 {
return nil, fmt.Errorf("can not parse \"info checkpoints\" output line %q", line)
}
cpid, err := strconv.Atoi(fields[0])
if err != nil {
return nil, fmt.Errorf("can not parse \"info checkpoints\" output line %q: %v", line, err)
}
r = append(r, proc.Checkpoint{ID: cpid, When: fields[1], Where: fields[2]})
}
return r, nil
}
const deleteCheckpointPrefix = "Deleted checkpoint "
// ClearCheckpoint clears the checkpoint for the given ID.
func (p *gdbProcess) ClearCheckpoint(id int) error {
if p.tracedir == "" {
return proc.ErrNotRecorded
}
resp, err := p.conn.qRRCmd("delete checkpoint", strconv.Itoa(id))View on GitHub (pinned to a23773e6c3)
Solutions
- Use a stub whose 'info checkpoints' output matches gdbserver's 3-tab-column format
- Inspect the quoted line in the error to see the actual format mismatch
- Trim or filter extra output lines at the stub level if you control it
- Avoid the CheckpointsList API on stubs known to be incompatible; manage checkpoints out-of-band
Defensive patterns
Strategy: validation
Validate before calling
// sanity-check stub output format before parsing lists:
lineLooksLikeCheckpoint := func(line string) bool {
f := strings.Split(line, "\t")
return len(f) == 3 && f[0] != ""
} Try / catch
cps, err := proc.CheckpointsList()
if err != nil && strings.Contains(err.Error(), "info checkpoints") {
return nil, fmt.Errorf("stub 'info checkpoints' output incompatible: %w", err)
} Prevention
- Use stubs whose 'info checkpoints' output matches gdbserver exactly
- Filter non-tabular stub output lines at the source if you control the stub
- Verify output with gdb against the same target first
- Avoid CheckpointsList on unverified stub vendors
When it happens
Trigger: The stub's 'info checkpoints' output uses spaces instead of tabs, omits a column, or adds extra columns, producing != 3 tab-separated fields after the header line.
Common situations: Stubs with slightly different 'info checkpoints' formatting than gdbserver (column count or separator changes); custom stubs; output that includes trailing annotation lines.
Related errors
- can not parse checkpoint response %q
- can not parse "info checkpoints" output line %q: %v
- could not set register %s: not found
- could not set register %s: wrong size, expected %d got %d
- direction change with internal breakpoints
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/768aca2bc2e7f9ba.
Report an issue: GitHub.