This is the mail archive of the mailing list for the frysk project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Yao Qi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]