Commit 6da3a0e2 authored by David Howells's avatar David Howells Committed by Linus Torvalds

[PATCH] FRV: debugging fixes

The attached patch fixes three debugging problems in the frv arch:

 (1) Single-stepping in userspace steps through into the kernel-mode interrupt
     handler when a hardware interrupt happens, and sometimes it gets past
     where the debug-mode handler would normally catch it. This patch extends
     the range of detected PC values.

 (2) When setting up the kernel-mode exception frame from the debug-mode
     handler for a userspace debugging event, we weren't setting the LR
     register to generate a return to the exception handler epilogue.

 (3) sys_ptrace() now needs to "put" the inferior task_struct not "free" it as
     was done in 2.4.
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cef176c7
......@@ -202,6 +202,10 @@ __break_step:
setlo %lo(__entry_kernel_external_interrupt),gr3
subcc gr2,gr3,gr0,icc0
beq icc0,#2,__break_step_kernel_external_interrupt
sethi.p %hi(__entry_uspace_external_interrupt),gr3
setlo %lo(__entry_uspace_external_interrupt),gr3
subcc gr2,gr3,gr0,icc0
beq icc0,#2,__break_step_uspace_external_interrupt
LEDS 0x2007,gr2
......@@ -483,6 +487,9 @@ __break_no_user_sstep:
movgs gr2,bpsr
# return through remainder of the exception prologue
# - need to load gr23 with return handler address
sethi.p %hi(__entry_return_from_user_exception),gr23
setlo %lo(__entry_return_from_user_exception),gr23
sethi.p %hi(__entry_common),gr3
setlo %lo(__entry_common),gr3
movgs gr3,bpcsr
......
......@@ -358,7 +358,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data)
break;
}
out_tsk:
free_task_struct(child);
put_task_struct(child);
out:
unlock_kernel();
return ret;
......
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