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: SyscallNum.shjava miss some syscalls.


>>>>> "Yao" == Yao Qi <qiyaoltc@cn.ibm.com> writes:

Yao> #define __NR_timer_create 259
Yao> #define __NR_timer_settime (__NR_timer_create+1)
[...]
Yao> static public final int SYStimer_create = 259;
Yao> ......
Yao> static public final int SYStimer_settime = (__NR_timer_create+1);

Yao> I browsed gcc man pages and could not find how to ask gcc to 
Yao> pre-process source code for more than one time, and substitute macros
Yao> in a greedy way.

One approach would be to run your regular expression to extract names
like __NR_timer_settime, then construct a small file like:

    #include <whateveritis.h>
    SYStimer_settime = __NR_timer_settime;
    [ one line per syscall ]

... and, finally, run that through 'gcc -E'.

This can easily be automated.  In the end you can paste the results
into a .java file ... not pretty, but it works.

Tom


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