Omit "__restrict" when generating syscall argument strings. DTrace doesn't

handle it and cannot determine the argument type when it's present.

Approved by:	re (gjb)
MFC after:	1 week
This commit is contained in:
Mark Johnston 2013-09-21 23:05:44 +00:00
parent 5605b69c98
commit f17f2ffcdd

View File

@ -403,19 +403,21 @@ s/\$//g
printf("\t\tswitch(ndx) {\n") > systracetmp
printf("\t\tstruct %s *p = params;\n", argalias) > systrace
for (i = 1; i <= argc; i++) {
printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, argtype[i]) > systracetmp
if (index(argtype[i], "*") > 0 || argtype[i] == "caddr_t")
arg = argtype[i]
sub("__restrict$", "", arg)
printf("\t\tcase %d:\n\t\t\tp = \"%s\";\n\t\t\tbreak;\n", i - 1, arg) > systracetmp
if (index(arg, "*") > 0 || arg == "caddr_t")
printf("\t\tuarg[%d] = (intptr_t) p->%s; /* %s */\n", \
i - 1, \
argname[i], argtype[i]) > systrace
else if (substr(argtype[i], 1, 1) == "u" || argtype[i] == "size_t")
argname[i], arg) > systrace
else if (substr(arg, 1, 1) == "u" || arg == "size_t")
printf("\t\tuarg[%d] = p->%s; /* %s */\n", \
i - 1, \
argname[i], argtype[i]) > systrace
argname[i], arg) > systrace
else
printf("\t\tiarg[%d] = p->%s; /* %s */\n", \
i - 1, \
argname[i], argtype[i]) > systrace
argname[i], arg) > systrace
}
printf("\t\tdefault:\n\t\t\tbreak;\n\t\t};\n") > systracetmp