This is the mail archive of the
frysk@sources.redhat.com
mailing list for the frysk project.
Re: SyscallNum.shjava miss some syscalls.
- From: Tom Tromey <tromey at redhat dot com>
- To: Yao Qi <qiyaoltc at cn dot ibm dot com>
- Cc: frysk <frysk at sourceware dot org>
- Date: 30 Aug 2006 12:14:13 -0600
- Subject: Re: SyscallNum.shjava miss some syscalls.
- References: <20060829094543.GC31608@GreenHouse.cn.ibm.com>
- Reply-to: tromey at redhat dot com
>>>>> "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