This is the mail archive of the frysk@sources.redhat.com 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]

Re: [rfc] Remove SyscallNum.shjava and maintain syscallList manually for different architectures


Hi Yao,

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
> now.
> 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
> SyscallNum.shjava.
> 
> d) Some "sub-syscalls", such as connect() and listen(), could not be
> listed by SyscallNum.shjava.
> Mark present this problem here,
> http://sources.redhat.com/ml/frysk/2006-q3/msg00370.html
> 
> 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
mappings).

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.

Cheers,

Mark


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