{"record":{"id":"605186452fb88885","repo":"go-delve/delve","slug":"address-x-does-not-belong-to-any-function","errorCode":null,"errorMessage":"address %#x does not belong to any function","messagePattern":"address %#x does not belong to any function","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/debugger/debugger.go","lineNumber":2165,"sourceCode":"\t\treturn locations, subst, &locspec.ErrLocationNotFound{Spec: locStr}\n\t}\n\treturn locations, subst, nil\n}\n\n// Disassemble code between startPC and endPC.\n// if endPC == 0 it will find the function containing startPC and disassemble the whole function.\nfunc (d *Debugger) Disassemble(goroutineID int64, addr1, addr2 uint64) ([]proc.AsmInstruction, error) {\n\td.targetMutex.Lock()\n\tdefer d.targetMutex.Unlock()\n\n\tif _, err := d.target.Valid(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif addr2 == 0 {\n\t\tfn := d.target.Selected.BinInfo().PCToFunc(addr1)\n\t\tif fn == nil {\n\t\t\treturn nil, fmt.Errorf(\"address %#x does not belong to any function\", addr1)\n\t\t}\n\t\taddr1 = fn.Entry\n\t\taddr2 = fn.End\n\t}\n\n\tg, err := proc.FindGoroutine(d.target.Selected, goroutineID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tcurthread := d.target.Selected.CurrentThread()\n\tif g != nil && g.Thread != nil {\n\t\tcurthread = g.Thread\n\t}\n\tregs, _ := curthread.Registers()\n\n\treturn proc.Disassemble(d.target.Selected.Memory(), regs, d.target.Selected.Breakpoints(), d.target.Selected.BinInfo(), addr1, addr2)\n}","sourceCodeStart":2147,"sourceCodeEnd":2183,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/service/debugger/debugger.go#L2147-L2183","documentation":"Error \"address %#x does not belong to any function\" thrown in go-delve/delve.","triggerScenarios":"Thrown at service/debugger/debugger.go:2165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}