lib/syscall_shim: Functions to pretty-print system call requests
This commit introduces an initial implementation of `uk_snprsyscall()` and
`uk_vsnprsyscall()`, two functions that pretty print a system call request
to a given C-string buffer. The system call name, the given arguments
(including flags and definitions) and the response are decoded.
As a start, this commit implements the formatting of the following system
calls: brk, open, openat, write, read, stat, fstat, close, dup, dup2,
gettid, getpid
Yet unsupported system calls are printed with the raw values of arguments.
Checkpatch-Ignore: DO_WHILE_MACRO_WITH_TRAILING_SEMICOLON
Checkpatch-Ignore: MULTISTATEMENT_MACRO_USE_DO_WHILE
Checkpatch-Ignore: TRAILING_SEMICOLON
Checkpatch-Ignore: MISSING_BREAK
Checkpatch-Ignore: COMPLEX_MACRO
Checkpatch-Ignore: SPACING Signed-off-by: Simon Kuenzer <simon@unikraft.io> Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Andra Paraschiv <andra@unikraft.io> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #737