Lines Matching refs:nsTid
36 std::shared_ptr<DfxThread> DfxThread::Create(pid_t pid, pid_t tid, pid_t nsTid) in Create() argument
38 auto thread = std::make_shared<DfxThread>(pid, tid, nsTid); in Create()
42 DfxThread::DfxThread(pid_t pid, pid_t tid, pid_t nsTid) : regs_(nullptr) in DfxThread() argument
44 InitThreadInfo(pid, tid, nsTid); in DfxThread()
47 void DfxThread::InitThreadInfo(pid_t pid, pid_t tid, pid_t nsTid) in InitThreadInfo() argument
51 threadInfo_.nsTid = nsTid; in InitThreadInfo()
101 ptrace(PTRACE_CONT, threadInfo_.nsTid, 0, 0); in Detach()
102 ptrace(PTRACE_DETACH, threadInfo_.nsTid, NULL, NULL); in Detach()
113 if (ptrace(PTRACE_SEIZE, threadInfo_.nsTid, 0, 0) != 0) { in Attach()
115 threadInfo_.tid, threadInfo_.nsTid, getuid(), getgid(), errno); in Attach()
119 if (ptrace(PTRACE_INTERRUPT, threadInfo_.nsTid, 0, 0) != 0) { in Attach()
121 threadInfo_.tid, threadInfo_.nsTid, getuid(), getgid(), errno); in Attach()
122 ptrace(PTRACE_DETACH, threadInfo_.nsTid, NULL, NULL); in Attach()
129 if (waitpid(threadInfo_.nsTid, nullptr, WNOHANG) > 0) { in Attach()
135 ptrace(PTRACE_DETACH, threadInfo_.nsTid, NULL, NULL); in Attach()
136 … DFXLOG_WARN("Failed to wait thread(%d:%d) attached.", threadInfo_.tid, threadInfo_.nsTid); in Attach()