| URL=https://raw.githubusercontent.com/strace/strace/master |
| FILES="sysent.h sysent_shorthand_defs.h linux/mips/syscallent-compat.h \ |
| linux/mips/syscallent-o32.h linux/syscallent-common-32.h \ |
| linux/syscallent-common.h" |
| if [ "$output" = "" ] ; then |
| INC=linux-user/mips/syscall-args-o32.c.inc |
| cat > gen_mips_o32.c <<EOF |
| #include "sysent_shorthand_defs.h" |
| #define SEN(syscall_name) 0,0 |
| const struct_sysent sysent0[] = { |
| #include "syscallent-o32.h" |
| for (i = 4000; i < sizeof(sysent0) / sizeof(struct_sysent); i++) { |
| if (sysent0[i].sys_name == NULL) { |
| printf(" [% 4d] = MIPS_SYSCALL_NUMBER_UNUSED,\n", i - 4000); |
| printf(" [% 4d] = %d, /* %s */\n", i - 4000, |
| sysent0[i].nargs, sysent0[i].sys_name); |
| cc -o gen_mips_o32 gen_mips_o32.c && ./gen_mips_o32 > "$output/$INC" |