Age | Commit message (Collapse) | Author | Files | Lines |
|
The script syscalls/riscv-canonicalize-syscall-gen.py has been recently
introduced to help support record-full in riscv systems. However, it
was developed before commit 432eca4113d5748ad284a068873455f9962b44fe,
which made the GDB enum more consistent, which forced the python script
to have a corner case for the "gdb_old_mmap" case.
Since the aforementioned commit has already been merged, we need to
update the special case for the mmap syscall. A special case is still
needed because the script would expect that the glibc sources call the
syscall "old_mmap", or that gdb call it "gdb_sys_mmap", neither of which
happens unfortunately.
This commit doesn't change the .c file because it was already fixed by a
different commit, 65ab41b7d5c612b6000b28f4c50bb256b2a9e22b, which was
pushed as obvious to fix the build issues.
Tested-By: Luis Machado <luis.machado@arm.com>
Approved-By: Luis Machado <luis.machado@arm.com>
|
|
Running `pre-commit run --all-files` introduces these fixes.
Change-Id: I2e363fdf988b66d83008265b3ca8d1120f84b95d
|
|
When I (Guinevere) pushed commit
b9c7eed0c2409fc640129a38d80a2bf1212b464a I accidentally used an outdated
version of the patch. This current patch fixes the importation of that
patch based on the actually approved version instead.
|
|
It includes changes to the following files:
- gdb/riscv-linux-tdep.c, gdb/riscv-linux-tdep.h: adds facilities to record
syscalls.
- gdb/riscv-tdep.c, gdb/riscv-tdep.h: adds facilities to record execution of
rv64gc instructions.
- gdb/configure.tgt: adds new files for compilation.
- gdb/testsuite/lib/gdb.exp: enables testing of full record mode for RISC-V
targets.
- gdb/syscalls/riscv-canonicalize-syscall-gen.py: a script to generate
function that canonicalizes RISC-V syscall. This script can simplify support
for syscalls on rv32 and rv64 system (currently support only for rv64). To
use this script you need to pass a path to a file with syscalls description
from riscv-glibc (example is in the help message). The script produces a
mapping from syscall names to gdb_syscall enum.
- gdb/riscv-canonicalize-syscall.c: the file generated by the previous script.
- gdb/doc/gdb.texinfo: notification that record mode is enabled in RISC-V.
- gdb/NEWS: notification of new functionality.
Approved-By: Guinevere Larsen <guinevere@redhat.com>
Approved-By: Andrew Burgess <aburgess@redhat.com>
|
|
This updates the copyright headers to include 2025. I did this by
running gdb/copyright.py and then manually modifying a few files as
noted by the script.
Approved-By: Eli Zaretskii <eliz@gnu.org>
|
|
After syncing with strace v6.13 using:
...
$ update-linux-defaults.sh ~/upstream/strace.git
...
we have a few new entries in linux-defaults.xml.in:
...
<syscall name="getxattrat" groups="descriptor,file"/>
<syscall name="listxattrat" groups="descriptor,file"/>
<syscall name="removexattrat" groups="descriptor,file"/>
<syscall name="setxattrat" groups="descriptor,file"/>
...
Regenerate most *-linux.xml.in files using:
...
$ ./update-linux-from-src.sh ~/upstream/linux-stable.git
...
updating the copyright years, and do so manually for the remaining two.
Then regenerate *-linux.xml using make, propagating the groups changes and
copyright years.
Tested on x86_64-linux.
Approved-By: Andrew Burgess <aburgess@redhat.com>
|
|
There are some new syscalls in the latest upstream Linux kernel [1],
some archs updated the xml files in the recent commit 19f3450f7429
("[gdb/syscalls] Add syscalls {set,get,list,remove}xattrat"), also
update ARM64 to reflect the reality.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6140be90ec70
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: Tom de Vries <tdevries@suse.de>
|
|
There are some new syscalls in the latest upstream Linux kernel [1][2][3],
update the xml files for LoongArch to reflect the reality.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7697a0fe0154
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ff388fe5c481
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6140be90ec70
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: Tom de Vries <tdevries@suse.de>
|
|
After commit "gdb: syscalls: Handle __NR3264_ prefixed syscall number",
no need to do special handling when generating xml file for LoongArch,
just remove the tips in the file comment.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: Tom de Vries <tdevries@suse.de>
|
|
In gdb commit a08dc2aa004b ("gdb: syscalls: Add loongarch-linux.xml.in"),
we find:
There exist some __NR3264_ prefixed syscall numbers, replace them
with digital numbers according to /usr/include/asm-generic/unistd.h
and sort them by syscall number manually, maybe we can modify the
script to do it automatically in the future.
It is time to do it now, just handle __NR3264_ prefixed syscall number
automatically in the script update-linux.sh.
By the way, a Linux kernel patch did the similar change [1].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d6e1cc6b7220
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: Tom de Vries <tdevries@suse.de>
|
|
Currently aarch64-linux.xml.in is skipped by update-linux-from-src.sh:
...
$ ./update-linux-from-src.sh ~/upstream/linux-stable.git/
Skipping aarch64-linux.xml.in, no syscall.tbl
...
$
...
and instead we use update-linux.sh.
This works fine, but requires an aarch64 system with recent system headers,
which makes it harder to pick up the latest changes in the linux kernel.
Fix this by updating ./update-linux-from-src.sh to:
- build the linux kernel headers for aarch64
- use update-linux.sh with those headers to generate
aarch64-linux.xml.in.
Regenerating aarch64-linux.xml.in using current trunk of linux-stable gives me
these changes:
...
+ <syscall name="setxattrat" number="463"/>
+ <syscall name="getxattrat" number="464"/>
+ <syscall name="listxattrat" number="465"/>
+ <syscall name="removexattrat" number="466"/>
...
which are the same changes I see for the other architectures.
Note that the first step, building the linux kernel headers is a cross build
and should work on any architecture.
But the second step, update-linux.sh uses plain gcc rather than a cross-gcc,
so there is scope for problems, but we seem to get away with this on
x86_64-linux.
So, while we could constrain this to only generate aarch64-linux.xml.in on
aarch64-linux, I'm leaving this unconstrained.
For aarch64-linux.xml.in, this doesn't matter much to me because I got an
aarch64-linux system.
But I don't have a longaarch system, and the same approach seems to work
there. I'm leaving this for follow-up patch though.
Tested on aarch64-linux and x86_64-linux. Verified with shellcheck.
|
|
In commit 58776901074 ("[gdb/syscalls] Update to linux v6.11") I updated to
linux v6.11, but a recent submission for loongarch [1] used a current trunk
version, so it makes sense to do this as well elsewhere.
Using linux current trunk with update-linux-from-src.sh gets us 4 more
syscalls:
- setxattrat
- getxattrat
- listxattrat
- removexattrat
Tested on x86_64-linux.
[1] https://sourceware.org/pipermail/gdb-patches/2024-November/213613.html
|
|
Use gdb/syscalls/update-linux.sh to update aarch64-linux.xml.in to linux
v6.11, and update aarch64-linux.xml by running make.
Noteworthy changes are removal of entries:
- arch_specific_syscall
- syscalls
which look like they were added accidentally.
I modified update-linux.sh to keep the copyright start date. Verified with
shellcheck.
Tested-By: Luis Machado <luis.machado@arm.com>
Approved-By: Luis Machado <luis.machado@arm.com>
|
|
I ran gdb/syscalls/update-linux-defaults.sh with strace sources v6.12, and got
one difference in gdb/syscalls/linux-defaults.xml.in:
...
+ <syscall name="mseal" groups="memory"/>
...
Rerun make to propagate this change to the xml files.
|
|
I tried to use arm-linux.py to regenerate arm-linux.xml.in, but it didn't work.
Fix this by:
- adding handling of arm-linux.xml.in in update-linux-from-src.sh,
- regenerating arm-linux.xml.in using update-linux-from-src.sh and linux 6.11
sources,
- regenerating arm-linux.xml using make, and
- removing arm-linux.py.
This changes the name "oldolduname" into "olduname".
Tested on arm-linux. Verified with shellcheck.
|
|
Restructure update-linux-from-src.sh to do the generation of each line
in the script it self rather than in awk.
Tested on aarch64-linux. Verified with shellcheck.
|
|
Some improvements in gdb/syscalls/update-linux-from-src.sh:
- use bash instead of sh
- use local to distinguish between local and global vars
(which brings to light that pre uses the global rather than the local
start_date)
- factor out main and parse_args
- factor out regen
- iterate over *.xml.in instead of *.in
Tested on aarch64-linux. Verified with shellcheck.
|
|
Regenerate some gdb/syscalls/*.xml.in files using
gdb/syscalls/update-linux-from-src.sh and linux v6.11 sources.
Regenerate the corresponding gdb/syscalls/*.xml using make.
Tested on aarch64-linux.
|
|
This patch is the result of running 'isort .' in the gdb directory.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
|
|
In commit a08dc2aa004b (gdb: syscalls: Add loongarch-linux.xml.in),
it needs special handling when generating xml file. This should at
least be mentioned in the file comment rather than git log to help
the next person who regenerates this file understand what needs to
be done, suggested by Pedro Alves, thank you.
At the beginning, I only added the tips in loongarch-linux.xml.in,
after executing the command "make" to generate loongarch-linux.xml
from loongarch-linux.xml.in, it generates the same tips in the file
loongarch-linux.xml automatically, so update loongarch-linux.xml.in
and loongarch-linux.xml together.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-by: Pedro Alves <pedro@palves.net>
|
|
It shows that "Don't know how to generate loongarch-linux.xml.in"
when using the script update-linux-from-src.sh to regenerate the
syscall group info against Linux kernel, just add loongarch case.
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: John Baldwin <jhb@FreeBSD.org>
|
|
Make use of the command "make" to generate loongarch-linux.xml
from loongarch-linux.xml.in.
Like this:
$ git clone https://sourceware.org/git/binutils-gdb.git gdb.git
$ cd gdb.git/gdb/syscalls/
$ make
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: John Baldwin <jhb@FreeBSD.org>
|
|
There is no syscall.tbl for LoongArch because it uses generic syscalls,
so it can not generate loongarch-linux.xml.in automatically through the
script update-linux-from-src.sh, make use of the script update-linux.sh
to generate loongarch-linux.xml.in.
Like this:
$ git clone https://sourceware.org/git/binutils-gdb.git gdb.git
$ cd gdb.git/gdb/syscalls/
$ touch loongarch-linux.xml.in
$ ./update-linux.sh loongarch-linux.xml.in
Note that the system header file /usr/include/asm-generic/unistd.h
may be different with the latest upstream Linux kernel uapi header
file include/uapi/asm-generic/unistd.h, it is better to copy the
upstream header file into the system header file when generating
loongarch-linux.xml.in.
There exist some __NR3264_ prefixed syscall numbers, replace them
with digital numbers according to /usr/include/asm-generic/unistd.h
and sort them by syscall number manually, maybe we can modify the
script to do it automatically in the future.
<syscall name="fcntl" number="__NR3264_fcntl"/>
<syscall name="statfs" number="__NR3264_statfs"/>
<syscall name="fstatfs" number="__NR3264_fstatfs"/>
<syscall name="truncate" number="__NR3264_truncate"/>
<syscall name="ftruncate" number="__NR3264_ftruncate"/>
<syscall name="lseek" number="__NR3264_lseek"/>
<syscall name="sendfile" number="__NR3264_sendfile"/>
<syscall name="mmap" number="__NR3264_mmap"/>
<syscall name="fadvise64" number="__NR3264_fadvise64"/>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: John Baldwin <jhb@FreeBSD.org>
|
|
Make use of the command "make" to regenerate .xml files from .xml.in files.
Like this:
$ git clone https://sourceware.org/git/binutils-gdb.git gdb.git
$ cd gdb.git/gdb/syscalls/
$ make
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: John Baldwin <jhb@FreeBSD.org>
|
|
Make use of the script update-linux-from-src.sh to regenerate the Linux
syscall group info against Linux git commit d206a76d7d27 which will be
released in v6.8.
Like this:
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux.git
$ git clone https://sourceware.org/git/binutils-gdb.git gdb.git
$ cd gdb.git/gdb/syscalls/
$ ./update-linux-from-src.sh ~/linux.git/
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: John Baldwin <jhb@FreeBSD.org>
|
|
Make use of the script update-linux-defaults.sh to regenerate the Linux
syscall group info against strace git commit 8c480270653d which will be
released in v6.8.
Like this:
$ git clone https://github.com/strace/strace.git strace.git
$ git clone https://sourceware.org/git/binutils-gdb.git gdb.git
$ cd gdb.git/gdb/syscalls/
$ ./update-linux-defaults.sh ~/strace.git/
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Approved-By: John Baldwin <jhb@FreeBSD.org>
|
|
This commit is the result of the following actions:
- Running gdb/copyright.py to update all of the copyright headers to
include 2024,
- Manually updating a few files the copyright.py script told me to
update, these files had copyright headers embedded within the
file,
- Regenerating gdbsupport/Makefile.in to refresh it's copyright
date,
- Using grep to find other files that still mentioned 2023. If
these files were updated last year from 2022 to 2023 then I've
updated them this year to 2024.
I'm sure I've probably missed some dates. Feel free to fix them up as
you spot them.
|
|
Generated from sys/sys/syscall.h revision 1.324.
|
|
This matches the current set of system calls at the start of the
stable/14 branch (commit 29a16ce065dbc28bc9e87c9bfadb08bb58b137e4).
|
|
When running update-freebsd.sh on FreeBSD, I see the following
modification in freebsd.xml,
-<!-- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+<!-- Copyright (C) 2009-2020 Free Software Foundation, Inc.
It means that each time, when we running the update-freebsd.sh on
FreeBSD, we have to correct the year of copyright manually. So fix this
issue by using dynamic year.
Tested by regenerating freebsd.xml on FreeBSD/amd64.
Reviewed-By: John Baldwin <jhb@FreeBSD.org>
Approved-By: Simon Marchi <simon.marchi@efficios.com>
|
|
Generated from sys/sys/syscall.h revision 1.321.
|
|
This commit makes use of the new script to regenerate the Linux
syscall group info against strace git hash
e88e5e9ae6da68f22d15f9be3193b1412ac9aa02.
Like so:
$ cd gdb/syscalls/
$ ./update-linux-defaults.sh ~/strace.git/
Generating linux-defaults.xml.in
$ make
for f in aarch64-linux.xml amd64-linux.xml arm-linux.xml bfin-linux.xml \
i386-linux.xml mips-n32-linux.xml mips-n64-linux.xml \
mips-o32-linux.xml ppc64-linux.xml ppc-linux.xml s390-linux.xml \
s390x-linux.xml sparc64-linux.xml sparc-linux.xml; do \
xsltproc --output $f apply-defaults.xsl $f.in; \
done
The result is that a lot more syscalls end up assigned to groups.
Some lose their group info, but that just mirrors what strace does.
The gdb/syscalls/linux-defaults.xml.in file shows a large diff because
the new version is ASCII sorted, while the current version was
somewhat (but not consistently) sorted by "family" of syscalls.
If I sort the old file and diff against the new, the difference is
like this:
<syscall name="accept4" groups="network"/>
<syscall name="accept" groups="network"/>
<syscall name="access" groups="file"/>
<syscall name="acct" groups="file"/>
- <syscall name="arch_prctl" groups="process"/>
<syscall name="bind" groups="network"/>
+ <syscall name="bpf" groups="descriptor"/>
<syscall name="break" groups="memory"/>
<syscall name="brk" groups="memory"/>
+ <syscall name="bsd43_fstatfs" groups="descriptor"/>
+ <syscall name="bsd43_fstat" groups="descriptor"/>
+ <syscall name="bsd43_killpg" groups="process"/>
+ <syscall name="bsd43_kill" groups="process"/>
+ <syscall name="bsd43_lstat" groups="file"/>
+ <syscall name="bsd43_madvise" groups="memory"/>
+ <syscall name="bsd43_mincore" groups="memory"/>
+ <syscall name="bsd43_mmap" groups="descriptor,memory"/>
+ <syscall name="bsd43_mprotect" groups="memory"/>
+ <syscall name="bsd43_mremap" groups="memory"/>
+ <syscall name="bsd43_munmap" groups="memory"/>
+ <syscall name="bsd43_oldfstat" groups="descriptor"/>
+ <syscall name="bsd43_oldstat" groups="file"/>
+ <syscall name="bsd43_quotactl" groups="file"/>
+ <syscall name="bsd43_sbreak" groups="memory"/>
+ <syscall name="bsd43_sbrk" groups="memory"/>
+ <syscall name="bsd43_statfs" groups="file"/>
+ <syscall name="bsd43_stat" groups="file"/>
+ <syscall name="cacheflush" groups="memory"/>
<syscall name="chdir" groups="file"/>
<syscall name="chmod" groups="file"/>
<syscall name="chown32" groups="file"/>
<syscall name="chown" groups="file"/>
<syscall name="chroot" groups="file"/>
+ <syscall name="clone2" groups="process"/>
+ <syscall name="clone3" groups="process"/>
<syscall name="clone" groups="process"/>
<syscall name="close" groups="descriptor"/>
<syscall name="connect" groups="network"/>
+ <syscall name="copy_file_range" groups="descriptor"/>
<syscall name="creat" groups="descriptor,file"/>
<syscall name="dup2" groups="descriptor"/>
<syscall name="dup3" groups="descriptor"/>
@@ -28,14 +52,17 @@
<syscall name="epoll_create1" groups="descriptor"/>
<syscall name="epoll_create" groups="descriptor"/>
<syscall name="epoll_ctl" groups="descriptor"/>
+ <syscall name="epoll_pwait2" groups="descriptor"/>
<syscall name="epoll_pwait" groups="descriptor"/>
<syscall name="epoll_wait" groups="descriptor"/>
<syscall name="eventfd2" groups="descriptor"/>
<syscall name="eventfd" groups="descriptor"/>
+ <syscall name="execveat" groups="descriptor,file,process"/>
<syscall name="execve" groups="file,process"/>
<syscall name="execv" groups="file,process"/>
<syscall name="exit_group" groups="process"/>
<syscall name="exit" groups="process"/>
+ <syscall name="faccessat2" groups="descriptor,file"/>
<syscall name="faccessat" groups="descriptor,file"/>
<syscall name="fadvise64_64" groups="descriptor"/>
<syscall name="fadvise64" groups="descriptor"/>
@@ -57,7 +84,11 @@
<syscall name="flock" groups="descriptor"/>
<syscall name="fork" groups="process"/>
<syscall name="fremovexattr" groups="descriptor"/>
+ <syscall name="fsconfig" groups="descriptor,file"/>
<syscall name="fsetxattr" groups="descriptor"/>
+ <syscall name="fsmount" groups="descriptor"/>
+ <syscall name="fsopen" groups="descriptor"/>
+ <syscall name="fspick" groups="descriptor,file"/>
<syscall name="fstat64" groups="descriptor"/>
<syscall name="fstatat64" groups="descriptor,file"/>
<syscall name="fstatfs64" groups="descriptor"/>
@@ -72,16 +103,26 @@
<syscall name="getdents" groups="descriptor"/>
<syscall name="get_mempolicy" groups="memory"/>
<syscall name="getpeername" groups="network"/>
+ <syscall name="getpmsg" groups="network"/>
<syscall name="getsockname" groups="network"/>
<syscall name="getsockopt" groups="network"/>
<syscall name="getxattr" groups="file"/>
- <syscall name="inotify_add_watch" groups="descriptor"/>
+ <syscall name="inotify_add_watch" groups="descriptor,file"/>
<syscall name="inotify_init1" groups="descriptor"/>
<syscall name="inotify_init" groups="descriptor"/>
<syscall name="inotify_rm_watch" groups="descriptor"/>
<syscall name="ioctl" groups="descriptor"/>
+ <syscall name="io_destroy" groups="memory"/>
+ <syscall name="io_setup" groups="memory"/>
+ <syscall name="io_uring_enter" groups="descriptor,signal"/>
+ <syscall name="io_uring_register" groups="descriptor,memory"/>
+ <syscall name="io_uring_setup" groups="descriptor"/>
<syscall name="ipc" groups="ipc"/>
- <syscall name="kill" groups="signal"/>
+ <syscall name="kexec_file_load" groups="descriptor"/>
+ <syscall name="kill" groups="signal,process"/>
+ <syscall name="landlock_add_rule" groups="descriptor"/>
+ <syscall name="landlock_create_ruleset" groups="descriptor"/>
+ <syscall name="landlock_restrict_self" groups="descriptor"/>
<syscall name="lchown32" groups="file"/>
<syscall name="lchown" groups="file"/>
<syscall name="lgetxattr" groups="file"/>
@@ -98,19 +139,31 @@
<syscall name="lstat" groups="file"/>
<syscall name="madvise" groups="memory"/>
<syscall name="mbind" groups="memory"/>
+ <syscall name="memfd_create" groups="descriptor"/>
+ <syscall name="memfd_secret" groups="descriptor"/>
<syscall name="migrate_pages" groups="memory"/>
<syscall name="mincore" groups="memory"/>
<syscall name="mkdirat" groups="descriptor,file"/>
<syscall name="mkdir" groups="file"/>
<syscall name="mknodat" groups="descriptor,file"/>
<syscall name="mknod" groups="file"/>
+ <syscall name="mlock2" groups="memory"/>
<syscall name="mlockall" groups="memory"/>
<syscall name="mlock" groups="memory"/>
<syscall name="mmap2" groups="descriptor,memory"/>
<syscall name="mmap" groups="descriptor,memory"/>
+ <syscall name="mount_setattr" groups="descriptor,file"/>
<syscall name="mount" groups="file"/>
+ <syscall name="move_mount" groups="descriptor,file"/>
<syscall name="move_pages" groups="memory"/>
<syscall name="mprotect" groups="memory"/>
+ <syscall name="mq_getsetattr" groups="descriptor"/>
+ <syscall name="mq_notify" groups="descriptor"/>
+ <syscall name="mq_open" groups="descriptor"/>
+ <syscall name="mq_timedreceive" groups="descriptor"/>
+ <syscall name="mq_timedreceive_time64" groups="descriptor"/>
+ <syscall name="mq_timedsend" groups="descriptor"/>
+ <syscall name="mq_timedsend_time64" groups="descriptor"/>
<syscall name="mremap" groups="memory"/>
<syscall name="msgctl" groups="ipc"/>
<syscall name="msgget" groups="ipc"/>
@@ -126,45 +179,98 @@
<syscall name="oldfstat" groups="descriptor"/>
<syscall name="oldlstat" groups="file"/>
<syscall name="oldstat" groups="file"/>
+ <syscall name="oldumount" groups="file"/>
+ <syscall name="openat2" groups="descriptor,file"/>
<syscall name="openat" groups="descriptor,file"/>
<syscall name="open_by_handle_at" groups="descriptor"/>
<syscall name="open" groups="descriptor,file"/>
+ <syscall name="open_tree" groups="descriptor,file"/>
+ <syscall name="osf_fstatfs64" groups="descriptor"/>
+ <syscall name="osf_fstatfs" groups="descriptor"/>
+ <syscall name="osf_fstat" groups="descriptor"/>
+ <syscall name="osf_lstat" groups="file"/>
+ <syscall name="osf_mincore" groups="memory"/>
+ <syscall name="osf_mremap" groups="memory"/>
+ <syscall name="osf_old_fstat" groups="descriptor"/>
+ <syscall name="osf_old_killpg" groups="process"/>
+ <syscall name="osf_old_lstat" groups="file"/>
+ <syscall name="osf_old_stat" groups="file"/>
+ <syscall name="osf_sbrk" groups="memory"/>
+ <syscall name="osf_select" groups="descriptor"/>
+ <syscall name="osf_shmat" groups="ipc,memory"/>
+ <syscall name="osf_sigprocmask" groups="signal"/>
+ <syscall name="osf_statfs64" groups="file"/>
+ <syscall name="osf_statfs" groups="file"/>
+ <syscall name="osf_stat" groups="file"/>
+ <syscall name="osf_utimes" groups="file"/>
+ <syscall name="osf_wait4" groups="process"/>
<syscall name="pause" groups="signal"/>
<syscall name="perf_event_open" groups="descriptor"/>
+ <syscall name="pidfd_getfd" groups="descriptor"/>
+ <syscall name="pidfd_open" groups="descriptor"/>
+ <syscall name="pidfd_send_signal" groups="descriptor,signal,process"/>
<syscall name="pipe2" groups="descriptor"/>
<syscall name="pipe" groups="descriptor"/>
<syscall name="pivot_root" groups="file"/>
+ <syscall name="pkey_mprotect" groups="memory"/>
<syscall name="poll" groups="descriptor"/>
+ <syscall name="posix_fstatfs" groups="descriptor"/>
+ <syscall name="posix_fstat" groups="descriptor"/>
+ <syscall name="posix_kill" groups="process"/>
+ <syscall name="posix_lstat" groups="file"/>
+ <syscall name="posix_madvise" groups="memory"/>
+ <syscall name="posix_mmap" groups="descriptor,memory"/>
+ <syscall name="posix_munmap" groups="memory"/>
+ <syscall name="posix_sbreak" groups="memory"/>
+ <syscall name="posix_SGI_madvise" groups="memory"/>
+ <syscall name="posix_SGI_mmap" groups="descriptor,memory"/>
+ <syscall name="posix_SGI_mprotect" groups="memory"/>
+ <syscall name="posix_SGI_msync" groups="memory"/>
+ <syscall name="posix_SGI_munmap" groups="memory"/>
+ <syscall name="posix_statfs" groups="file"/>
+ <syscall name="posix_stat" groups="file"/>
<syscall name="ppoll" groups="descriptor"/>
+ <syscall name="ppoll_time64" groups="descriptor"/>
<syscall name="pread64" groups="descriptor"/>
<syscall name="pread" groups="descriptor"/>
+ <syscall name="preadv2" groups="descriptor"/>
<syscall name="preadv" groups="descriptor"/>
+ <syscall name="process_madvise" groups="descriptor"/>
+ <syscall name="process_mrelease" groups="descriptor"/>
<syscall name="pselect6" groups="descriptor"/>
+ <syscall name="pselect6_time64" groups="descriptor"/>
+ <syscall name="putpmsg" groups="network"/>
<syscall name="pwrite64" groups="descriptor"/>
<syscall name="pwrite" groups="descriptor"/>
+ <syscall name="pwritev2" groups="descriptor"/>
<syscall name="pwritev" groups="descriptor"/>
+ <syscall name="quotactl_fd" groups="descriptor"/>
<syscall name="quotactl" groups="file"/>
<syscall name="readahead" groups="descriptor"/>
<syscall name="readdir" groups="descriptor"/>
- <syscall name="read" groups="descriptor"/>
<syscall name="readlinkat" groups="descriptor,file"/>
<syscall name="readlink" groups="file"/>
+ <syscall name="read" groups="descriptor"/>
<syscall name="readv" groups="descriptor"/>
<syscall name="recvfrom" groups="network"/>
- <syscall name="recv" groups="network"/>
+ <syscall name="recvmmsg_time64" groups="network"/>
<syscall name="recvmmsg" groups="network"/>
<syscall name="recvmsg" groups="network"/>
+ <syscall name="recv" groups="network"/>
<syscall name="remap_file_pages" groups="memory"/>
<syscall name="removexattr" groups="file"/>
+ <syscall name="renameat2" groups="descriptor,file"/>
<syscall name="renameat" groups="descriptor,file"/>
<syscall name="rename" groups="file"/>
+ <syscall name="riscv_flush_icache" groups="memory"/>
<syscall name="rmdir" groups="file"/>
<syscall name="rt_sigaction" groups="signal"/>
<syscall name="rt_sigpending" groups="signal"/>
<syscall name="rt_sigprocmask" groups="signal"/>
- <syscall name="rt_sigqueueinfo" groups="signal"/>
+ <syscall name="rt_sigqueueinfo" groups="signal,process"/>
<syscall name="rt_sigreturn" groups="signal"/>
<syscall name="rt_sigsuspend" groups="signal"/>
+ <syscall name="rt_sigtimedwait_time64" groups="signal"/>
<syscall name="rt_sigtimedwait" groups="signal"/>
<syscall name="rt_tgsigqueueinfo" groups="process,signal"/>
<syscall name="select" groups="descriptor"/>
@@ -172,12 +278,14 @@
<syscall name="semget" groups="ipc"/>
<syscall name="semop" groups="ipc"/>
<syscall name="semtimedop" groups="ipc"/>
+ <syscall name="semtimedop_time64" groups="ipc"/>
<syscall name="sendfile64" groups="descriptor,network"/>
<syscall name="sendfile" groups="descriptor,network"/>
- <syscall name="send" groups="network"/>
<syscall name="sendmmsg" groups="network"/>
<syscall name="sendmsg" groups="network"/>
+ <syscall name="send" groups="network"/>
<syscall name="sendto" groups="network"/>
+ <syscall name="set_mempolicy_home_node" groups="memory"/>
<syscall name="set_mempolicy" groups="memory"/>
<syscall name="setns" groups="descriptor"/>
<syscall name="setsockopt" groups="network"/>
@@ -198,38 +306,78 @@
<syscall name="sigreturn" groups="signal"/>
<syscall name="sigsuspend" groups="signal"/>
<syscall name="socketcall" groups="descriptor"/>
- <syscall name="socket" groups="network"/>
<syscall name="socketpair" groups="network"/>
+ <syscall name="socket" groups="network"/>
<syscall name="splice" groups="descriptor"/>
<syscall name="ssetmask" groups="signal"/>
<syscall name="stat64" groups="file"/>
<syscall name="statfs64" groups="file"/>
<syscall name="statfs" groups="file"/>
<syscall name="stat" groups="file"/>
+ <syscall name="statx" groups="descriptor,file"/>
+ <syscall name="svr4_fstatfs" groups="descriptor"/>
+ <syscall name="svr4_fstat" groups="descriptor"/>
+ <syscall name="svr4_fstatvfs" groups="descriptor"/>
+ <syscall name="svr4_fxstat" groups="descriptor"/>
+ <syscall name="svr4_kill" groups="process"/>
+ <syscall name="svr4_lstat" groups="file"/>
+ <syscall name="svr4_lxstat" groups="file"/>
+ <syscall name="svr4_mincore" groups="memory"/>
+ <syscall name="svr4_mmap" groups="descriptor,memory"/>
+ <syscall name="svr4_mprotect" groups="memory"/>
+ <syscall name="svr4_munmap" groups="memory"/>
+ <syscall name="svr4_sbreak" groups="memory"/>
+ <syscall name="svr4_statfs" groups="file"/>
+ <syscall name="svr4_stat" groups="file"/>
+ <syscall name="svr4_statvfs" groups="file"/>
+ <syscall name="svr4_xstat" groups="file"/>
<syscall name="swapoff" groups="file"/>
<syscall name="swapon" groups="file"/>
<syscall name="symlinkat" groups="descriptor,file"/>
<syscall name="symlink" groups="file"/>
+ <syscall name="sync_file_range2" groups="descriptor"/>
<syscall name="sync_file_range" groups="descriptor"/>
<syscall name="syncfs" groups="descriptor"/>
+ <syscall name="sysv_brk" groups="memory"/>
+ <syscall name="sysv_fstatfs" groups="descriptor"/>
+ <syscall name="sysv_fstat" groups="descriptor"/>
+ <syscall name="sysv_fstatvfs" groups="descriptor"/>
+ <syscall name="sysv_fxstat" groups="descriptor"/>
+ <syscall name="sysv_kill" groups="process"/>
+ <syscall name="sysv_lstat" groups="file"/>
+ <syscall name="sysv_lxstat" groups="file"/>
+ <syscall name="sysv_madvise" groups="memory"/>
+ <syscall name="sysv_mmap64" groups="descriptor,memory"/>
+ <syscall name="sysv_mmap" groups="descriptor,memory"/>
+ <syscall name="sysv_mprotect" groups="memory"/>
+ <syscall name="sysv_msync" groups="memory"/>
+ <syscall name="sysv_munmap" groups="memory"/>
+ <syscall name="sysv_quotactl" groups="file"/>
+ <syscall name="sysv_statfs" groups="file"/>
+ <syscall name="sysv_stat" groups="file"/>
+ <syscall name="sysv_statvfs" groups="file"/>
+ <syscall name="sysv_xstat" groups="file"/>
<syscall name="tee" groups="descriptor"/>
- <syscall name="tgkill" groups="signal"/>
+ <syscall name="tgkill" groups="signal,process"/>
<syscall name="timerfd_create" groups="descriptor"/>
+ <syscall name="timerfd_gettime64" groups="descriptor"/>
<syscall name="timerfd_gettime" groups="descriptor"/>
- <syscall name="timerfd" groups="descriptor"/>
+ <syscall name="timerfd_settime64" groups="descriptor"/>
<syscall name="timerfd_settime" groups="descriptor"/>
- <syscall name="tkill" groups="signal"/>
+ <syscall name="timerfd" groups="descriptor"/>
+ <syscall name="tkill" groups="signal,process"/>
<syscall name="truncate64" groups="file"/>
<syscall name="truncate" groups="file"/>
<syscall name="umount2" groups="file"/>
<syscall name="umount" groups="file"/>
<syscall name="unlinkat" groups="descriptor,file"/>
<syscall name="unlink" groups="file"/>
- <syscall name="unshare" groups="process"/>
<syscall name="uselib" groups="file"/>
- <syscall name="utime" groups="file"/>
+ <syscall name="userfaultfd" groups="descriptor"/>
<syscall name="utimensat" groups="descriptor,file"/>
+ <syscall name="utimensat_time64" groups="descriptor,file"/>
<syscall name="utimes" groups="file"/>
+ <syscall name="utime" groups="file"/>
<syscall name="vfork" groups="process"/>
<syscall name="vmsplice" groups="descriptor"/>
<syscall name="wait4" groups="process"/>
Change-Id: I679d59d42fb2a914bf7a99e4c558e9696e5adff1
|
|
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
|
|
This commit updates the following file...
gdb/doc/gdb.texinfo
gdb/doc/refcard.tex
gdb/syscalls/update-netbsd.sh
... by hand as instructed by the gdb/copyright.py script.
The update by hand is needed because the copyright headers
to update are actually nested inside those files, rather
than located at the start of the file.
|
|
This commit is the result of running the gdb/copyright.py script,
which automated the update of the copyright year range for all
source files managed by the GDB project to be updated to include
year 2023.
|
|
Add a new script gdb/syscalls/update-linux-from-src.sh, that can be used to
generate *-linux.xml.in files from linux kernel sources, like so:
...
$ ./update-linux-from-src.sh ~/upstream/linux-stable.git
Skipping aarch64-linux.xml.in, no syscall.tbl
Generating amd64-linux.xml.in
Skipping arm-linux.xml.in, use arm-linux.py instead
Skipping bfin-linux.xml.in, no longer supported
Generating i386-linux.xml.in
Generating mips-n32-linux.xml.in
Generating mips-n64-linux.xml.in
Generating mips-o32-linux.xml.in
Generating ppc64-linux.xml.in
Generating ppc-linux.xml.in
Generating s390-linux.xml.in
Generating s390x-linux.xml.in
Generating sparc64-linux.xml.in
Generating sparc-linux.xml.in
...
Update *-linux.xml.in and *-linux.xml using linux kernel tag v5.18-rc6.
|
|
Fix two things in update-linux.sh:
- remove use of unnecessary tmp file
- inline gen-header.py into update-linux.sh
Tested on x86_64-linux.
|
|
Regenerate syscalls/{ppc64,ppc}-linux.xml on a system with 5.14 kernel.
|
|
- 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.
|
|
Add a Makefile in gdb/syscalls that can be used to translate
gdb/syscalls/*.xml.in into gdb/syscalls/*.xml.
Calling make reveals that bfin-linux.xml is missing, so add it.
Tested on x86_64-linux.
|
|
With test-case gdb.base/catch-syscall.exp and target board unix/-m32, we run
into:
...
(gdb) catch syscall pipe2^M
Unknown syscall name 'pipe2'.^M
(gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: catch syscall pipe2
...
Fix this by:
- adding a pipe2 entry in gdb/syscalls/i386-linux.xml.in, and
- regenerating gdb/syscalls/i386-linux.xml using
"xsltproc --output i386-linux.xml apply-defaults.xsl i386-linux.xml.in".
Tested on x86_64-linux with native and unix/-m32.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056
|
|
This commit updates the copyright year in some files where
we have a copyright year outside of the copyright year,
and thus are not included in gdb's copyright.py script.
|
|
This commit brings all the changes made by running gdb/copyright.py
as per GDB's Start of New Year Procedure.
For the avoidance of doubt, all changes in this commits were
performed by the script.
|
|
Generated from sys/sys/syscall.h revision 1.319.
We can safely remove the _lwp_gettid syscall, which was never exposed
in libc and never made it into a release.
gdb/ChangeLog:
2021-07-23 Frederic Cambus <fred@statdns.com>
* syscalls/netbsd.xml: Regenerate.
|
|
Re-format all Python files using black [1] version 21.4b0. The goal is
that from now on, we keep all Python files formatted using black. And
that we never have to discuss formatting during review (for these files
at least) ever again.
One change is needed in gdb.python/py-prettyprint.exp, because it
matches the string representation of an exception, which shows source
code. So the change in formatting must be replicated in the expected
regexp.
To document our usage of black I plan on adding this to the "GDB Python
Coding Standards" wiki page [2]:
--8<--
All Python source files under the `gdb/` directory must be formatted
using black version 21.4b0.
This specific version can be installed using:
$ pip3 install 'black == 21.4b0'
All you need to do to re-format files is run `black <file/directory>`,
and black will re-format any Python file it finds in there. It runs
quite fast, so the simplest is to do:
$ black gdb/
from the top-level.
If you notice that black produces changes unrelated to your patch, it's
probably because someone forgot to run it before you. In this case,
don't include unrelated hunks in your patch. Push an obvious patch
fixing the formatting and rebase your work on top of that.
-->8--
Once this is merged, I plan on setting a up an `ignoreRevsFile`
config so that git-blame ignores this commit, as described here:
https://github.com/psf/black#migrating-your-code-style-without-ruining-git-blame
I also plan on working on a git commit hook (checked in the repo) to
automatically check the formatting of the Python files on commit.
[1] https://pypi.org/project/black/
[2] https://sourceware.org/gdb/wiki/Internals%20GDB-Python-Coding-Standards
gdb/ChangeLog:
* Re-format all Python files using black.
gdb/testsuite/ChangeLog:
* Re-format all Python files using black.
* gdb.python/py-prettyprint.exp (run_lang_tests): Adjust.
Change-Id: I28588a22c2406afd6bc2703774ddfff47cd61919
|
|
Fix the script name and year range in update-netbsd.sh.
gdb/ChangeLog
2021-04-21 Frederic Cambus <fred@statdns.com>
* syscalls/update-netbsd.sh: Fix script name display in usage, and
update year range in generated copyright notices.
|
|
This commits the result of running gdb/copyright.py as per our Start
of New Year procedure...
gdb/ChangeLog
Update copyright year range in copyright header of all GDB files.
|
|
This matches the current set of system calls in the FreeBSD head
development branch as of r363367. Some of these system calls
were also included in 12.1 release.
gdb/ChangeLog:
* syscalls/freebsd.xml: Regenerate.
|
|
gdb/ChangeLog:
* syscalls/update-freebsd.sh: Fix usage and year range.
|
|
All platforms on NetBSD use a shared system call table, so use a
single XML file to describe the system calls available on each NetBSD
platform.
gdb/ChangeLog:
* syscalls/update-netbsd.sh: New file.
* syscalls/netbsd.xml: Regenerate.
* data-directory/Makefile.in: Register `netbsd.xml' in
`SYSCALLS_FILES'
|