+ printf("\t/* %s */\n\tcase %d: {\n", funcname, syscall_num) > systraceargstempfile
+ printf("\t/* %s */\n\tcase %d:\n", funcname, syscall_num) > systraceargdesctempfile
+ printf("\t/* %s */\n\tcase %d:\n", funcname, syscall_num) > systracerettempfile
+ if (argc > 0) {
+ printf("\t\tswitch(ndx) {\n") > systraceargdesctempfile
+ printf("\t\tstruct %s *p = params;\n", argalias) > systraceargstempfile
+ for (i = 1; i <= argc; i++) {
+ arg = argtype[i]
+ sub("__restrict$", "", arg)
+ if (index(arg, "*") > 0)
+ printf("\t\tcase %d:\n\t\t\tp = \"userland %s\";\n\t\t\tbreak;\n", i - 1, arg) > systraceargdesctempfile
+ else
+ printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systraceargdesctempfile
+ if (index(arg, "*") > 0 || arg == "caddr_t")
+ printf("\t\tuarg[%d] = (uint64_t) p->%s; /* %s */\n", \
+ i - 1, \
+ argname[i], arg) > systraceargstempfile
+ else if (substr(arg, 1, 1) == "u" || arg == "size_t")
+ printf("\t\tuarg[%d] = (uint64_t) p->%s; /* %s */\n", \
+ i - 1, \
+ argname[i], arg) > systraceargstempfile
+ else
+ printf("\t\tiarg[%d] = (int64_t) p->%s; /* %s */\n", \
+ i - 1, \
+ argname[i], arg) > systraceargstempfile
+ }
+ printf("\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") > systraceargdesctempfile
+
+ }
+ printf("\t\tbreak;\n\t}\n", argc) > systraceargstempfile
+ printf("\t\tif (ndx == 0 || ndx == 1)\n") > systracerettempfile
+ printf("\t\t\tp = \"%s\";\n", returntype) > systracerettempfile
+ printf("\t\tbreak;\n") > systracerettempfile
+ printf("\t\tbreak;\n") > systraceargdesctempfile