mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
proc: add waitfor option to attach (#3445)
Adds a waitfor option to 'dlv attach' that waits for a process with a name starting with a given prefix to appear before attaching to it. Debugserver on macOS does not support follow-fork mode, but has this feature instead which is not the same thing but still helps with multiprocess debugging somewhat.
This commit is contained in:
committed by
GitHub
parent
2b785f293b
commit
dc5d8de320
@ -87,7 +87,7 @@ func TestSignalDeath(t *testing.T) {
|
||||
assertNoError(err, t, "StdoutPipe")
|
||||
cmd.Stderr = os.Stderr
|
||||
assertNoError(cmd.Start(), t, "starting fixture")
|
||||
p, err := native.Attach(cmd.Process.Pid, []string{})
|
||||
p, err := native.Attach(cmd.Process.Pid, nil, []string{})
|
||||
assertNoError(err, t, "Attach")
|
||||
stdout.Close() // target will receive SIGPIPE later on
|
||||
err = p.Continue()
|
||||
|
||||
Reference in New Issue
Block a user