MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / waitSyscall

Method waitSyscall

KittyMemoryEx/KittyTrace.cpp:181–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179}
180
181bool KittyTraceMgr::waitSyscall() const
182{
183 if (!_attached || _pid <= 0)
184 return false;
185
186 errno = 0;
187 if (ptrace(PTRACE_SYSCALL, _pid, nullptr, nullptr) == -1L)
188 {
189 KITTY_LOGE("PTRACE_SYSCALL failed for pid %d. \"%s\".", _pid, strerror(errno));
190 return false;
191 }
192
193 int status = 0;
194 waitpid(_pid, &status, 0);
195 if (!WIFSTOPPED(status))
196 return false;
197
198 return true;
199}
200
201bool KittyTraceMgr::step(int steps) const
202{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected