Porting strace - compile problem

Marcus Mikolaiczyk marcus.mikolaiczyk at carmedialab.de
Wed Feb 7 11:18:56 UTC 2007


Thanks - working now on 4.5.15, but if possible I need some more
information:

> You need to supply a linux/CPU/syscallent.h for your CPU if its syscall
> table does not match the i386 one.

Where can it be derived from?
arch/tricore/entry.S has some informations on the syscalltable (entries
only numbers 0-230)
and in include/asm/unistd.h . Which one is better to use.

I managed it yesterday to compile a version but it didn't work.
bash-2.05a# strace echo hello
trace: ptrace(PTRACE_SYSCALL, ...): No such process

I changed linux/syscallent.h at the folowing points:
/*{ 1,  TP,     sys_exit,               "exit_group", __NR_exit_group },
 252 */
{ 1,    TP,     sys_exit,               "exit_group"}, /* 252 */
...
/* { 5, TP,     sys_waitid,             "waitid", SYS_waitid }, 284 */
{ 5,    TP,     sys_waitid,             "waitid"}, /* 284 */
...

I removed the following lines from process.c

#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64)
      { uoff(u_fpvalid),      "offsetof(struct user, u_fpvalid)"      },
#endif
#if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH)
&& !defined(SH64) && !defined(SPARC64)
      { uoff(reserved),       "offsetof(struct user, reserved)"       },
#endif
#if !defined(ARM) && !defined(MIPS) && !defined(S390) && !defined(S390X)
&& !defined(SPARC64)
      { uoff(u_fpstate),      "offsetof(struct user, u_fpstate)"      },
#endif


Probably the wrong information in the syscallent.h file which has not
been adapted so far (I'm working on it). I also cannot find a PTRACE
kernel Symbol in /proc/ksyms maybe a problem, is it necessary? Or any
other ideas or hints?


Regards Marcus




More information about the Strace-devel mailing list