From: "J . A . Magallon" <jamagallon@able.es>
To: Lista Linux-Kernel <linux-kernel@vger.kernel.org>
Subject: PTRACE_SINGLESTEP x86 vs alpha
Date: Sun, 23 Sep 2001 00:29:41 +0200 [thread overview]
Message-ID: <20010923002941.A8177@werewolf.able.es> (raw)
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
reply other threads:[~2001-09-22 22:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010923002941.A8177@werewolf.able.es \
--to=jamagallon@able.es \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®