Autogenerate gdb/syscalls/linux-defaults.xml.in (groups) from strace sources
I noticed that "catch syscall group:process" doesn't catch clone3,
while it does catch clone.
The catch syscall group information is recorded in the
gdb/syscalls/linux-defaults.xml.in file, which says:
<!-- The group field information was based on strace. -->
So I looked at the strace sources, to confirm that clone3 is in fact
recorded in the "process" group there too, and to check what other
syscalls might be missing groups.
After some digging, I found that strace records the group info in C
arrays, with entries like:
...
[ 61] = { 4, TP, SEN(wait4), "wait4" },
[ 62] = { 2, TS|TP, SEN(kill), "kill" },
[ 63] = { 1, 0, SEN(uname), "uname" },
...
You can see the current master's table for Linux x86-64 here:
https://github.com/strace/strace/blob/
e88e5e9ae6da68f22d15f9be3193b1412ac9aa02/src/linux/x86_64/syscallent.h
The column with TS|TP above is what defines each syscall's groups. So
I wrote a script that extracts this information and generates
linux-defaults.xml.in.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Change-Id: I679d59d42fb2a914bf7a99e4c558e9696e5adff1