Commit 52c0adae authored by Richard Henderson's avatar Richard Henderson

[ALPHA] Fix single-step breakpoints.

From Ivan Kokshaysky <ink@jurassic.park.msu.ru>.
parent d8475074
......@@ -366,8 +366,8 @@ do_sys_ptrace(long request, long pid, long addr, long data,
ret = -EIO;
if ((unsigned long) data > _NSIG)
break;
/* Mark single stepping. */
child->thread_info->bpt_nsaved = -1;
/* Set single stepping. */
ptrace_set_bpt(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
wake_up_process(child);
child->exit_code = data;
......@@ -397,11 +397,11 @@ syscall_trace(void)
return;
if (!(current->ptrace & PT_PTRACED))
return;
current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
? 0x80 : 0);
current->state = TASK_STOPPED;
notify_parent(current, SIGCHLD);
schedule();
/* The 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
? 0x80 : 0));
/*
* This isn't the same as continuing with a signal, but it will do
* for normal use. strace only continues with a signal if the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment