lkml.org 
[lkml]   [2001]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectPTRACE_SINGLESTEP x86 vs alpha
Hi everyrone.

I'm trying to solve rejects when applying bproc-3.0.1 (designed for 2.4.7)
to 2.4.10-pre14. Everything is solved but this.

In arch/[i386,alpha]/kernel/ptrace.c:sys_ptrace,
code looks a bit different between i386 and alpha:

x86:
case PTRACE_SINGLESTEP: { /* set the trap flag. */
long tmp;

ret = -EIO;
if ((unsigned long) data > _NSIG)
break;
child->ptrace &= ~PT_TRACESYS;
if ((child->ptrace & PT_DTRACE) == 0) {
/* Spurious delayed TF traps may occur */
child->ptrace |= PT_DTRACE;
}
tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG;
put_stack_long(child, EFL_OFFSET, tmp);
child->exit_code = data;
/* give it a chance to run. */
wake_up_process(child);
ret = 0;
break;
}

alpha:
case PTRACE_SINGLESTEP: /* execute single instruction. */
ret = -EIO;
if ((unsigned long) data > _NSIG)
goto out;
child->thread.bpt_nsaved = -1; /* mark single-stepping */
child->ptrace &= ~PT_TRACESYS;
wake_up_process(child); <==========0
child->exit_code = data; <==========0 different
order than x86
/* give it a chance to run. */
ret = 0;
goto out; <==========0 so bad are
breaks in alpha gcc ??

Is it safe to reorder wake_up_process(child) and put it just before the goto ?

TIA

--
J.A. Magallon # Let the source be with you...
mailto:jamagallon@able.es
Mandrake Linux release 8.1 (Cooker) for i586
Linux werewolf 2.4.10-pre14 #1 SMP Sat Sep 22 11:04:31 CEST 2001 i686
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.028 / U:2.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site