| 179 | } |
| 180 | |
| 181 | bool 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 | |
| 201 | bool KittyTraceMgr::step(int steps) const |
| 202 | { |
nothing calls this directly
no outgoing calls
no test coverage detected