+#include <probes/define_trace.h>
+
+#else /* CREATE_SYSCALL_TABLE */
+
+#include \"${INPUTFILE}_${CLASS}_override.h\"
+#include \"syscalls_${CLASS}_override.h\"
+" >> "${HEADER}"
+
+NRARGS=0
+
+if [ "$CLASS" = integers ]; then
+ #noargs
+
+ # shellcheck disable=SC2129
+ printf '#ifdef SC_ENTER\n' >> "${HEADER}"
+
+ # shellcheck disable=SC2026
+ grep "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " "${SRCFILE}" | \
+ perl -p -e 's/^syscall ([^ ]*) nr ([^ ]*) nbargs ([^ ]*) .*$/'\
+'#ifndef OVERRIDE_TABLE_'"${BITNESS}"'_$1\n'\
+'TRACE_SYSCALL_TABLE\(syscalls_noargs, $1, $2, $3\)\n'\
+'#endif/g' >> "${HEADER}"
+
+ printf '#else /* #ifdef SC_ENTER */\n' >> "${HEADER}"
+
+ # shellcheck disable=SC2026
+ grep "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " "${SRCFILE}" | \
+ perl -p -e 's/^syscall ([^ ]*) nr ([^ ]*) nbargs ([^ ]*) .*$/'\
+'#ifndef OVERRIDE_TABLE_'"${BITNESS}"'_$1\n'\
+'TRACE_SYSCALL_TABLE($1, $1, $2, $3)\n'\
+'#endif/g' >> "${HEADER}"
+
+ printf '#endif /* else #ifdef SC_ENTER */\n' >> "${HEADER}"
+fi
+
+#others.
+# shellcheck disable=SC2026
+grep -v "^syscall [^ ]* nr [^ ]* nbargs ${NRARGS} " "${SRCFILE}" | \
+ perl -p -e 's/^syscall ([^ ]*) nr ([^ ]*) nbargs ([^ ]*) .*$/'\
+'#ifndef OVERRIDE_TABLE_'"${BITNESS}"'_$1\n'\
+'TRACE_SYSCALL_TABLE($1, $1, $2, $3)\n'\
+'#endif/g' >> "${HEADER}"
+
+printf '\n#endif /* CREATE_SYSCALL_TABLE */\n' >> "${HEADER}"
+
+#fields names: ...char * type with *name* or *file* or *path* or *root*
+# or *put_old* or *type*
+perl -pi -e 's/ctf_integer\(([^,)]*char \*), ([^\)]*)(name|file|path|root|put_old|type)([^\)]*)\)/ctf_user_string($2$3$4)/g' \
+ "${HEADER}"
+
+#prettify addresses heuristics.
+#field names with addr or ptr
+perl -pi -e 's/ctf_integer\(([^,)]*), ([^,)]*addr|[^,)]*ptr)([^),]*)\)/ctf_integer_hex($1, $2$3, $2$3)/g' \
+ "${HEADER}"
+
+#field types ending with '*'
+perl -pi -e 's/ctf_integer\(([^,)]*\*), ([^),]*)\)/ctf_integer_hex($1, $2, $2)/g' "${HEADER}"