binutils-gdb/gdb/syscalls
Tom de Vries eb221802ed [gdb] Remove unnecessary defs.h/common-defs.h includes
I asked an AI to review a patch that added a new file, and it mentioned I
should add an include of defs.h as first include.

That used to be true, but since commit 18d2988e5d ("gdb, gdbserver,
gdbsupport: remove includes of early headers") that's not the case anymore.

Error out when encountering a second include of defs.h, and remove a few of
those.

While we're at it, do the same for gdbsupport/common-defs.h and
gdbserver/server.h.

Tested by rebuilding gdb on x86_64-linux.

V1 submitted here [1].

Changes in v1:
- also handle gdbserver/server.h
- change error message to use "manually" instead of "twice"

Approved-By: Simon Marchi <simon.marchi@efficios.com>

[1] https://sourceware.org/pipermail/gdb-patches/2026-April/226694.html
2026-04-21 23:12:13 +02:00
..
aarch64-linux.xml
aarch64-linux.xml.in
amd64-linux.xml
amd64-linux.xml.in
apply-defaults.xsl
arm-linux.xml
arm-linux.xml.in
bfin-linux.xml
bfin-linux.xml.in
freebsd.xml
gdb-syscalls.dtd
i386-linux.xml
i386-linux.xml.in
linux-defaults.xml.in
loongarch-linux.xml
loongarch-linux.xml.in
Makefile
mips-n32-linux.xml
mips-n32-linux.xml.in
mips-n64-linux.xml
mips-n64-linux.xml.in
mips-o32-linux.xml
mips-o32-linux.xml.in
netbsd.xml
ppc-linux.xml
ppc-linux.xml.in
ppc64-linux.xml
ppc64-linux.xml.in
riscv-linux-canonicalize-syscall-gen.py
riscv-linux.xml
riscv-linux.xml.in
s390-linux.xml
s390-linux.xml.in
s390x-linux.xml
s390x-linux.xml.in
sparc-linux.xml
sparc-linux.xml.in
sparc64-linux.xml
sparc64-linux.xml.in
update-freebsd.sh
update-linux-defaults.sh
update-linux-from-src.sh
update-linux.sh
update-netbsd.sh