[binutils-gdb] gdb: remove unused includes

Simon Marchi simark@sourceware.org
Mon Jul 21 19:37:45 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=05ef43a2e798ad81423c38b57f55a232685d744f

commit 05ef43a2e798ad81423c38b57f55a232685d744f
Author: Simon Marchi <simon.marchi@efficios.com>
Date:   Mon Jul 21 15:30:01 2025 -0400

    gdb: remove unused includes
    
    Remove a bunch of includes reported as unused by clangd.
    
    Change-Id: I3f05f98a298036fadf1acce4ddc198405ec056ee

Diff:
---
 gdb/arch/arc.c       | 1 -
 gdb/arch/loongarch.c | 1 -
 gdb/arch/riscv.c     | 1 -
 gdb/i386-tdep.c      | 2 --
 gdb/infrun.c         | 1 -
 gdb/linux-nat.c      | 4 ----
 6 files changed, 10 deletions(-)

diff --git a/gdb/arch/arc.c b/gdb/arch/arc.c
index efe7111af16..b7de1dab273 100644
--- a/gdb/arch/arc.c
+++ b/gdb/arch/arc.c
@@ -17,7 +17,6 @@
 
 
 #include "arc.h"
-#include <stdlib.h>
 #include <unordered_map>
 #include <string>
 
diff --git a/gdb/arch/loongarch.c b/gdb/arch/loongarch.c
index 07c6d4da681..25e698d9fce 100644
--- a/gdb/arch/loongarch.c
+++ b/gdb/arch/loongarch.c
@@ -16,7 +16,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "loongarch.h"
-#include <stdlib.h>
 #include <unordered_map>
 
 /* Target description features.  */
diff --git a/gdb/arch/riscv.c b/gdb/arch/riscv.c
index a6188ea3a8c..c698fa2b62e 100644
--- a/gdb/arch/riscv.c
+++ b/gdb/arch/riscv.c
@@ -16,7 +16,6 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "riscv.h"
-#include <stdlib.h>
 #include <unordered_map>
 
 #include "../features/riscv/32bit-cpu.c"
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b50a7c34ce6..f97c98e6a40 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -60,9 +60,7 @@
 
 #include "stap-probe.h"
 #include "user-regs.h"
-#include "cli/cli-utils.h"
 #include "expression.h"
-#include "parser-defs.h"
 #include <ctype.h>
 #include <algorithm>
 #include <unordered_set>
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 05bf6ab77bf..9d3e1b7782e 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -67,7 +67,6 @@
 #include "gdbsupport/scope-exit.h"
 #include "gdbsupport/forward-scope-exit.h"
 #include "gdbsupport/gdb_select.h"
-#include <unordered_map>
 #include "async-event.h"
 #include "gdbsupport/selftest.h"
 #include "scoped-mock-context.h"
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 70f77fd6a7f..f3179279d92 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -51,17 +51,13 @@
 #include <pwd.h>
 #include <sys/types.h>
 #include <dirent.h>
-#include "xml-support.h"
 #include <sys/vfs.h>
-#include "solib.h"
 #include "nat/linux-osdata.h"
 #include "linux-tdep.h"
-#include "symfile.h"
 #include "gdbsupport/agent.h"
 #include "tracepoint.h"
 #include "target-descriptions.h"
 #include "gdbsupport/filestuff.h"
-#include "objfiles.h"
 #include "nat/linux-namespaces.h"
 #include "gdbsupport/block-signals.h"
 #include "gdbsupport/fileio.h"


More information about the Gdb-cvs mailing list