Hi Caspar,

I just have 1 question below:

On Wed, 2009-12-09 at 21:12 -0500, Caspar Zhang wrote:
> Hi all,
>  
> When I compile ltp-full-20091130 on ppc64 machine which system is
> RHEL5(kernel 2.6.18), I met compile error as follows:
> 
> [...]
> ptrace04.c: In function ‘compare_registers’:
> ptrace04.c:59: error: ‘PTRACE_GETREGS’ undeclared (first use in this
> function)
> ptrace04.c:59: error: (Each undeclared identifier is reported only
> once
> ptrace04.c:59: error: for each function it appears in.)
> make[5]: *** [ptrace04] Error 1
> [...]
> 
> It seems like there's no PTRACE_GETREGS in /usr/include/asm/ptrace.h
> in old kernels, so I copy the definitions from new version of the
> head file and my ltp on ppc64, RHEL5 works.

Are these nos. similar across all archs ? If they are specific only to
PPC, you can then add the following 2 more lines to your patch:

> 
> Thanks,
> Caspar 
> 
> 
> 
> 
> 
> 
> differences
> between files
> attachment
> (rhel5-ppc-PTRACE_GETREGS-compile-err.patch)
> 
> diff --git a/testcases/kernel/syscalls/ptrace/ptrace.h
> b/testcases/kernel/syscalls/ptrace/ptrace.h
> index a0d2708..e3fcbb2 100644
> --- a/testcases/kernel/syscalls/ptrace/ptrace.h
> +++ b/testcases/kernel/syscalls/ptrace/ptrace.h
> @@ -37,4 +37,27 @@ typedef struct user_regs_struct ptrace_regs;
>  #undef HAVE_STRUCT_PTRACE_REGS
>  #endif
> 
> +/* old kernel doesn't have PTRACE_GETREGS on ppc64 */
> +/* (new) PTRACE requests using the same numbers as x86 and the same
> + * argument ordering. Additionally, they support more registers too
> + */

#if defined(powerpc) || defined(__powerpc__) || defined(__ppc__) ||
defined (__PPC__)
> +#ifndef PTRACE_GETREGS
> +# define PTRACE_GETREGS            12
> +#endif
> +#ifndef PTRACE_SETREGS
> +# define PTRACE_SETREGS            13
> +#endif
> +#ifndef PTRACE_GETFPREGS
> +# define PTRACE_GETFPREGS          14
> +#endif
> +#ifndef PTRACE_SETFPREGS
> +# define PTRACE_SETFPREGS          15
> +#endif
> +#ifndef PTRACE_GETREGS64
> +# define PTRACE_GETREGS64          22
> +#endif
> +#ifndef PTRACE_SETREGS64
> +# define PTRACE_SETREGS64          23
> +#endif
> +
>  #endif

#endif

Regards--
Subrata



------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to