Subject: Re: ptrace and ORIG_EAX on ppc

From: Brad Boyer <[email-masked]>
Date: Tue, 29 Mar 2005 23:25:58 -0800

On Tue, Mar 29, 2005 at 08:01:06PM -0500, ashwin tanugula wrote:
> Hi!
> Can somebody tell me how to set references to ORIG_EAX in ppc kernel.
> We know ORIG_EAX is defined in unistd.h of i386. How do i make the
> following program print two same pids in ppc?

The ORIG_EAX is a reference to a register as saved in the stack. The
equivalent on ppc would seem to be PT_ORIG_R3. You're digging around
in an area that is extremely non-portable. This program appears to
be messing around with the syscall number before dispatch in the
syscall table. The implementation of ptrace on ppc and ppc64
explicitly does not allow changing this value, so I think you'll need
to find a completely different way to achieve your desired result.

Just to lessen the confusion, what are you trying to accomplish? Not
in the low-level detail sense, but what is the big picture goal?

	Brad Boyer
	[email-masked]