This is the mail archive of the
mailing list for the frysk project.
Re: [rfc] Remove SyscallNum.shjava and maintain syscallList manually for different architectures
- From: Mark Wielaard <mark at klomp dot org>
- To: Yao Qi <qiyaoltc at cn dot ibm dot com>
- Cc: frysk <frysk at sourceware dot org>
- Date: Mon, 04 Sep 2006 15:50:56 +0200
- Subject: Re: [rfc] Remove SyscallNum.shjava and maintain syscallList manually for different architectures
- References: <20060904114640.GC13314@GreenHouse.cn.ibm.com>
On Mon, 2006-09-04 at 19:46 +0800, Yao Qi wrote:
> It is very convenient to generate SyscallNum.java by SyscallNum.shjava
> in a automatic way, but there are some shortcomings for this script
> Mark, add you in CC list for d).
> c) syscallList in Syscall.java is hardwired to Linux+i386.
> If we could extend syscallList for other platforms(of course, we
> should), syscallList could replace SyscallNum.java produced by
> d) Some "sub-syscalls", such as connect() and listen(), could not be
> listed by SyscallNum.shjava.
> Mark present this problem here,
> We could add "bind", "listen", to syscallList with the same syscall
> number, and Syscall.java provides some methods, such as
> isSyscall(String), for Syscall Observers, like this,
It seems that other projects (strace, systemtap) also maintain these by
hand. It is a little unfortunate that there is no canonical list of
syscalls and numbers per architecture. But it seems to make sense to
maintain them by hand in Syscall (including then mapping name and number
For some of these "sub-syscalls" I think it would be better to treat
them as if they were really syscalls for those that are real syscalls on
some other architecture (that is what strace and systemtap do). And I
would propose minimize the usage of numbers. So only have a factory
getSyscall(String) and not one based on numbers (since those differ
between architectures and make it impossible to get any 'sub-syscalls').
If so then we should also drop the number() from SyscallEventInfo and
replace it with a syscall() method that just returns the Syscall object.