{"record":{"id":"74ad5d59e32e0e21","repo":"go-delve/delve","slug":"follow-exec-not-supported","errorCode":null,"errorMessage":"follow exec not supported","messagePattern":"follow exec not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/gdbserial/gdbserver.go","lineNumber":1350,"sourceCode":"func (p *gdbProcess) WriteBreakpoint(bp *proc.Breakpoint) error {\n\tkind := p.breakpointKind\n\tif bp.WatchType != 0 {\n\t\tkind = bp.WatchType.Size()\n\t}\n\treturn p.conn.setBreakpoint(bp.Addr, watchTypeToBreakpointType(bp.WatchType), kind)\n}\n\nfunc (p *gdbProcess) EraseBreakpoint(bp *proc.Breakpoint) error {\n\tkind := p.breakpointKind\n\tif bp.WatchType != 0 {\n\t\tkind = bp.WatchType.Size()\n\t}\n\treturn p.conn.clearBreakpoint(bp.Addr, watchTypeToBreakpointType(bp.WatchType), kind)\n}\n\n// FollowExec enables (or disables) follow exec mode\nfunc (p *gdbProcess) FollowExec(bool) error {\n\treturn errors.New(\"follow exec not supported\")\n}\n\ntype threadUpdater struct {\n\tp    *gdbProcess\n\tseen map[int]bool\n\tdone bool\n}\n\nfunc (tu *threadUpdater) Reset() {\n\ttu.done = false\n\ttu.seen = nil\n}\n\nfunc (tu *threadUpdater) Add(threads []string) error {\n\tif tu.done {\n\t\tpanic(\"threadUpdater: Add after Finish\")\n\t}\n\tif tu.seen == nil {","sourceCodeStart":1332,"sourceCodeEnd":1368,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/gdbserial/gdbserver.go#L1332-L1368","documentation":"gdbProcess.FollowExec is a stub for the gdbserial backend: it unconditionally returns 'follow exec not supported'. Follow-exec (automatically debugging child processes after execve) requires ptrace-level support the GDB remote protocol connection does not provide.","triggerScenarios":"Calling gdbProcess.FollowExec(true) (e.g. via the debugger's follow-exec toggle) on any session using the gdbserial backend (lldb/rr).","commonSituations":"Enabling follow-exec mode in delve while connected via 'dlv connect' to an lldb-server or during rr replay.","solutions":["Use the native backend (dlv debug/exec --backend=native) where follow-exec is implemented.","Disable follow-exec mode; debug the child process directly by attaching to it after it execs.","Re-run the program under delve with the child entrypoint as the main target.","Check delve release notes; support may be backend-limited indefinitely."],"exampleFix":"// before\ndlv --backend=lldb exec ./app   // then enable follow-exec\n// after\ndlv --backend=native exec ./app // follow-exec supported","handlingStrategy":"fallback","validationCode":"if _, ok := p.(*gdbserial.gdbProcess); ok {\n    return errors.New(\"follow exec requires the native backend\")\n}","typeGuard":null,"tryCatchPattern":"if err := p.FollowExec(true); err != nil {\n    // fall back: attach to child manually after exec\n}","preventionTips":["Enable follow-exec only with --backend=native.","For multi-process programs under lldb/rr, launch/attach the child directly.","Document backend feature limits in your tooling before toggling follow-exec."],"tags":["gdbserial","follow-exec","unsupported-feature"],"backgroundTag":"feature-unsupported-by-backend","analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}