I've found a reliable way to generate syscall arguments count table.
cd /usr/src/linux
make clean
make CONFIG_DEBUG_INFO=y CONFIG_DEBUG_INFO_SPLIT=y CONFIG_DEBUG_INFO_DWARF4=y
llvm-dwarfdump -debug-info --name ksys_getdents64 --show-children --recurse-depth=1 fs/readdir.dwo
I've found a reliable way to generate syscall arguments count table.
cd /usr/src/linux DEBUG_INFO_ SPLIT=y CONFIG_ DEBUG_INFO_ DWARF4= y
make clean
make CONFIG_DEBUG_INFO=y CONFIG_
llvm-dwarfdump -debug-info --name ksys_getdents64 --show-children --recurse-depth=1 fs/readdir.dwo
0x00013738: DW_TAG_subprogram
DW_AT_name ("ksys_getdents64")
...
0x00013752: DW_TAG_ formal_ parameter
...
0x00013766: DW_TAG_ formal_ parameter
...
0x00013779: DW_TAG_ formal_ parameter
...
We can count "DW_TAG_ formal_ parameter" for syscall and it that's it.