This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
SyscallNum.shjava miss some syscalls.
- From: Yao Qi <qiyaoltc at cn dot ibm dot com>
- To: frysk <frysk at sourceware dot org>
- Date: Tue, 29 Aug 2006 17:45:47 +0800
- Subject: SyscallNum.shjava miss some syscalls.
regular expression "__NR_[a-z][a-z0-9]*" is applied to match Syscall
number macros, but it could not cover all syscall number macros, such
as, __NR_rt_sig*.
We modify this regular expression like this, "__NR_[a-z_][a-z0-9_]*",
the missed syscall macros could be matched, but get another problem
on x86. Here is an example,
#define __NR_timer_create 259
#define __NR_timer_settime (__NR_timer_create+1)
__NR_timer_create will not be substitute by 259 in the second line,
and so in the final java code, SyscallNum.java, it look like,
static public final int SYStimer_create = 259;
......
static public final int SYStimer_settime = (__NR_timer_create+1);
GCJ will emit an error on it.
(B.T.W, SYStimer_settime is not a syscall on x86, but it is generated
from /usr/include/syscall.h on x86. I am a little confused on this.)
I browsed gcc man pages and could not find how to ask gcc to
pre-process source code for more than one time, and substitute macros
in a greedy way.
What is the rule of syscall macro names should be on these different
architectures?
--
Yao Qi