aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-04-29 11:07:22 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2024-05-30 22:43:52 -0400
commit05d9d66d92886053d56d1c5fb9fcfcb20f6a6de0 (patch)
tree6b9abcf3bf3ec97d5f8760173523ede46c9e3b40 /gdb
parent6f69575237fd63559fc284bb2b9ce4bf5d12bf16 (diff)
downloadgdb-05d9d66d92886053d56d1c5fb9fcfcb20f6a6de0.zip
gdb-05d9d66d92886053d56d1c5fb9fcfcb20f6a6de0.tar.gz
gdb-05d9d66d92886053d56d1c5fb9fcfcb20f6a6de0.tar.bz2
gdb: remove unused includes in utils.h
Remove some includes reported as unused by clangd. Add some includes in other files that were previously relying on the transitive include. Change-Id: Ibdd0a998b04d21362a20d0ca8e5267e21e2e133e
Diffstat (limited to 'gdb')
-rw-r--r--gdb/aarch64-linux-tdep.c1
-rw-r--r--gdb/ada-lang.c1
-rw-r--r--gdb/break-catch-throw.c2
-rw-r--r--gdb/breakpoint.c1
-rw-r--r--gdb/cli/cli-cmds.c1
-rw-r--r--gdb/cli/cli-interp.c1
-rw-r--r--gdb/complaints.h2
-rw-r--r--gdb/corelow.c1
-rw-r--r--gdb/darwin-nat.c1
-rw-r--r--gdb/disasm.h1
-rw-r--r--gdb/dwarf2/cooked-index.c1
-rw-r--r--gdb/dwarf2/frame-tailcall.c1
-rw-r--r--gdb/dwarf2/index-write.c1
-rw-r--r--gdb/dwarf2/loc.c1
-rw-r--r--gdb/elf-none-tdep.c1
-rw-r--r--gdb/event-top.c1
-rw-r--r--gdb/fbsd-tdep.c1
-rw-r--r--gdb/inf-loop.c1
-rw-r--r--gdb/infcmd.c1
-rw-r--r--gdb/infrun.c1
-rw-r--r--gdb/linux-tdep.c1
-rw-r--r--gdb/linux-thread-db.c1
-rw-r--r--gdb/macrocmd.c1
-rw-r--r--gdb/main.c1
-rw-r--r--gdb/mi/mi-cmd-break.c1
-rw-r--r--gdb/mi/mi-cmds.h1
-rw-r--r--gdb/mi/mi-interp.c1
-rw-r--r--gdb/mi/mi-out.h1
-rw-r--r--gdb/objc-lang.c1
-rw-r--r--gdb/record-full.c1
-rw-r--r--gdb/record-full.h2
-rw-r--r--gdb/remote.c1
-rw-r--r--gdb/solib-svr4.c1
-rw-r--r--gdb/solib.c1
-rw-r--r--gdb/stack.c1
-rw-r--r--gdb/symfile-mem.c1
-rw-r--r--gdb/symmisc.c1
-rw-r--r--gdb/top.c1
-rw-r--r--gdb/tui/tui-io.c1
-rw-r--r--gdb/tui/tui-win.c1
-rw-r--r--gdb/tui/tui.c1
-rw-r--r--gdb/ui.h1
-rw-r--r--gdb/unittests/ui-file-selftests.c1
-rw-r--r--gdb/utils.h4
-rw-r--r--gdb/windows-nat.c1
45 files changed, 45 insertions, 6 deletions
diff --git a/gdb/aarch64-linux-tdep.c b/gdb/aarch64-linux-tdep.c
index ad55cf2..a1296a8 100644
--- a/gdb/aarch64-linux-tdep.c
+++ b/gdb/aarch64-linux-tdep.c
@@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "extract-store-integer.h"
#include "gdbarch.h"
#include "glibc-tdep.h"
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 0b43042..01978e0 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -20,6 +20,7 @@
#include <ctype.h>
#include "event-top.h"
+#include "exceptions.h"
#include "extract-store-integer.h"
#include "gdbsupport/gdb_regex.h"
#include "frame.h"
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 9a35ede..b7e29a7 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -20,7 +20,7 @@
#include "arch-utils.h"
#include <ctype.h>
#include "breakpoint.h"
-#include "cli/cli-cmds.h"
+#include "exceptions.h"
#include "inferior.h"
#include "annotate.h"
#include "valprint.h"
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index fff9508..a973518 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -20,6 +20,7 @@
#include "arch-utils.h"
#include <ctype.h>
#include "event-top.h"
+#include "exceptions.h"
#include "hashtab.h"
#include "symtab.h"
#include "frame.h"
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 5d49e39..3af794c 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "exceptions.h"
#include "readline/tilde.h"
#include "completer.h"
#include "target.h"
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index a488c30..fa5d70e 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "cli-interp.h"
+#include "exceptions.h"
#include "interps.h"
#include "event-top.h"
#include "ui-out.h"
diff --git a/gdb/complaints.h b/gdb/complaints.h
index 995c35e..d672e0c 100644
--- a/gdb/complaints.h
+++ b/gdb/complaints.h
@@ -17,10 +17,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-
#if !defined (COMPLAINTS_H)
#define COMPLAINTS_H
+#include "gdbsupport/scoped_restore.h"
#include <unordered_set>
/* Helper for complaint. */
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 462a055..49da9be 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -20,6 +20,7 @@
#include "arch-utils.h"
#include <signal.h>
#include <fcntl.h>
+#include "exceptions.h"
#include "frame.h"
#include "inferior.h"
#include "infrun.h"
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index c70cd44..2b68cf6 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -68,6 +68,7 @@
#include "gdbsupport/gdb_unlinker.h"
#include "gdbsupport/pathstuff.h"
#include "gdbsupport/scoped_fd.h"
+#include "gdbsupport/scoped_restore.h"
#include "nat/fork-inferior.h"
/* Quick overview.
diff --git a/gdb/disasm.h b/gdb/disasm.h
index 9282632..9d5450c 100644
--- a/gdb/disasm.h
+++ b/gdb/disasm.h
@@ -21,6 +21,7 @@
#include "dis-asm.h"
#include "disasm-flags.h"
+#include "ui-out.h"
struct gdbarch;
struct ui_out;
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 767f119..c9e46af 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -25,6 +25,7 @@
#include "c-lang.h"
#include "ada-lang.h"
#include "event-top.h"
+#include "exceptions.h"
#include "split-name.h"
#include "observable.h"
#include "run-on-main-thread.h"
diff --git a/gdb/dwarf2/frame-tailcall.c b/gdb/dwarf2/frame-tailcall.c
index bcbe41f..c489068 100644
--- a/gdb/dwarf2/frame-tailcall.c
+++ b/gdb/dwarf2/frame-tailcall.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "frame.h"
#include "dwarf2/frame-tailcall.h"
#include "dwarf2/loc.h"
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index aeb688b..2a50e3b 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -22,6 +22,7 @@
#include "addrmap.h"
#include "cli/cli-decode.h"
+#include "exceptions.h"
#include "gdbsupport/byte-vector.h"
#include "gdbsupport/filestuff.h"
#include "gdbsupport/gdb_unlinker.h"
diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c
index 9db5fc1..5fea668 100644
--- a/gdb/dwarf2/loc.c
+++ b/gdb/dwarf2/loc.c
@@ -20,6 +20,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "event-top.h"
+#include "exceptions.h"
#include "ui-out.h"
#include "value.h"
#include "frame.h"
diff --git a/gdb/elf-none-tdep.c b/gdb/elf-none-tdep.c
index 00d4699..1e43dc2 100644
--- a/gdb/elf-none-tdep.c
+++ b/gdb/elf-none-tdep.c
@@ -19,6 +19,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "elf-none-tdep.h"
+#include "exceptions.h"
#include "regset.h"
#include "elf-bfd.h"
#include "inferior.h"
diff --git a/gdb/event-top.c b/gdb/event-top.c
index 0425bcf..b81970d 100644
--- a/gdb/event-top.c
+++ b/gdb/event-top.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "gdbsupport/job-control.h"
#include "run-on-main-thread.h"
#include "top.h"
diff --git a/gdb/fbsd-tdep.c b/gdb/fbsd-tdep.c
index a80f604..77f46ce 100644
--- a/gdb/fbsd-tdep.c
+++ b/gdb/fbsd-tdep.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "auxv.h"
+#include "exceptions.h"
#include "extract-store-integer.h"
#include "gdbcore.h"
#include "inferior.h"
diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c
index 41e7660..ec0c059 100644
--- a/gdb/inf-loop.c
+++ b/gdb/inf-loop.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "inferior.h"
#include "infrun.h"
#include "gdbsupport/event-loop.h"
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 02f6f0b..69db665 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "exceptions.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "frame.h"
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 2b6c120..1f32a63 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -22,6 +22,7 @@
#include "displaced-stepping.h"
#include "infrun.h"
#include <ctype.h>
+#include "exceptions.h"
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 8e6ac87..fe880b3 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "gdbtypes.h"
#include "linux-tdep.h"
#include "auxv.h"
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 81a9c0d..018bd68 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <dlfcn.h>
+#include "exceptions.h"
#include "gdb_proc_service.h"
#include "nat/gdb_thread_db.h"
#include "gdbsupport/gdb_vecs.h"
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index 19295fa..6cf3a0d 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -26,6 +26,7 @@
#include "command.h"
#include "cli/cli-cmds.h"
#include "linespec.h"
+#include "ui-out.h"
/* The `macro' prefix command. */
diff --git a/gdb/main.c b/gdb/main.c
index 571ade4..4dd68f3 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "annotate.h"
+#include "exceptions.h"
#include "top.h"
#include "ui.h"
#include "target.h"
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 343a167..5c78acd 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "arch-utils.h"
+#include "exceptions.h"
#include "mi-cmds.h"
#include "ui-out.h"
#include "mi-out.h"
diff --git a/gdb/mi/mi-cmds.h b/gdb/mi/mi-cmds.h
index 26faded..f2c6b1e 100644
--- a/gdb/mi/mi-cmds.h
+++ b/gdb/mi/mi-cmds.h
@@ -24,6 +24,7 @@
#include "gdbsupport/function-view.h"
#include <optional>
+#include "gdbsupport/scoped_restore.h"
#include "mi/mi-main.h"
enum print_values {
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 168e6ed..ff4a0ff 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -20,6 +20,7 @@
#include "mi-interp.h"
+#include "exceptions.h"
#include "interps.h"
#include "event-top.h"
#include "gdbsupport/event-loop.h"
diff --git a/gdb/mi/mi-out.h b/gdb/mi/mi-out.h
index a7afb15..a21a34f 100644
--- a/gdb/mi/mi-out.h
+++ b/gdb/mi/mi-out.h
@@ -20,6 +20,7 @@
#ifndef MI_MI_OUT_H
#define MI_MI_OUT_H
+#include "ui-out.h"
#include <vector>
struct ui_out;
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 61b444d..3655445 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -21,6 +21,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "event-top.h"
+#include "exceptions.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "expression.h"
diff --git a/gdb/record-full.c b/gdb/record-full.c
index c51aadf..eb62d18 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "extract-store-integer.h"
#include "cli/cli-cmds.h"
#include "regcache.h"
diff --git a/gdb/record-full.h b/gdb/record-full.h
index ef45b1c..e8eb041 100644
--- a/gdb/record-full.h
+++ b/gdb/record-full.h
@@ -20,6 +20,8 @@
#ifndef RECORD_FULL_H
#define RECORD_FULL_H
+#include "gdbsupport/scoped_restore.h"
+
extern bool record_full_memory_query;
extern int record_full_arch_list_add_reg (struct regcache *regcache, int num);
diff --git a/gdb/remote.c b/gdb/remote.c
index 965427c..d4886c9 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -21,6 +21,7 @@
#include <ctype.h>
#include <fcntl.h>
+#include "exceptions.h"
#include "inferior.h"
#include "infrun.h"
#include "bfd.h"
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 1d4a505..5c8557e 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -22,6 +22,7 @@
#include "elf/common.h"
#include "elf/mips.h"
+#include "exceptions.h"
#include "extract-store-integer.h"
#include "symtab.h"
#include "bfd.h"
diff --git a/gdb/solib.c b/gdb/solib.c
index db2ff5c..881f0d9 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -19,6 +19,7 @@
#include <fcntl.h>
+#include "exceptions.h"
#include "extract-store-integer.h"
#include "symtab.h"
#include "bfd.h"
diff --git a/gdb/stack.c b/gdb/stack.c
index c2323e1..b36193b 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "event-top.h"
+#include "exceptions.h"
#include "extract-store-integer.h"
#include "top.h"
#include "value.h"
diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c
index ec50ec4..42569f4 100644
--- a/gdb/symfile-mem.c
+++ b/gdb/symfile-mem.c
@@ -41,6 +41,7 @@
entry point. */
+#include "exceptions.h"
#include "symtab.h"
#include "gdbcore.h"
#include "objfiles.h"
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index f5f4865..2956ad9 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "event-top.h"
+#include "exceptions.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "bfd.h"
diff --git a/gdb/top.c b/gdb/top.c
index 4da2434..6239c19 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "cli/cli-cmds.h"
#include "cli/cli-script.h"
#include "cli/cli-setshow.h"
diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c
index 285c781..09fba02 100644
--- a/gdb/tui/tui-io.c
+++ b/gdb/tui/tui-io.c
@@ -19,6 +19,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "exceptions.h"
#include "target.h"
#include "gdbsupport/event-loop.h"
#include "event-top.h"
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 85b6232..45cc22a 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -34,6 +34,7 @@
#include "source.h"
#include "gdbsupport/event-loop.h"
#include "async-event.h"
+#include "ui-out.h"
#include "utils.h"
#include "tui/tui.h"
diff --git a/gdb/tui/tui.c b/gdb/tui/tui.c
index cb21d68..63b01ba 100644
--- a/gdb/tui/tui.c
+++ b/gdb/tui/tui.c
@@ -21,6 +21,7 @@
#include "event-top.h"
#include "cli/cli-cmds.h"
+#include "exceptions.h"
#include "tui/tui.h"
#include "tui/tui-hooks.h"
#include "tui/tui-command.h"
diff --git a/gdb/ui.h b/gdb/ui.h
index 95cf273..869714c 100644
--- a/gdb/ui.h
+++ b/gdb/ui.h
@@ -21,6 +21,7 @@
#include "gdbsupport/event-loop.h"
#include "gdbsupport/intrusive_list.h"
#include "gdbsupport/next-iterator.h"
+#include "gdbsupport/scoped_restore.h"
struct interp;
diff --git a/gdb/unittests/ui-file-selftests.c b/gdb/unittests/ui-file-selftests.c
index 7c55b80..589254f 100644
--- a/gdb/unittests/ui-file-selftests.c
+++ b/gdb/unittests/ui-file-selftests.c
@@ -17,6 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+#include "gdbsupport/scoped_restore.h"
#include "gdbsupport/selftest.h"
#include "ui-file.h"
diff --git a/gdb/utils.h b/gdb/utils.h
index 66eec96..90c8012 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -19,10 +19,6 @@
#ifndef UTILS_H
#define UTILS_H
-#include "exceptions.h"
-#include "gdbsupport/array-view.h"
-#include "gdbsupport/function-view.h"
-#include "gdbsupport/scoped_restore.h"
#include <chrono>
struct completion_match_for_lcd;
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index e4feea1..37c1f46 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -21,6 +21,7 @@
/* Originally by Steve Chamberlain, sac@cygnus.com */
+#include "exceptions.h"
#include "frame.h"
#include "inferior.h"
#include "infrun.h"