resupport ptrace(PTRACE_ATTACH)

refs #733
This commit is contained in:
Tomoki Shirasawa
2016-04-21 20:13:27 +09:00
parent 82cb8f95ed
commit aa77228453
2 changed files with 16 additions and 17 deletions

View File

@@ -570,7 +570,7 @@ ptrace_arch_prctl(int pid, long code, long addr)
child = find_thread(pid, pid, &lock);
if (!child)
return -ESRCH;
if (child->proc->status == PS_TRACED) {
if (child->proc->status & (PS_TRACED | PS_STOPPED)) {
switch (code) {
case ARCH_GET_FS: {
unsigned long value;