From 18d2988e5da8919514c76b83e2c0b56e439018bd Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 26 Mar 2024 15:06:46 -0400 Subject: gdb, gdbserver, gdbsupport: remove includes of early headers Now that defs.h, server.h and common-defs.h are included via the `-include` option, it is no longer necessary for source files to include them. Remove all the inclusions of these files I could find. Update the generation scripts where relevant. Change-Id: Ia026cff269c1b7ae7386dd3619bc9bb6a5332837 Approved-By: Pedro Alves --- gdb/unittests/array-view-selftests.c | 1 - gdb/unittests/child-path-selftests.c | 1 - gdb/unittests/cli-utils-selftests.c | 1 - gdb/unittests/command-def-selftests.c | 1 - gdb/unittests/common-utils-selftests.c | 1 - gdb/unittests/copy_bitwise-selftests.c | 1 - gdb/unittests/enum-flags-selftests.c | 1 - gdb/unittests/environ-selftests.c | 1 - gdb/unittests/filtered_iterator-selftests.c | 1 - gdb/unittests/format_pieces-selftests.c | 1 - gdb/unittests/frame_info_ptr-selftests.c | 1 - gdb/unittests/function-view-selftests.c | 1 - gdb/unittests/gdb_tilde_expand-selftests.c | 1 - gdb/unittests/gmp-utils-selftests.c | 1 - gdb/unittests/intrusive_list-selftests.c | 1 - gdb/unittests/lookup_name_info-selftests.c | 1 - gdb/unittests/main-thread-selftests.c | 1 - gdb/unittests/memory-map-selftests.c | 1 - gdb/unittests/memrange-selftests.c | 1 - gdb/unittests/mkdir-recursive-selftests.c | 1 - gdb/unittests/observable-selftests.c | 1 - gdb/unittests/offset-type-selftests.c | 1 - gdb/unittests/packed-selftests.c | 1 - gdb/unittests/parallel-for-selftests.c | 1 - gdb/unittests/parse-connection-spec-selftests.c | 1 - gdb/unittests/path-join-selftests.c | 1 - gdb/unittests/ptid-selftests.c | 1 - gdb/unittests/rsp-low-selftests.c | 1 - gdb/unittests/scoped_fd-selftests.c | 1 - gdb/unittests/scoped_ignore_signal-selftests.c | 1 - gdb/unittests/scoped_mmap-selftests.c | 1 - gdb/unittests/scoped_restore-selftests.c | 1 - gdb/unittests/search-memory-selftests.c | 1 - gdb/unittests/style-selftests.c | 1 - gdb/unittests/tracepoint-selftests.c | 1 - gdb/unittests/tui-selftests.c | 1 - gdb/unittests/ui-file-selftests.c | 1 - gdb/unittests/unique_xmalloc_ptr_char.c | 1 - gdb/unittests/unpack-selftests.c | 1 - gdb/unittests/utils-selftests.c | 1 - gdb/unittests/vec-utils-selftests.c | 1 - gdb/unittests/xml-utils-selftests.c | 1 - 42 files changed, 42 deletions(-) (limited to 'gdb/unittests') diff --git a/gdb/unittests/array-view-selftests.c b/gdb/unittests/array-view-selftests.c index 299318a..eb3ae30 100644 --- a/gdb/unittests/array-view-selftests.c +++ b/gdb/unittests/array-view-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/array-view.h" #include diff --git a/gdb/unittests/child-path-selftests.c b/gdb/unittests/child-path-selftests.c index 9f77dd7..4c4014d 100644 --- a/gdb/unittests/child-path-selftests.c +++ b/gdb/unittests/child-path-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/pathstuff.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/cli-utils-selftests.c b/gdb/unittests/cli-utils-selftests.c index 69d84bf..6ade3af 100644 --- a/gdb/unittests/cli-utils-selftests.c +++ b/gdb/unittests/cli-utils-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "cli/cli-utils.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/command-def-selftests.c b/gdb/unittests/command-def-selftests.c index 74a2180..6936af7 100644 --- a/gdb/unittests/command-def-selftests.c +++ b/gdb/unittests/command-def-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "cli/cli-cmds.h" #include "cli/cli-decode.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/common-utils-selftests.c b/gdb/unittests/common-utils-selftests.c index b1f8fb8..e66e380 100644 --- a/gdb/unittests/common-utils-selftests.c +++ b/gdb/unittests/common-utils-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "gdbsupport/common-defs.h" #include "gdbsupport/selftest.h" namespace selftests { diff --git a/gdb/unittests/copy_bitwise-selftests.c b/gdb/unittests/copy_bitwise-selftests.c index 776d99a..c9f61b0 100644 --- a/gdb/unittests/copy_bitwise-selftests.c +++ b/gdb/unittests/copy_bitwise-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "utils.h" diff --git a/gdb/unittests/enum-flags-selftests.c b/gdb/unittests/enum-flags-selftests.c index 54e1681..b55d8c3 100644 --- a/gdb/unittests/enum-flags-selftests.c +++ b/gdb/unittests/enum-flags-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/enum-flags.h" #include "gdbsupport/valid-expr.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/environ-selftests.c b/gdb/unittests/environ-selftests.c index c016e74..9bd7360 100644 --- a/gdb/unittests/environ-selftests.c +++ b/gdb/unittests/environ-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/environ.h" #include "diagnostics.h" diff --git a/gdb/unittests/filtered_iterator-selftests.c b/gdb/unittests/filtered_iterator-selftests.c index 147f09d..dc76fe0 100644 --- a/gdb/unittests/filtered_iterator-selftests.c +++ b/gdb/unittests/filtered_iterator-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "gdbsupport/common-defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/filtered-iterator.h" diff --git a/gdb/unittests/format_pieces-selftests.c b/gdb/unittests/format_pieces-selftests.c index b4918c6..a01f248 100644 --- a/gdb/unittests/format_pieces-selftests.c +++ b/gdb/unittests/format_pieces-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/format.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/frame_info_ptr-selftests.c b/gdb/unittests/frame_info_ptr-selftests.c index f09d1c8..ec83024 100644 --- a/gdb/unittests/frame_info_ptr-selftests.c +++ b/gdb/unittests/frame_info_ptr-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "frame.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/function-view-selftests.c b/gdb/unittests/function-view-selftests.c index b01c02c..dc1a630 100644 --- a/gdb/unittests/function-view-selftests.c +++ b/gdb/unittests/function-view-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/function-view.h" diff --git a/gdb/unittests/gdb_tilde_expand-selftests.c b/gdb/unittests/gdb_tilde_expand-selftests.c index 5edf4b6..165885f 100644 --- a/gdb/unittests/gdb_tilde_expand-selftests.c +++ b/gdb/unittests/gdb_tilde_expand-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "gdbsupport/common-defs.h" #include "gdbsupport/selftest.h" #include diff --git a/gdb/unittests/gmp-utils-selftests.c b/gdb/unittests/gmp-utils-selftests.c index 513ebc8..3c6b710 100644 --- a/gdb/unittests/gmp-utils-selftests.c +++ b/gdb/unittests/gmp-utils-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gmp-utils.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/intrusive_list-selftests.c b/gdb/unittests/intrusive_list-selftests.c index 61e1343..28d0134 100644 --- a/gdb/unittests/intrusive_list-selftests.c +++ b/gdb/unittests/intrusive_list-selftests.c @@ -16,7 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/intrusive_list.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/lookup_name_info-selftests.c b/gdb/unittests/lookup_name_info-selftests.c index 2fd8be9..fe87bed 100644 --- a/gdb/unittests/lookup_name_info-selftests.c +++ b/gdb/unittests/lookup_name_info-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "symtab.h" diff --git a/gdb/unittests/main-thread-selftests.c b/gdb/unittests/main-thread-selftests.c index 9fd1b99..1ba3505 100644 --- a/gdb/unittests/main-thread-selftests.c +++ b/gdb/unittests/main-thread-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/block-signals.h" #include "gdbsupport/scope-exit.h" diff --git a/gdb/unittests/memory-map-selftests.c b/gdb/unittests/memory-map-selftests.c index cc059bb..55d66fd 100644 --- a/gdb/unittests/memory-map-selftests.c +++ b/gdb/unittests/memory-map-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "memory-map.h" diff --git a/gdb/unittests/memrange-selftests.c b/gdb/unittests/memrange-selftests.c index d6a1051..df02b6a 100644 --- a/gdb/unittests/memrange-selftests.c +++ b/gdb/unittests/memrange-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "memrange.h" diff --git a/gdb/unittests/mkdir-recursive-selftests.c b/gdb/unittests/mkdir-recursive-selftests.c index 1aaf685..a96874d 100644 --- a/gdb/unittests/mkdir-recursive-selftests.c +++ b/gdb/unittests/mkdir-recursive-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/filestuff.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/observable-selftests.c b/gdb/unittests/observable-selftests.c index bc2e001..2640f68 100644 --- a/gdb/unittests/observable-selftests.c +++ b/gdb/unittests/observable-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/observable.h" diff --git a/gdb/unittests/offset-type-selftests.c b/gdb/unittests/offset-type-selftests.c index e5a24ab..95cc4f8 100644 --- a/gdb/unittests/offset-type-selftests.c +++ b/gdb/unittests/offset-type-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/offset-type.h" #include "gdbsupport/underlying.h" diff --git a/gdb/unittests/packed-selftests.c b/gdb/unittests/packed-selftests.c index 852a7d3..060c87c 100644 --- a/gdb/unittests/packed-selftests.c +++ b/gdb/unittests/packed-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/packed.h" diff --git a/gdb/unittests/parallel-for-selftests.c b/gdb/unittests/parallel-for-selftests.c index a9abbf0..0261948 100644 --- a/gdb/unittests/parallel-for-selftests.c +++ b/gdb/unittests/parallel-for-selftests.c @@ -24,7 +24,6 @@ FOR_EACH. The FOR_EACH-defined part reads like a regular function. */ #ifndef FOR_EACH -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/parallel-for.h" diff --git a/gdb/unittests/parse-connection-spec-selftests.c b/gdb/unittests/parse-connection-spec-selftests.c index 83c006b..55a7c13 100644 --- a/gdb/unittests/parse-connection-spec-selftests.c +++ b/gdb/unittests/parse-connection-spec-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/netstuff.h" #include "diagnostics.h" diff --git a/gdb/unittests/path-join-selftests.c b/gdb/unittests/path-join-selftests.c index 15df048..08fad63 100644 --- a/gdb/unittests/path-join-selftests.c +++ b/gdb/unittests/path-join-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/pathstuff.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/ptid-selftests.c b/gdb/unittests/ptid-selftests.c index a44ffa3..6fc04c1 100644 --- a/gdb/unittests/ptid-selftests.c +++ b/gdb/unittests/ptid-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/ptid.h" #include diff --git a/gdb/unittests/rsp-low-selftests.c b/gdb/unittests/rsp-low-selftests.c index 90141ab..7a17871 100644 --- a/gdb/unittests/rsp-low-selftests.c +++ b/gdb/unittests/rsp-low-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/rsp-low.h" diff --git a/gdb/unittests/scoped_fd-selftests.c b/gdb/unittests/scoped_fd-selftests.c index e85f9f7..1413c50 100644 --- a/gdb/unittests/scoped_fd-selftests.c +++ b/gdb/unittests/scoped_fd-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/filestuff.h" #include "gdbsupport/scoped_fd.h" diff --git a/gdb/unittests/scoped_ignore_signal-selftests.c b/gdb/unittests/scoped_ignore_signal-selftests.c index dc1d934..361928c 100644 --- a/gdb/unittests/scoped_ignore_signal-selftests.c +++ b/gdb/unittests/scoped_ignore_signal-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/scoped_ignore_signal.h" #include "gdbsupport/selftest.h" #include "gdbsupport/scope-exit.h" diff --git a/gdb/unittests/scoped_mmap-selftests.c b/gdb/unittests/scoped_mmap-selftests.c index dbf836f..7b3a6f5 100644 --- a/gdb/unittests/scoped_mmap-selftests.c +++ b/gdb/unittests/scoped_mmap-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/filestuff.h" #include "gdbsupport/scoped_mmap.h" diff --git a/gdb/unittests/scoped_restore-selftests.c b/gdb/unittests/scoped_restore-selftests.c index 074cc4c..1fd5118 100644 --- a/gdb/unittests/scoped_restore-selftests.c +++ b/gdb/unittests/scoped_restore-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/scoped_restore.h" diff --git a/gdb/unittests/search-memory-selftests.c b/gdb/unittests/search-memory-selftests.c index 109ce8b..1124633 100644 --- a/gdb/unittests/search-memory-selftests.c +++ b/gdb/unittests/search-memory-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "gdbsupport/common-defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/search.h" diff --git a/gdb/unittests/style-selftests.c b/gdb/unittests/style-selftests.c index 8a6cf2b..4dc3c84 100644 --- a/gdb/unittests/style-selftests.c +++ b/gdb/unittests/style-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "ui-style.h" diff --git a/gdb/unittests/tracepoint-selftests.c b/gdb/unittests/tracepoint-selftests.c index 7267b70..0270028 100644 --- a/gdb/unittests/tracepoint-selftests.c +++ b/gdb/unittests/tracepoint-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "tracepoint.h" diff --git a/gdb/unittests/tui-selftests.c b/gdb/unittests/tui-selftests.c index e936b20..6847207 100644 --- a/gdb/unittests/tui-selftests.c +++ b/gdb/unittests/tui-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #ifdef TUI diff --git a/gdb/unittests/ui-file-selftests.c b/gdb/unittests/ui-file-selftests.c index eff1be7..7c55b80 100644 --- a/gdb/unittests/ui-file-selftests.c +++ b/gdb/unittests/ui-file-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "ui-file.h" diff --git a/gdb/unittests/unique_xmalloc_ptr_char.c b/gdb/unittests/unique_xmalloc_ptr_char.c index e36d871..b7fd5b6 100644 --- a/gdb/unittests/unique_xmalloc_ptr_char.c +++ b/gdb/unittests/unique_xmalloc_ptr_char.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "selftest-arch.h" #include "gdbsupport/gdb_unique_ptr.h" diff --git a/gdb/unittests/unpack-selftests.c b/gdb/unittests/unpack-selftests.c index 2fc7892..35f4eee 100644 --- a/gdb/unittests/unpack-selftests.c +++ b/gdb/unittests/unpack-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/selftest.h" #include "selftest-arch.h" #include "value.h" diff --git a/gdb/unittests/utils-selftests.c b/gdb/unittests/utils-selftests.c index 2f6d104..6748dc2 100644 --- a/gdb/unittests/utils-selftests.c +++ b/gdb/unittests/utils-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "utils.h" #include "gdbsupport/selftest.h" diff --git a/gdb/unittests/vec-utils-selftests.c b/gdb/unittests/vec-utils-selftests.c index e7ff128..da3bcf0 100644 --- a/gdb/unittests/vec-utils-selftests.c +++ b/gdb/unittests/vec-utils-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "gdbsupport/common-defs.h" #include "gdbsupport/selftest.h" #include "gdbsupport/gdb_vecs.h" diff --git a/gdb/unittests/xml-utils-selftests.c b/gdb/unittests/xml-utils-selftests.c index 31f7474..627d5d8 100644 --- a/gdb/unittests/xml-utils-selftests.c +++ b/gdb/unittests/xml-utils-selftests.c @@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "defs.h" #include "gdbsupport/xml-utils.h" #include "gdbsupport/selftest.h" -- cgit v1.1