[pushed] gdb, gdbserver, gdbsupport: remove some unused gdb_vecs.h includes

Message ID 20241206174940.494199-1-simark@simark.ca
State New
Headers
Series [pushed] gdb, gdbserver, gdbsupport: remove some unused gdb_vecs.h includes |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Simon Marchi Dec. 6, 2024, 5:49 p.m. UTC
  From: Simon Marchi <simon.marchi@polymtl.ca>

Remove some includes reported as unused by clangd.  Add some to files
that actually need it.

Change-Id: I01c61c174858c1ade5cb54fd7ee1f582b17c3363
---
 gdb/arch/arm-get-next-pcs.c | 1 -
 gdb/auto-load.c             | 1 +
 gdb/breakpoint.c            | 1 +
 gdb/charset.c               | 1 -
 gdb/command.h               | 1 -
 gdb/compile/compile-loc2c.c | 1 -
 gdb/completer.h             | 1 -
 gdb/cp-support.h            | 1 -
 gdb/dwarf2/dwz.c            | 1 +
 gdb/inline-frame.c          | 1 +
 gdb/namespace.h             | 1 -
 gdb/record-btrace.c         | 1 +
 gdb/record-full.c           | 1 +
 gdb/source.c                | 1 +
 gdb/symfile.c               | 1 +
 gdb/symtab.h                | 1 -
 gdb/tracepoint.h            | 1 -
 gdbserver/inferiors.h       | 1 -
 gdbserver/server.h          | 1 -
 gdbsupport/filestuff.cc     | 1 -
 20 files changed, 8 insertions(+), 12 deletions(-)


base-commit: 5e738d49145b8c262734c23cbbb840475118ffa6
  

Patch

diff --git a/gdb/arch/arm-get-next-pcs.c b/gdb/arch/arm-get-next-pcs.c
index 03115cf21387..6c1823672cda 100644
--- a/gdb/arch/arm-get-next-pcs.c
+++ b/gdb/arch/arm-get-next-pcs.c
@@ -17,7 +17,6 @@ 
    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/gdb_vecs.h"
 #include "gdbsupport/common-regcache.h"
 #include "arm.h"
 #include "arm-get-next-pcs.h"
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index e684d7fd896f..513c1df4b7bf 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -19,6 +19,7 @@ 
 
 #include <ctype.h>
 #include "auto-load.h"
+#include "gdbsupport/gdb_vecs.h"
 #include "progspace.h"
 #include "gdbsupport/gdb_regex.h"
 #include "ui-out.h"
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 0a889a04e81a..bfe4da996e1f 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -21,6 +21,7 @@ 
 #include <ctype.h>
 #include "event-top.h"
 #include "exceptions.h"
+#include "gdbsupport/gdb_vecs.h"
 #include "gdbsupport/unordered_set.h"
 #include "symtab.h"
 #include "frame.h"
diff --git a/gdb/charset.c b/gdb/charset.c
index 35e700a8caf7..f1f66bb29cba 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -24,7 +24,6 @@ 
 #include "charset-list.h"
 #include "gdbsupport/environ.h"
 #include "arch-utils.h"
-#include "gdbsupport/gdb_vecs.h"
 #include <ctype.h>
 
 #ifdef USE_WIN32API
diff --git a/gdb/command.h b/gdb/command.h
index 0ceaf3e2a6dc..675b48eeea8a 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -18,7 +18,6 @@ 
 #if !defined (COMMAND_H)
 #define COMMAND_H 1
 
-#include "gdbsupport/gdb_vecs.h"
 #include "gdbsupport/scoped_restore.h"
 
 struct completion_tracker;
diff --git a/gdb/compile/compile-loc2c.c b/gdb/compile/compile-loc2c.c
index fbcc3d6340b2..42370447052f 100644
--- a/gdb/compile/compile-loc2c.c
+++ b/gdb/compile/compile-loc2c.c
@@ -29,7 +29,6 @@ 
 #include "compile.h"
 #include "block.h"
 #include "dwarf2/frame.h"
-#include "gdbsupport/gdb_vecs.h"
 #include "value.h"
 #include "gdbarch.h"
 
diff --git a/gdb/completer.h b/gdb/completer.h
index 44eafc487f7c..ba0ef7ab312e 100644
--- a/gdb/completer.h
+++ b/gdb/completer.h
@@ -18,7 +18,6 @@ 
 #define COMPLETER_H 1
 
 #include "gdbsupport/gdb-hashtab.h"
-#include "gdbsupport/gdb_vecs.h"
 #include "command.h"
 
 /* Types of functions in struct match_list_displayer.  */
diff --git a/gdb/cp-support.h b/gdb/cp-support.h
index e266f3186211..942febffb4d1 100644
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -23,7 +23,6 @@ 
 #define CP_SUPPORT_H
 
 #include "symtab.h"
-#include "gdbsupport/gdb_vecs.h"
 #include "gdbsupport/gdb_obstack.h"
 #include "gdbsupport/array-view.h"
 #include <vector>
diff --git a/gdb/dwarf2/dwz.c b/gdb/dwarf2/dwz.c
index c7cdba240761..fb11ac6550bc 100644
--- a/gdb/dwarf2/dwz.c
+++ b/gdb/dwarf2/dwz.c
@@ -26,6 +26,7 @@ 
 #include "filenames.h"
 #include "gdb_bfd.h"
 #include "gdbcore.h"
+#include "gdbsupport/gdb_vecs.h"
 #include "gdbsupport/pathstuff.h"
 #include "gdbsupport/scoped_fd.h"
 #include "run-on-main-thread.h"
diff --git a/gdb/inline-frame.c b/gdb/inline-frame.c
index 759c526a7c20..bfb89164e757 100644
--- a/gdb/inline-frame.c
+++ b/gdb/inline-frame.c
@@ -22,6 +22,7 @@ 
 #include "addrmap.h"
 #include "block.h"
 #include "frame-unwind.h"
+#include "gdbsupport/gdb_vecs.h"
 #include "inferior.h"
 #include "gdbthread.h"
 #include "regcache.h"
diff --git a/gdb/namespace.h b/gdb/namespace.h
index 232dcc03bd80..849eb84854d1 100644
--- a/gdb/namespace.h
+++ b/gdb/namespace.h
@@ -19,7 +19,6 @@ 
 #ifndef NAMESPACE_H
 #define NAMESPACE_H
 
-#include "gdbsupport/gdb_vecs.h"
 #include "gdbsupport/gdb_obstack.h"
 
 /* This struct is designed to store data from using directives.  It
diff --git a/gdb/record-btrace.c b/gdb/record-btrace.c
index bf4a368f4fe9..4b4248fead7f 100644
--- a/gdb/record-btrace.c
+++ b/gdb/record-btrace.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 "gdbsupport/gdb_vecs.h"
 #include "record.h"
 #include "record-btrace.h"
 #include "gdbthread.h"
diff --git a/gdb/record-full.c b/gdb/record-full.c
index 7d7959ffe683..6d056514e8b1 100644
--- a/gdb/record-full.c
+++ b/gdb/record-full.c
@@ -20,6 +20,7 @@ 
 #include "exceptions.h"
 #include "extract-store-integer.h"
 #include "cli/cli-cmds.h"
+#include "gdbsupport/gdb_vecs.h"
 #include "regcache.h"
 #include "gdbthread.h"
 #include "inferior.h"
diff --git a/gdb/source.c b/gdb/source.c
index 69480ef8dd08..a225280e7946 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -17,6 +17,7 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "arch-utils.h"
+#include "gdbsupport/gdb_vecs.h"
 #include "symtab.h"
 #include "expression.h"
 #include "language.h"
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 28c0d46ab54c..fd21d2d2c238 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -22,6 +22,7 @@ 
 #include "arch-utils.h"
 #include "cli/cli-cmds.h"
 #include "extract-store-integer.h"
+#include "gdbsupport/gdb_vecs.h"
 #include "symtab.h"
 #include "gdbcore.h"
 #include "frame.h"
diff --git a/gdb/symtab.h b/gdb/symtab.h
index f285138378bc..ef4d450d08e0 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -25,7 +25,6 @@ 
 #include <string>
 #include <set>
 #include "dwarf2/call-site.h"
-#include "gdbsupport/gdb_vecs.h"
 #include "gdbtypes.h"
 #include "gdbsupport/gdb_obstack.h"
 #include "gdbsupport/gdb_regex.h"
diff --git a/gdb/tracepoint.h b/gdb/tracepoint.h
index 5e6ea67c8d20..8b3f971740ed 100644
--- a/gdb/tracepoint.h
+++ b/gdb/tracepoint.h
@@ -21,7 +21,6 @@ 
 
 #include "breakpoint.h"
 #include "memrange.h"
-#include "gdbsupport/gdb_vecs.h"
 
 #include <vector>
 #include <string>
diff --git a/gdbserver/inferiors.h b/gdbserver/inferiors.h
index 5867608ba466..2f3d42b83081 100644
--- a/gdbserver/inferiors.h
+++ b/gdbserver/inferiors.h
@@ -19,7 +19,6 @@ 
 #ifndef GDBSERVER_INFERIORS_H
 #define GDBSERVER_INFERIORS_H
 
-#include "gdbsupport/gdb_vecs.h"
 #include "gdbsupport/owning_intrusive_list.h"
 
 #include "dll.h"
diff --git a/gdbserver/server.h b/gdbserver/server.h
index eabedb95679c..e1297d41f840 100644
--- a/gdbserver/server.h
+++ b/gdbserver/server.h
@@ -95,7 +95,6 @@  extern int in_queued_stop_replies (ptid_t ptid);
 
 #include "utils.h"
 #include "debug.h"
-#include "gdbsupport/gdb_vecs.h"
 
 /* Maximum number of bytes to read/write at once.  The value here
    is chosen to fill up a packet (the headers account for the 32).  */
diff --git a/gdbsupport/filestuff.cc b/gdbsupport/filestuff.cc
index 5c427e11b02a..9e07af28dc2d 100644
--- a/gdbsupport/filestuff.cc
+++ b/gdbsupport/filestuff.cc
@@ -17,7 +17,6 @@ 
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "filestuff.h"
-#include "gdb_vecs.h"
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>