diff --git a/proctl/proctl_linux_amd64.go b/proctl/proctl_linux_amd64.go index 3ce5fe42..6fb3e5f2 100644 --- a/proctl/proctl_linux_amd64.go +++ b/proctl/proctl_linux_amd64.go @@ -108,9 +108,8 @@ func NewDebugProcess(pid int) (*DebuggedProcess, error) { } func (dbp *DebuggedProcess) AttachThread(tid int) (*ThreadContext, error) { - var ( - status syscall.WaitStatus - ) + var status syscall.WaitStatus + if thread, ok := dbp.Threads[tid]; ok { return thread, nil }