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, ...@@ -366,8 +366,8 @@ do_sys_ptrace(long request, long pid, long addr, long data,
ret = -EIO; ret = -EIO;
if ((unsigned long) data > _NSIG) if ((unsigned long) data > _NSIG)
break; break;
/* Mark single stepping. */ /* Set single stepping. */
child->thread_info->bpt_nsaved = -1; ptrace_set_bpt(child);
clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
wake_up_process(child); wake_up_process(child);
child->exit_code = data; child->exit_code = data;
...@@ -397,11 +397,11 @@ syscall_trace(void) ...@@ -397,11 +397,11 @@ syscall_trace(void)
return; return;
if (!(current->ptrace & PT_PTRACED)) if (!(current->ptrace & PT_PTRACED))
return; return;
current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) /* The 0x80 provides a way for the tracing parent to distinguish
? 0x80 : 0); between a syscall stop and SIGTRAP delivery */
current->state = TASK_STOPPED; ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
notify_parent(current, SIGCHLD); ? 0x80 : 0));
schedule();
/* /*
* This isn't the same as continuing with a signal, but it will do * 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 * 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