]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: remove unused includes in utils.h
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 29 Apr 2024 15:07:22 +0000 (11:07 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 30 May 2024 19:34:19 +0000 (15:34 -0400)
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

45 files changed:
gdb/aarch64-linux-tdep.c
gdb/ada-lang.c
gdb/break-catch-throw.c
gdb/breakpoint.c
gdb/cli/cli-cmds.c
gdb/cli/cli-interp.c
gdb/complaints.h
gdb/corelow.c
gdb/darwin-nat.c
gdb/disasm.h
gdb/dwarf2/cooked-index.c
gdb/dwarf2/frame-tailcall.c
gdb/dwarf2/index-write.c
gdb/dwarf2/loc.c
gdb/elf-none-tdep.c
gdb/event-top.c
gdb/fbsd-tdep.c
gdb/inf-loop.c
gdb/infcmd.c
gdb/infrun.c
gdb/linux-tdep.c
gdb/linux-thread-db.c
gdb/macrocmd.c
gdb/main.c
gdb/mi/mi-cmd-break.c
gdb/mi/mi-cmds.h
gdb/mi/mi-interp.c
gdb/mi/mi-out.h
gdb/objc-lang.c
gdb/record-full.c
gdb/record-full.h
gdb/remote.c
gdb/solib-svr4.c
gdb/solib.c
gdb/stack.c
gdb/symfile-mem.c
gdb/symmisc.c
gdb/top.c
gdb/tui/tui-io.c
gdb/tui/tui-win.c
gdb/tui/tui.c
gdb/ui.h
gdb/unittests/ui-file-selftests.c
gdb/utils.h
gdb/windows-nat.c

index ad55cf2caa3bf79b60ae235c31221e200f6cc853..a1296a8f0c7e4deaad93e3c26516d0640adce01c 100644 (file)
@@ -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"
index 0b430428fb473687fa2750ae3483fef435d4bd14..01978e083808923a7db2bb5a58908a3031c845f0 100644 (file)
@@ -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"
index 9a35ede1df67d58fdc99dc66f74f5a70478c4d09..b7e29a79dd8b13aed3206a6f48aa40de9d3c3e02 100644 (file)
@@ -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"
index fff9508f2d81d51c60fa7eb24a9f52f2e3310e53..a973518ac5f03b3e14eab8da3709317ecc9d4259 100644 (file)
@@ -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"
index 5d49e395a84aa89ebf21de602fc4a00984d88a89..3af794cebaf2b7e781662180078b26d9dd94d535 100644 (file)
@@ -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"
index a488c304fea33014d4c03418923492fc752b39f0..fa5d70e1e89a7ddd6a362351ae507a779524fcb8 100644 (file)
@@ -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"
index 995c35e0ab07f3d9d735502d7c266fbd0996aefc..d672e0c365dd0638b11d9dde4ca71ec61c473dc2 100644 (file)
    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.  */
index 462a05591c1da85d5d7387bff696df3610b4f14c..49da9be07ef99136e503aea01aaaa449666d366f 100644 (file)
@@ -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"
index c70cd44bb7fb5a131b4b84256dc5efdfc2d1c421..2b68cf6a549f070928be57872e0a17ca76fe1756 100644 (file)
@@ -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.
index 9282632b270f45c41fa0efd6a3ae255932dfda40..9d5450ce8b341003252526f29074e366d1497a66 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "dis-asm.h"
 #include "disasm-flags.h"
+#include "ui-out.h"
 
 struct gdbarch;
 struct ui_out;
index 767f119e04fdcce7d98f1fe64341a3ec34e8ad14..c9e46af32aed1267c8b4506ea3f0953b5a60c0f7 100644 (file)
@@ -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"
index bcbe41f7933cc14e50dc3df7af488744fe8ae443..c48906822742fc25ccd7254b4ebc94f714c244c2 100644 (file)
@@ -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"
index aeb688b13ee5b7da2c0f556b2086bb2476887511..2a50e3b6c2de08b33d2b2e79721680379cd6e851 100644 (file)
@@ -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"
index 9db5fc1492d1a3bbfd8346b101a996a601986aee..5fea6683575d46a1b02bdfe1069329146cdf0a65 100644 (file)
@@ -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"
index 00d46992b24842d4156504f9e07e6772a33cbcb0..1e43dc2410369fbb426b6c93ac6a24670add29db 100644 (file)
@@ -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"
index 0425bcf9f994359680a32903c1d772b7dec8d379..b81970d11bb11c909de98b43b1bf5654db90bc2f 100644 (file)
@@ -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"
index a80f604fa78077ca029c4e15fa13071ff1f9199e..77f46ced5917d47a2dcb04e8cf1471feb2a0af4d 100644 (file)
@@ -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"
index 41e766095f0597c87ac5a6460e976edf12060ef0..ec0c059729e86b8a8bd381533a4c5afd1b4ee569 100644 (file)
@@ -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"
index 02f6f0b3683fe83ff506e57fb2d84cc1cbef6dcf..69db665da75f26e76b878929d0faa818e8966425 100644 (file)
@@ -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"
index 2b6c1207391b83d12b238e69096336519696d0ea..1f32a63ad541f6e393e8d655bdfab97feecd41c4 100644 (file)
@@ -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"
index 8e6ac87f5a1d787b7e52a7179652372e83a57eec..fe880b3fb6f49ca61ac2f2bf80e6106aa08ce2ea 100644 (file)
@@ -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"
index 81a9c0d22a7e6a725235103b45754d60e7ca80ed..018bd689faac2809e1f87c54cec53786161d8c71 100644 (file)
@@ -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"
index 19295faf21ecf61e18fb553179c90829d90e13a8..6cf3a0d8bf18558259407cfebff7a317818bb10f 100644 (file)
@@ -26,6 +26,7 @@
 #include "command.h"
 #include "cli/cli-cmds.h"
 #include "linespec.h"
+#include "ui-out.h"
 
 \f
 /* The `macro' prefix command.  */
index 571ade45fb147bdc297aee2a433151026f80b9e4..4dd68f3d97653fd263c1bbca284b0d9cf46990e5 100644 (file)
@@ -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"
index 343a167e3d87b101a5da7924a51746ebc0cf0689..5c78acd64932c110d318fe31ce3f213925a93315 100644 (file)
@@ -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"
index 26faded3032ed7df685ff2c574d9260d579dc8c7..f2c6b1e9402681f149d98d9e46f5638aea23115c 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "gdbsupport/function-view.h"
 #include <optional>
+#include "gdbsupport/scoped_restore.h"
 #include "mi/mi-main.h"
 
 enum print_values {
index 168e6ed10b4e64b211b3550dd2bf9357c14f6095..ff4a0ff320261d47c54b437367886e046f5c60ff 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "mi-interp.h"
 
+#include "exceptions.h"
 #include "interps.h"
 #include "event-top.h"
 #include "gdbsupport/event-loop.h"
index a7afb156ed46074993f04c3af510d94d365e1865..a21a34fb8c7f5d4505018d9cf69979be2b83355d 100644 (file)
@@ -20,6 +20,7 @@
 #ifndef MI_MI_OUT_H
 #define MI_MI_OUT_H
 
+#include "ui-out.h"
 #include <vector>
 
 struct ui_out;
index 61b444d4e17560bacf063b34719837bfaf6c19a7..3655445833af57b6d73581c7b684fe2f75c1fbe4 100644 (file)
@@ -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"
index c51aadfef3355a2df0f20c0320c7be22c5e3e097..eb62d186fa5eadec2e009e808407c40e6e28cc9c 100644 (file)
@@ -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"
index ef45b1c0d59b1792ec5a61f59b7689157169895c..e8eb041311bf1abe869979f1540683fed0bb5566 100644 (file)
@@ -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);
index 965427c96a0d496b560de13f4a682fae0a508e2f..d4886c9650ea43818f14f791352b0916ad19d29e 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <ctype.h>
 #include <fcntl.h>
+#include "exceptions.h"
 #include "inferior.h"
 #include "infrun.h"
 #include "bfd.h"
index 1d4a50568d7ba81aa453b476f918be10d924dbbb..5c8557e9377a3e9d5ca19e8ef455159b3bc53b52 100644 (file)
@@ -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"
index db2ff5ce9a37fd3a641e63880e0e27d72a0fb85a..881f0d965027e18c7cbf7baf4ea0faac4096d6a8 100644 (file)
@@ -19,6 +19,7 @@
 
 
 #include <fcntl.h>
+#include "exceptions.h"
 #include "extract-store-integer.h"
 #include "symtab.h"
 #include "bfd.h"
index c2323e1726d99939ed88d84ec975d4efac94aeea..b36193be2f39ebc5f0091d34aff81f45b46bacbd 100644 (file)
@@ -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"
index ec50ec4e33c6367d58d63bf66ba34dca027d3a18..42569f4fa6d1bf06fd0dd81f763985d4fc2a72be 100644 (file)
@@ -41,6 +41,7 @@
    entry point.  */
 
 
+#include "exceptions.h"
 #include "symtab.h"
 #include "gdbcore.h"
 #include "objfiles.h"
index f5f4865cb621b9b08c42c0462501343c6c02ef4b..2956ad92fcef22b7bdd3d188ed4a6b86d95a93c3 100644 (file)
@@ -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"
index 4da24343a0f8fed729a3dc086e5263071cf2bd39..6239c190627c5bcc279ceda86edcf44a8a79d794 100644 (file)
--- 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"
index 285c781c25d004afe39aabe26cf93fad6164dd69..09fba029496659da501b6945d0d35f33005f710c 100644 (file)
@@ -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"
index 85b62321ca9f4e2a6c162a49ff225ab5cb5c2db0..45cc22a647480254cc83411eb5650a955b5e0bf6 100644 (file)
@@ -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"
index cb21d68e9b62cccdb1af3f8cdbd2f0599cd00b51..63b01ba55c849ccc49800c05c8366fa67e6b5882 100644 (file)
@@ -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"
index 95cf273473ad1576861b1c32598549ffaea9fdca..869714c607409a291a5cc050806b19c69e7ab48d 100644 (file)
--- 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;
 
index 7c55b80cdfedf184754336b28b45ce16a7923c97..589254f285cebe3d6bf0979e453e8648472a9903 100644 (file)
@@ -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"
 
index 66eec9621fd8018989e8bd3e01fc8abeb9028d7e..90c8012e73b59c0634cb48ca22254ccb3fbeb1fc 100644 (file)
 #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;
index e4feea15d1fa98dd31684a2c4d1d0f6f4a20d58c..37c1f46be35cace6a2ff11616ba38d48da2f68e4 100644 (file)
@@ -21,6 +21,7 @@
 
 /* Originally by Steve Chamberlain, sac@cygnus.com */
 
+#include "exceptions.h"
 #include "frame.h"
 #include "inferior.h"
 #include "infrun.h"