microblaze: Ptrace notifying from signal code
authorMichal Simek <monstr@monstr.eu>
Thu, 15 Oct 2009 09:32:25 +0000 (11:32 +0200)
committerMichal Simek <monstr@monstr.eu>
Mon, 14 Dec 2009 07:44:58 +0000 (08:44 +0100)
After the signal frame is set up on the userspace stack, ptrace() should
be given an opportunity to single-step into the signal handler

FRV, Blackfin, mn10300 and UM. Worth to look at that patches.

Signed-off-by: Michal Simek <monstr@monstr.eu>
arch/microblaze/kernel/signal.c

index 1c80e4fc40cef1fc0513951c449452ff23139c96..0c96ac34c316f08fa8a94beb1f84cc9494822644 100644 (file)
@@ -233,6 +233,10 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 
        set_fs(USER_DS);
 
+       /* the tracer may want to single-step inside the handler */
+       if (test_thread_flag(TIF_SINGLESTEP))
+               ptrace_notify(SIGTRAP);
+
 #ifdef DEBUG_SIG
        printk(KERN_INFO "SIG deliver (%s:%d): sp=%p pc=%08lx\n",
                current->comm, current->pid, frame, regs->pc);