patch-2.1.79 linux/arch/sparc64/kernel/ptrace.c
Next file: linux/arch/sparc64/kernel/rtrap.S
Previous file: linux/arch/sparc64/kernel/psycho.c
Back to the patch index
Back to the overall index
- Lines: 65
- Date:
Mon Jan 12 15:15:44 1998
- Orig file:
v2.1.78/linux/arch/sparc64/kernel/ptrace.c
- Orig date:
Mon Aug 18 18:19:45 1997
diff -u --recursive --new-file v2.1.78/linux/arch/sparc64/kernel/ptrace.c linux/arch/sparc64/kernel/ptrace.c
@@ -309,12 +309,14 @@
}
if(offset >= 16 && offset < 784) {
offset -= 16; offset >>= 2;
- pt_os_succ_return(regs, *(((unsigned long *)(&t->reg_window[0]))+offset), addr);
+ if (t->w_saved)
+ pt_os_succ_return(regs, *(((unsigned long *)(&t->reg_window[0]))+offset), addr);
return;
}
if(offset >= 784 && offset < 832) {
offset -= 784; offset >>= 2;
- pt_os_succ_return(regs, *(((unsigned long *)(&t->rwbuf_stkptrs[0]))+offset), addr);
+ if (t->w_saved)
+ pt_os_succ_return(regs, *(((unsigned long *)(&t->rwbuf_stkptrs[0]))+offset), addr);
return;
}
switch(offset) {
@@ -399,12 +401,14 @@
goto failure;
if(offset >= 16 && offset < 784) {
offset -= 16; offset >>= 2;
- *(((unsigned long *)(&t->reg_window[0]))+offset) = value;
+ if (t->w_saved)
+ *(((unsigned long *)(&t->reg_window[0]))+offset) = value;
goto success;
}
if(offset >= 784 && offset < 832) {
offset -= 784; offset >>= 2;
- *(((unsigned long *)(&t->rwbuf_stkptrs[0]))+offset) = value;
+ if (t->w_saved)
+ *(((unsigned long *)(&t->rwbuf_stkptrs[0]))+offset) = value;
goto success;
}
switch(offset) {
@@ -964,7 +968,7 @@
addr = 1;
case PTRACE_CONT: { /* restart after signal. */
- if (data > NSIG) {
+ if (data > _NSIG) {
pt_error_return(regs, EIO);
goto out;
}
@@ -1016,7 +1020,7 @@
}
case PTRACE_SUNDETACH: { /* detach a process that was attached. */
- if ((unsigned long) data > NSIG) {
+ if ((unsigned long) data > _NSIG) {
pt_error_return(regs, EIO);
goto out;
}
@@ -1063,10 +1067,7 @@
current->pid, current->exit_code);
#endif
if (current->exit_code) {
- spin_lock_irq(¤t->sigmask_lock);
- current->signal |= (1 << (current->exit_code - 1));
- spin_unlock_irq(¤t->sigmask_lock);
+ send_sig (current->exit_code, current, 1);
+ current->exit_code = 0;
}
-
- current->exit_code = 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov