aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-05-09 17:22:23 +0200
committerTom de Vries <tdevries@suse.de>2022-05-09 17:22:23 +0200
commitf3c75b2cbe88aa1f637d08317614bbeb2cbeecea (patch)
tree4df92ffe86ee47adb609f9a5856529749f33b279
parentd9ab2743baf47aedb40afba1a0d1a5bd2b1a755d (diff)
downloadbinutils-f3c75b2cbe88aa1f637d08317614bbeb2cbeecea.zip
binutils-f3c75b2cbe88aa1f637d08317614bbeb2cbeecea.tar.gz
binutils-f3c75b2cbe88aa1f637d08317614bbeb2cbeecea.tar.bz2
[gdb] Update syscalls/{amd64,i386}-linux.xml
- Add a script syscalls/gen-header.py, based on syscalls/arm-linux.py. - Add a script syscalls/update-linux.sh (alongside update-freebsd.sh and update-netbsd.sh). - Use syscalls/update-linux.sh to update syscalls/{amd64,i386}-linux.xml.in. - Regenerate syscalls/{amd64,i386}-linux.xml using syscalls/Makefile. In gdb/syscalls/i386-linux.xml.in, updating has the following notable effect: ... - <syscall name="madvise1" number="220"/> - <syscall name="getdents64" number="221"/> - <syscall name="fcntl64" number="222"/> + <syscall name="getdents64" number="220"/> + <syscall name="fcntl64" number="221"/> ... I've verified in ./arch/x86/entry/syscalls/syscall_32.tbl that the numbers are correct. Tested on x86_64-linux.
-rw-r--r--gdb/syscalls/amd64-linux.xml69
-rw-r--r--gdb/syscalls/amd64-linux.xml.in70
-rw-r--r--gdb/syscalls/gen-header.py32
-rw-r--r--gdb/syscalls/i386-linux.xml126
-rw-r--r--gdb/syscalls/i386-linux.xml.in127
-rwxr-xr-xgdb/syscalls/update-linux.sh60
6 files changed, 470 insertions, 14 deletions
diff --git a/gdb/syscalls/amd64-linux.xml b/gdb/syscalls/amd64-linux.xml
index 481431d..231308b 100644
--- a/gdb/syscalls/amd64-linux.xml
+++ b/gdb/syscalls/amd64-linux.xml
@@ -6,8 +6,8 @@
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. -->
<!-- This file was generated using the following file:
-
- /usr/src/linux/arch/x86/include/asm/unistd_64.h
+
+ <sys/syscall.h>
The file mentioned above belongs to the Linux Kernel. -->
<syscalls_info>
@@ -308,4 +308,69 @@
<syscall name="inotify_init1" number="294" groups="descriptor"/>
<syscall name="preadv" number="295" groups="descriptor"/>
<syscall name="pwritev" number="296" groups="descriptor"/>
+ <syscall name="rt_tgsigqueueinfo" number="297" groups="process,signal"/>
+ <syscall name="perf_event_open" number="298" groups="descriptor"/>
+ <syscall name="recvmmsg" number="299" groups="network"/>
+ <syscall name="fanotify_init" number="300" groups="descriptor"/>
+ <syscall name="fanotify_mark" number="301" groups="descriptor,file"/>
+ <syscall name="prlimit64" number="302"/>
+ <syscall name="name_to_handle_at" number="303" groups="descriptor,file"/>
+ <syscall name="open_by_handle_at" number="304" groups="descriptor"/>
+ <syscall name="clock_adjtime" number="305"/>
+ <syscall name="syncfs" number="306" groups="descriptor"/>
+ <syscall name="sendmmsg" number="307" groups="network"/>
+ <syscall name="setns" number="308" groups="descriptor"/>
+ <syscall name="getcpu" number="309"/>
+ <syscall name="process_vm_readv" number="310"/>
+ <syscall name="process_vm_writev" number="311"/>
+ <syscall name="kcmp" number="312"/>
+ <syscall name="finit_module" number="313" groups="descriptor"/>
+ <syscall name="sched_setattr" number="314"/>
+ <syscall name="sched_getattr" number="315"/>
+ <syscall name="renameat2" number="316"/>
+ <syscall name="seccomp" number="317"/>
+ <syscall name="getrandom" number="318"/>
+ <syscall name="memfd_create" number="319"/>
+ <syscall name="kexec_file_load" number="320"/>
+ <syscall name="bpf" number="321"/>
+ <syscall name="execveat" number="322"/>
+ <syscall name="userfaultfd" number="323"/>
+ <syscall name="membarrier" number="324"/>
+ <syscall name="mlock2" number="325"/>
+ <syscall name="copy_file_range" number="326"/>
+ <syscall name="preadv2" number="327"/>
+ <syscall name="pwritev2" number="328"/>
+ <syscall name="pkey_mprotect" number="329"/>
+ <syscall name="pkey_alloc" number="330"/>
+ <syscall name="pkey_free" number="331"/>
+ <syscall name="statx" number="332"/>
+ <syscall name="io_pgetevents" number="333"/>
+ <syscall name="rseq" number="334"/>
+ <syscall name="pidfd_send_signal" number="424"/>
+ <syscall name="io_uring_setup" number="425"/>
+ <syscall name="io_uring_enter" number="426"/>
+ <syscall name="io_uring_register" number="427"/>
+ <syscall name="open_tree" number="428"/>
+ <syscall name="move_mount" number="429"/>
+ <syscall name="fsopen" number="430"/>
+ <syscall name="fsconfig" number="431"/>
+ <syscall name="fsmount" number="432"/>
+ <syscall name="fspick" number="433"/>
+ <syscall name="pidfd_open" number="434"/>
+ <syscall name="clone3" number="435"/>
+ <syscall name="close_range" number="436"/>
+ <syscall name="openat2" number="437"/>
+ <syscall name="pidfd_getfd" number="438"/>
+ <syscall name="faccessat2" number="439"/>
+ <syscall name="process_madvise" number="440"/>
+ <syscall name="epoll_pwait2" number="441"/>
+ <syscall name="mount_setattr" number="442"/>
+ <syscall name="quotactl_fd" number="443"/>
+ <syscall name="landlock_create_ruleset" number="444"/>
+ <syscall name="landlock_add_rule" number="445"/>
+ <syscall name="landlock_restrict_self" number="446"/>
+ <syscall name="memfd_secret" number="447"/>
+ <syscall name="process_mrelease" number="448"/>
+ <syscall name="futex_waitv" number="449"/>
+ <syscall name="set_mempolicy_home_node" number="450"/>
</syscalls_info>
diff --git a/gdb/syscalls/amd64-linux.xml.in b/gdb/syscalls/amd64-linux.xml.in
index 3b0834b..404d445 100644
--- a/gdb/syscalls/amd64-linux.xml.in
+++ b/gdb/syscalls/amd64-linux.xml.in
@@ -8,11 +8,12 @@
<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
<!-- This file was generated using the following file:
-
- /usr/src/linux/arch/x86/include/asm/unistd_64.h
+
+ <sys/syscall.h>
The file mentioned above belongs to the Linux Kernel. -->
+
<syscalls_info>
<syscall name="read" number="0"/>
<syscall name="write" number="1"/>
@@ -311,4 +312,69 @@
<syscall name="inotify_init1" number="294"/>
<syscall name="preadv" number="295"/>
<syscall name="pwritev" number="296"/>
+ <syscall name="rt_tgsigqueueinfo" number="297"/>
+ <syscall name="perf_event_open" number="298"/>
+ <syscall name="recvmmsg" number="299"/>
+ <syscall name="fanotify_init" number="300"/>
+ <syscall name="fanotify_mark" number="301"/>
+ <syscall name="prlimit64" number="302"/>
+ <syscall name="name_to_handle_at" number="303"/>
+ <syscall name="open_by_handle_at" number="304"/>
+ <syscall name="clock_adjtime" number="305"/>
+ <syscall name="syncfs" number="306"/>
+ <syscall name="sendmmsg" number="307"/>
+ <syscall name="setns" number="308"/>
+ <syscall name="getcpu" number="309"/>
+ <syscall name="process_vm_readv" number="310"/>
+ <syscall name="process_vm_writev" number="311"/>
+ <syscall name="kcmp" number="312"/>
+ <syscall name="finit_module" number="313"/>
+ <syscall name="sched_setattr" number="314"/>
+ <syscall name="sched_getattr" number="315"/>
+ <syscall name="renameat2" number="316"/>
+ <syscall name="seccomp" number="317"/>
+ <syscall name="getrandom" number="318"/>
+ <syscall name="memfd_create" number="319"/>
+ <syscall name="kexec_file_load" number="320"/>
+ <syscall name="bpf" number="321"/>
+ <syscall name="execveat" number="322"/>
+ <syscall name="userfaultfd" number="323"/>
+ <syscall name="membarrier" number="324"/>
+ <syscall name="mlock2" number="325"/>
+ <syscall name="copy_file_range" number="326"/>
+ <syscall name="preadv2" number="327"/>
+ <syscall name="pwritev2" number="328"/>
+ <syscall name="pkey_mprotect" number="329"/>
+ <syscall name="pkey_alloc" number="330"/>
+ <syscall name="pkey_free" number="331"/>
+ <syscall name="statx" number="332"/>
+ <syscall name="io_pgetevents" number="333"/>
+ <syscall name="rseq" number="334"/>
+ <syscall name="pidfd_send_signal" number="424"/>
+ <syscall name="io_uring_setup" number="425"/>
+ <syscall name="io_uring_enter" number="426"/>
+ <syscall name="io_uring_register" number="427"/>
+ <syscall name="open_tree" number="428"/>
+ <syscall name="move_mount" number="429"/>
+ <syscall name="fsopen" number="430"/>
+ <syscall name="fsconfig" number="431"/>
+ <syscall name="fsmount" number="432"/>
+ <syscall name="fspick" number="433"/>
+ <syscall name="pidfd_open" number="434"/>
+ <syscall name="clone3" number="435"/>
+ <syscall name="close_range" number="436"/>
+ <syscall name="openat2" number="437"/>
+ <syscall name="pidfd_getfd" number="438"/>
+ <syscall name="faccessat2" number="439"/>
+ <syscall name="process_madvise" number="440"/>
+ <syscall name="epoll_pwait2" number="441"/>
+ <syscall name="mount_setattr" number="442"/>
+ <syscall name="quotactl_fd" number="443"/>
+ <syscall name="landlock_create_ruleset" number="444"/>
+ <syscall name="landlock_add_rule" number="445"/>
+ <syscall name="landlock_restrict_self" number="446"/>
+ <syscall name="memfd_secret" number="447"/>
+ <syscall name="process_mrelease" number="448"/>
+ <syscall name="futex_waitv" number="449"/>
+ <syscall name="set_mempolicy_home_node" number="450"/>
</syscalls_info>
diff --git a/gdb/syscalls/gen-header.py b/gdb/syscalls/gen-header.py
new file mode 100644
index 0000000..78ccddd
--- /dev/null
+++ b/gdb/syscalls/gen-header.py
@@ -0,0 +1,32 @@
+# Copyright (C) 2013-2022 Free Software Foundation, Inc.
+
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
+import sys
+import time
+
+infname = sys.argv[1]
+
+print(
+ """\
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-%s Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+
+ %s
+
+ The file mentioned above belongs to the Linux Kernel. -->
+
+"""
+ % (time.strftime("%Y"), infname)
+)
diff --git a/gdb/syscalls/i386-linux.xml b/gdb/syscalls/i386-linux.xml
index 4a7a234..c4b2811 100644
--- a/gdb/syscalls/i386-linux.xml
+++ b/gdb/syscalls/i386-linux.xml
@@ -6,8 +6,8 @@
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. -->
<!-- This file was generated using the following file:
-
- /usr/src/linux/arch/x86/include/asm/unistd_32.h
+
+ <sys/syscall.h>
The file mentioned above belongs to the Linux Kernel. -->
<syscalls_info>
@@ -231,9 +231,8 @@
<syscall name="pivot_root" number="217" groups="file"/>
<syscall name="mincore" number="218" groups="memory"/>
<syscall name="madvise" number="219" groups="memory"/>
- <syscall name="madvise1" number="220"/>
- <syscall name="getdents64" number="221" groups="descriptor"/>
- <syscall name="fcntl64" number="222" groups="descriptor"/>
+ <syscall name="getdents64" number="220" groups="descriptor"/>
+ <syscall name="fcntl64" number="221" groups="descriptor"/>
<syscall name="gettid" number="224"/>
<syscall name="readahead" number="225" groups="descriptor"/>
<syscall name="setxattr" number="226" groups="file"/>
@@ -334,5 +333,122 @@
<syscall name="eventfd" number="323" groups="descriptor"/>
<syscall name="fallocate" number="324" groups="descriptor"/>
<syscall name="timerfd_settime" number="325" groups="descriptor"/>
+ <syscall name="timerfd_gettime" number="326" groups="descriptor"/>
+ <syscall name="signalfd4" number="327" groups="descriptor,signal"/>
+ <syscall name="eventfd2" number="328" groups="descriptor"/>
+ <syscall name="epoll_create1" number="329" groups="descriptor"/>
+ <syscall name="dup3" number="330" groups="descriptor"/>
<syscall name="pipe2" number="331" groups="descriptor"/>
+ <syscall name="inotify_init1" number="332" groups="descriptor"/>
+ <syscall name="preadv" number="333" groups="descriptor"/>
+ <syscall name="pwritev" number="334" groups="descriptor"/>
+ <syscall name="rt_tgsigqueueinfo" number="335" groups="process,signal"/>
+ <syscall name="perf_event_open" number="336" groups="descriptor"/>
+ <syscall name="recvmmsg" number="337" groups="network"/>
+ <syscall name="fanotify_init" number="338" groups="descriptor"/>
+ <syscall name="fanotify_mark" number="339" groups="descriptor,file"/>
+ <syscall name="prlimit64" number="340"/>
+ <syscall name="name_to_handle_at" number="341" groups="descriptor,file"/>
+ <syscall name="open_by_handle_at" number="342" groups="descriptor"/>
+ <syscall name="clock_adjtime" number="343"/>
+ <syscall name="syncfs" number="344" groups="descriptor"/>
+ <syscall name="sendmmsg" number="345" groups="network"/>
+ <syscall name="setns" number="346" groups="descriptor"/>
+ <syscall name="process_vm_readv" number="347"/>
+ <syscall name="process_vm_writev" number="348"/>
+ <syscall name="kcmp" number="349"/>
+ <syscall name="finit_module" number="350" groups="descriptor"/>
+ <syscall name="sched_setattr" number="351"/>
+ <syscall name="sched_getattr" number="352"/>
+ <syscall name="renameat2" number="353"/>
+ <syscall name="seccomp" number="354"/>
+ <syscall name="getrandom" number="355"/>
+ <syscall name="memfd_create" number="356"/>
+ <syscall name="bpf" number="357"/>
+ <syscall name="execveat" number="358"/>
+ <syscall name="socket" number="359" groups="network"/>
+ <syscall name="socketpair" number="360" groups="network"/>
+ <syscall name="bind" number="361" groups="network"/>
+ <syscall name="connect" number="362" groups="network"/>
+ <syscall name="listen" number="363" groups="network"/>
+ <syscall name="accept4" number="364" groups="network"/>
+ <syscall name="getsockopt" number="365" groups="network"/>
+ <syscall name="setsockopt" number="366" groups="network"/>
+ <syscall name="getsockname" number="367" groups="network"/>
+ <syscall name="getpeername" number="368" groups="network"/>
+ <syscall name="sendto" number="369" groups="network"/>
+ <syscall name="sendmsg" number="370" groups="network"/>
+ <syscall name="recvfrom" number="371" groups="network"/>
+ <syscall name="recvmsg" number="372" groups="network"/>
+ <syscall name="shutdown" number="373" groups="network"/>
+ <syscall name="userfaultfd" number="374"/>
+ <syscall name="membarrier" number="375"/>
+ <syscall name="mlock2" number="376"/>
+ <syscall name="copy_file_range" number="377"/>
+ <syscall name="preadv2" number="378"/>
+ <syscall name="pwritev2" number="379"/>
+ <syscall name="pkey_mprotect" number="380"/>
+ <syscall name="pkey_alloc" number="381"/>
+ <syscall name="pkey_free" number="382"/>
+ <syscall name="statx" number="383"/>
+ <syscall name="arch_prctl" number="384" groups="process"/>
+ <syscall name="io_pgetevents" number="385"/>
+ <syscall name="rseq" number="386"/>
+ <syscall name="semget" number="393" groups="ipc"/>
+ <syscall name="semctl" number="394" groups="ipc"/>
+ <syscall name="shmget" number="395" groups="ipc"/>
+ <syscall name="shmctl" number="396" groups="ipc"/>
+ <syscall name="shmat" number="397" groups="ipc,memory"/>
+ <syscall name="shmdt" number="398" groups="ipc,memory"/>
+ <syscall name="msgget" number="399" groups="ipc"/>
+ <syscall name="msgsnd" number="400" groups="ipc"/>
+ <syscall name="msgrcv" number="401" groups="ipc"/>
+ <syscall name="msgctl" number="402" groups="ipc"/>
+ <syscall name="clock_gettime64" number="403"/>
+ <syscall name="clock_settime64" number="404"/>
+ <syscall name="clock_adjtime64" number="405"/>
+ <syscall name="clock_getres_time64" number="406"/>
+ <syscall name="clock_nanosleep_time64" number="407"/>
+ <syscall name="timer_gettime64" number="408"/>
+ <syscall name="timer_settime64" number="409"/>
+ <syscall name="timerfd_gettime64" number="410"/>
+ <syscall name="timerfd_settime64" number="411"/>
+ <syscall name="utimensat_time64" number="412"/>
+ <syscall name="pselect6_time64" number="413"/>
+ <syscall name="ppoll_time64" number="414"/>
+ <syscall name="io_pgetevents_time64" number="416"/>
+ <syscall name="recvmmsg_time64" number="417"/>
+ <syscall name="mq_timedsend_time64" number="418"/>
+ <syscall name="mq_timedreceive_time64" number="419"/>
+ <syscall name="semtimedop_time64" number="420"/>
+ <syscall name="rt_sigtimedwait_time64" number="421"/>
+ <syscall name="futex_time64" number="422"/>
+ <syscall name="sched_rr_get_interval_time64" number="423"/>
+ <syscall name="pidfd_send_signal" number="424"/>
+ <syscall name="io_uring_setup" number="425"/>
+ <syscall name="io_uring_enter" number="426"/>
+ <syscall name="io_uring_register" number="427"/>
+ <syscall name="open_tree" number="428"/>
+ <syscall name="move_mount" number="429"/>
+ <syscall name="fsopen" number="430"/>
+ <syscall name="fsconfig" number="431"/>
+ <syscall name="fsmount" number="432"/>
+ <syscall name="fspick" number="433"/>
+ <syscall name="pidfd_open" number="434"/>
+ <syscall name="clone3" number="435"/>
+ <syscall name="close_range" number="436"/>
+ <syscall name="openat2" number="437"/>
+ <syscall name="pidfd_getfd" number="438"/>
+ <syscall name="faccessat2" number="439"/>
+ <syscall name="process_madvise" number="440"/>
+ <syscall name="epoll_pwait2" number="441"/>
+ <syscall name="mount_setattr" number="442"/>
+ <syscall name="quotactl_fd" number="443"/>
+ <syscall name="landlock_create_ruleset" number="444"/>
+ <syscall name="landlock_add_rule" number="445"/>
+ <syscall name="landlock_restrict_self" number="446"/>
+ <syscall name="memfd_secret" number="447"/>
+ <syscall name="process_mrelease" number="448"/>
+ <syscall name="futex_waitv" number="449"/>
+ <syscall name="set_mempolicy_home_node" number="450"/>
</syscalls_info>
diff --git a/gdb/syscalls/i386-linux.xml.in b/gdb/syscalls/i386-linux.xml.in
index 13c4d1d..549b595 100644
--- a/gdb/syscalls/i386-linux.xml.in
+++ b/gdb/syscalls/i386-linux.xml.in
@@ -8,11 +8,12 @@
<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
<!-- This file was generated using the following file:
-
- /usr/src/linux/arch/x86/include/asm/unistd_32.h
+
+ <sys/syscall.h>
The file mentioned above belongs to the Linux Kernel. -->
+
<syscalls_info>
<syscall name="restart_syscall" number="0"/>
<syscall name="exit" number="1"/>
@@ -234,9 +235,8 @@
<syscall name="pivot_root" number="217"/>
<syscall name="mincore" number="218"/>
<syscall name="madvise" number="219"/>
- <syscall name="madvise1" number="220"/>
- <syscall name="getdents64" number="221"/>
- <syscall name="fcntl64" number="222"/>
+ <syscall name="getdents64" number="220"/>
+ <syscall name="fcntl64" number="221"/>
<syscall name="gettid" number="224"/>
<syscall name="readahead" number="225"/>
<syscall name="setxattr" number="226"/>
@@ -337,5 +337,122 @@
<syscall name="eventfd" number="323"/>
<syscall name="fallocate" number="324"/>
<syscall name="timerfd_settime" number="325"/>
+ <syscall name="timerfd_gettime" number="326"/>
+ <syscall name="signalfd4" number="327"/>
+ <syscall name="eventfd2" number="328"/>
+ <syscall name="epoll_create1" number="329"/>
+ <syscall name="dup3" number="330"/>
<syscall name="pipe2" number="331"/>
+ <syscall name="inotify_init1" number="332"/>
+ <syscall name="preadv" number="333"/>
+ <syscall name="pwritev" number="334"/>
+ <syscall name="rt_tgsigqueueinfo" number="335"/>
+ <syscall name="perf_event_open" number="336"/>
+ <syscall name="recvmmsg" number="337"/>
+ <syscall name="fanotify_init" number="338"/>
+ <syscall name="fanotify_mark" number="339"/>
+ <syscall name="prlimit64" number="340"/>
+ <syscall name="name_to_handle_at" number="341"/>
+ <syscall name="open_by_handle_at" number="342"/>
+ <syscall name="clock_adjtime" number="343"/>
+ <syscall name="syncfs" number="344"/>
+ <syscall name="sendmmsg" number="345"/>
+ <syscall name="setns" number="346"/>
+ <syscall name="process_vm_readv" number="347"/>
+ <syscall name="process_vm_writev" number="348"/>
+ <syscall name="kcmp" number="349"/>
+ <syscall name="finit_module" number="350"/>
+ <syscall name="sched_setattr" number="351"/>
+ <syscall name="sched_getattr" number="352"/>
+ <syscall name="renameat2" number="353"/>
+ <syscall name="seccomp" number="354"/>
+ <syscall name="getrandom" number="355"/>
+ <syscall name="memfd_create" number="356"/>
+ <syscall name="bpf" number="357"/>
+ <syscall name="execveat" number="358"/>
+ <syscall name="socket" number="359"/>
+ <syscall name="socketpair" number="360"/>
+ <syscall name="bind" number="361"/>
+ <syscall name="connect" number="362"/>
+ <syscall name="listen" number="363"/>
+ <syscall name="accept4" number="364"/>
+ <syscall name="getsockopt" number="365"/>
+ <syscall name="setsockopt" number="366"/>
+ <syscall name="getsockname" number="367"/>
+ <syscall name="getpeername" number="368"/>
+ <syscall name="sendto" number="369"/>
+ <syscall name="sendmsg" number="370"/>
+ <syscall name="recvfrom" number="371"/>
+ <syscall name="recvmsg" number="372"/>
+ <syscall name="shutdown" number="373"/>
+ <syscall name="userfaultfd" number="374"/>
+ <syscall name="membarrier" number="375"/>
+ <syscall name="mlock2" number="376"/>
+ <syscall name="copy_file_range" number="377"/>
+ <syscall name="preadv2" number="378"/>
+ <syscall name="pwritev2" number="379"/>
+ <syscall name="pkey_mprotect" number="380"/>
+ <syscall name="pkey_alloc" number="381"/>
+ <syscall name="pkey_free" number="382"/>
+ <syscall name="statx" number="383"/>
+ <syscall name="arch_prctl" number="384"/>
+ <syscall name="io_pgetevents" number="385"/>
+ <syscall name="rseq" number="386"/>
+ <syscall name="semget" number="393"/>
+ <syscall name="semctl" number="394"/>
+ <syscall name="shmget" number="395"/>
+ <syscall name="shmctl" number="396"/>
+ <syscall name="shmat" number="397"/>
+ <syscall name="shmdt" number="398"/>
+ <syscall name="msgget" number="399"/>
+ <syscall name="msgsnd" number="400"/>
+ <syscall name="msgrcv" number="401"/>
+ <syscall name="msgctl" number="402"/>
+ <syscall name="clock_gettime64" number="403"/>
+ <syscall name="clock_settime64" number="404"/>
+ <syscall name="clock_adjtime64" number="405"/>
+ <syscall name="clock_getres_time64" number="406"/>
+ <syscall name="clock_nanosleep_time64" number="407"/>
+ <syscall name="timer_gettime64" number="408"/>
+ <syscall name="timer_settime64" number="409"/>
+ <syscall name="timerfd_gettime64" number="410"/>
+ <syscall name="timerfd_settime64" number="411"/>
+ <syscall name="utimensat_time64" number="412"/>
+ <syscall name="pselect6_time64" number="413"/>
+ <syscall name="ppoll_time64" number="414"/>
+ <syscall name="io_pgetevents_time64" number="416"/>
+ <syscall name="recvmmsg_time64" number="417"/>
+ <syscall name="mq_timedsend_time64" number="418"/>
+ <syscall name="mq_timedreceive_time64" number="419"/>
+ <syscall name="semtimedop_time64" number="420"/>
+ <syscall name="rt_sigtimedwait_time64" number="421"/>
+ <syscall name="futex_time64" number="422"/>
+ <syscall name="sched_rr_get_interval_time64" number="423"/>
+ <syscall name="pidfd_send_signal" number="424"/>
+ <syscall name="io_uring_setup" number="425"/>
+ <syscall name="io_uring_enter" number="426"/>
+ <syscall name="io_uring_register" number="427"/>
+ <syscall name="open_tree" number="428"/>
+ <syscall name="move_mount" number="429"/>
+ <syscall name="fsopen" number="430"/>
+ <syscall name="fsconfig" number="431"/>
+ <syscall name="fsmount" number="432"/>
+ <syscall name="fspick" number="433"/>
+ <syscall name="pidfd_open" number="434"/>
+ <syscall name="clone3" number="435"/>
+ <syscall name="close_range" number="436"/>
+ <syscall name="openat2" number="437"/>
+ <syscall name="pidfd_getfd" number="438"/>
+ <syscall name="faccessat2" number="439"/>
+ <syscall name="process_madvise" number="440"/>
+ <syscall name="epoll_pwait2" number="441"/>
+ <syscall name="mount_setattr" number="442"/>
+ <syscall name="quotactl_fd" number="443"/>
+ <syscall name="landlock_create_ruleset" number="444"/>
+ <syscall name="landlock_add_rule" number="445"/>
+ <syscall name="landlock_restrict_self" number="446"/>
+ <syscall name="memfd_secret" number="447"/>
+ <syscall name="process_mrelease" number="448"/>
+ <syscall name="futex_waitv" number="449"/>
+ <syscall name="set_mempolicy_home_node" number="450"/>
</syscalls_info>
diff --git a/gdb/syscalls/update-linux.sh b/gdb/syscalls/update-linux.sh
new file mode 100755
index 0000000..a671907
--- /dev/null
+++ b/gdb/syscalls/update-linux.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+# Copyright (C) 2022 Free Software Foundation, Inc.
+#
+# This file is part of GDB.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Used to generate .xml.in files, like so:
+#
+# ./update-linux.sh amd64-linux.xml.in
+# ./update-linux.sh i386-linux.xml.in -m32
+
+
+if [ $# -lt 1 ]; then
+ echo "file argument needed"
+ exit 1
+fi
+
+f="$1"
+shift
+
+if [ ! -f "$f" ]; then
+ echo "cannot find $f"
+ exit 1
+fi
+
+(
+ python gen-header.py "<sys/syscall.h>"
+
+ tmp=$(mktemp)
+
+ echo '#include <sys/syscall.h>' \
+ | gcc -E - -dD "$@" \
+ | grep -E '#define __NR_' \
+ > "$tmp"
+
+ echo '<syscalls_info>'
+
+ while read -r line; do
+ name=$(echo "$line" | awk '{print $2}' | sed 's/^__NR_//')
+ nr=$(echo "$line" | awk '{print $3}')
+ echo " <syscall name=\"$name\" number=\"$nr\"/>"
+ done < "$tmp"
+
+ echo '</syscalls_info>'
+
+ rm -f "$tmp"
+) > "$f"