go-delve/delve · error
address %#x does not belong to any function
Error message
address %#x does not belong to any function
What it means
Error "address %#x does not belong to any function" thrown in go-delve/delve.
Source
Thrown at service/debugger/debugger.go:2165
return locations, subst, &locspec.ErrLocationNotFound{Spec: locStr}
}
return locations, subst, nil
}
// Disassemble code between startPC and endPC.
// if endPC == 0 it will find the function containing startPC and disassemble the whole function.
func (d *Debugger) Disassemble(goroutineID int64, addr1, addr2 uint64) ([]proc.AsmInstruction, error) {
d.targetMutex.Lock()
defer d.targetMutex.Unlock()
if _, err := d.target.Valid(); err != nil {
return nil, err
}
if addr2 == 0 {
fn := d.target.Selected.BinInfo().PCToFunc(addr1)
if fn == nil {
return nil, fmt.Errorf("address %#x does not belong to any function", addr1)
}
addr1 = fn.Entry
addr2 = fn.End
}
g, err := proc.FindGoroutine(d.target.Selected, goroutineID)
if err != nil {
return nil, err
}
curthread := d.target.Selected.CurrentThread()
if g != nil && g.Thread != nil {
curthread = g.Thread
}
regs, _ := curthread.Registers()
return proc.Disassemble(d.target.Selected.Memory(), regs, d.target.Selected.Breakpoints(), d.target.Selected.BinInfo(), addr1, addr2)
}View on GitHub (pinned to a23773e6c3)
When it happens
Trigger: Thrown at service/debugger/debugger.go:2165 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31).
Data as JSON: /api/errors/605186452fb88885.
Report an issue: GitHub.