Comment 4 for bug 1858461

Revision history for this message
puchuu (aladjev-andrew) wrote :

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

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.