Skip to contentSkip to conversation

fix compile error on ppc64 in RHEL5

PATCH Caspar Zhang 1 participant 1 message Dec 14, 2009 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 2132484028.267281260760555748.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com

#1 lore raw
Quoted 8 lines · ----- "Garrett Cooper

For whatever reason someone decided to be special on ppc64.. not sure why (maybe because ppc and ppc64 diverged in older kernels and converged in later ones?):

[root@localhost /]# egrep 'PTRACE_[GS]ETREGS'
/scratch/fc4/kernel/include/asm-ppc64/ptrace.h

#define PPC_PTRACE_GETREGS	      0x99  /* Get GPRs 0 - 31 */
#define PPC_PTRACE_SETREGS	      0x98  /* Set GPRs 0 - 31 */

As you see, there's no PTRACE_[GS]ETREGS on ppc64 machine in RHEL5 but PPC_PTRACE_[GS]ETREGS exists. I wonder whether the test will still work if we change PTRACE_[GS]ETREGS to PPC_PTRACE_[GS]ETREGS in c codes.

I use kernel version 2.6.18-164.el5 in RHEL5U4.

Quoted 26 lines

[root@localhost /]# egrep 'PTRACE_[GS]ETREGS'
/scratch/fc7/kernel/include/asm-powerpc/ptrace.h
#define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */
#define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */

A similar issue may exist for sparc64, but I doubt it:

[root@localhost /]# egrep 'PTRACE_[GS]ETREGS' /scratch/fc4/kernel/include/asm-sparc*/ptrace.h /scratch/fc4/kernel/include/asm-sparc64/ptrace.h:#define
PTRACE_GETREGS 12
/scratch/fc4/kernel/include/asm-sparc64/ptrace.h:#define
PTRACE_SETREGS 13
/scratch/fc4/kernel/include/asm-sparc64/ptrace.h:#define
PTRACE_GETREGS64 22
/scratch/fc4/kernel/include/asm-sparc64/ptrace.h:#define
PTRACE_SETREGS64 23
/scratch/fc4/kernel/include/asm-sparc/ptrace.h:#define PTRACE_GETREGS

          12
/scratch/fc4/kernel/include/asm-sparc/ptrace.h:#define PTRACE_SETREGS 
          13

What kernel version are you using again?

Thanks,
-Garrett

Signature · 18 lines
/-------------------------------------------\
| Name: Caspar Zhang                        |
| Position: Kernel Qualification Engineer   |
| IRC: czhang on #kernel-qe, #eng-china     |
| Phone: +86-10-6260-8150                   |
| Cellphone: +86-1381-073-0090              |
\-------------------------------------------/


------------------------------------------------------------------------------
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