| 120 | } |
| 121 | |
| 122 | static void processThreadPC(pid_t tid, struct inlineHookItem *item, int action) { |
| 123 | struct pt_regs regs; |
| 124 | |
| 125 | if (ptrace(PTRACE_GETREGS, tid, NULL, ®s) == 0) { |
| 126 | if (item == NULL) { |
| 127 | int pos; |
| 128 | |
| 129 | for (pos = 0; pos < info.size; ++pos) { |
| 130 | if (doProcessThreadPC(&info.item[pos], ®s, action) == true) { |
| 131 | break; |
| 132 | } |
| 133 | } |
| 134 | } else { |
| 135 | doProcessThreadPC(item, ®s, action); |
| 136 | } |
| 137 | |
| 138 | ptrace(PTRACE_SETREGS, tid, NULL, ®s); |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | static pid_t freeze(struct inlineHookItem *item, int action) { |
| 143 | int count; |
no test coverage detected