public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/2] Remove most includes of psymtab.h
Date: Tue, 01 Aug 2023 10:20:52 -0600	[thread overview]
Message-ID: <20230801-psym-incl-fixup-v1-1-53284d513561@adacore.com> (raw)
In-Reply-To: <20230801-psym-incl-fixup-v1-0-53284d513561@adacore.com>

I found that most spots including psymtab.h do not need it.  This
patch removes these includes, and also one unnecessary include of
psympriv.h.
---
 gdb/coffread.c       | 1 -
 gdb/elfread.c        | 1 -
 gdb/mi/mi-cmd-file.c | 1 -
 gdb/mipsread.c       | 2 --
 gdb/objfiles.c       | 1 -
 gdb/objfiles.h       | 1 -
 gdb/rust-lang.c      | 1 -
 gdb/stabsread.h      | 2 ++
 8 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/gdb/coffread.c b/gdb/coffread.c
index 6ec341c61c2..8dd11e02ed2 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -40,7 +40,6 @@
 
 #include "coff-pe-read.h"
 
-#include "psymtab.h"
 #include "build-id.h"
 
 /* The objfile we are currently reading.  */
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 349a8b75bcc..862beb9e6c0 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -30,7 +30,6 @@
 #include "objfiles.h"
 #include "stabsread.h"
 #include "demangle.h"
-#include "psympriv.h"
 #include "filenames.h"
 #include "probe.h"
 #include "arch-utils.h"
diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c
index 0883cb6f978..688bf493f19 100644
--- a/gdb/mi/mi-cmd-file.c
+++ b/gdb/mi/mi-cmd-file.c
@@ -25,7 +25,6 @@
 #include "symtab.h"
 #include "source.h"
 #include "objfiles.h"
-#include "psymtab.h"
 #include "solib.h"
 #include "solist.h"
 #include "gdbsupport/gdb_regex.h"
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index efff2841974..447684154af 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -39,8 +39,6 @@
 #include "elf/internal.h"
 #include "elf/mips.h"
 
-#include "psymtab.h"
-
 static void
 read_alphacoff_dynamic_symtab (minimal_symbol_reader &,
 			       struct objfile *objfile);
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 5ba5f0a616d..222fa89ca97 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -47,7 +47,6 @@
 #include "exec.h"
 #include "observable.h"
 #include "complaints.h"
-#include "psymtab.h"
 #include "solist.h"
 #include "gdb_bfd.h"
 #include "btrace.h"
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 189856f0a51..91dda1c9f4c 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -27,7 +27,6 @@
 #include "progspace.h"
 #include "registry.h"
 #include "gdb_bfd.h"
-#include "psymtab.h"
 #include <atomic>
 #include <bitset>
 #include <vector>
diff --git a/gdb/rust-lang.c b/gdb/rust-lang.c
index a060720fd76..5eb33d0d3b7 100644
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -29,7 +29,6 @@
 #include "gdbarch.h"
 #include "infcall.h"
 #include "objfiles.h"
-#include "psymtab.h"
 #include "rust-lang.h"
 #include "typeprint.h"
 #include "valprint.h"
diff --git a/gdb/stabsread.h b/gdb/stabsread.h
index 27ba176f63f..18a0c59332e 100644
--- a/gdb/stabsread.h
+++ b/gdb/stabsread.h
@@ -168,6 +168,8 @@ extern void end_stabs (void);
 
 extern void finish_global_stabs (struct objfile *objfile);
 \f
+class psymtab_storage;
+
 /* Functions exported by dbxread.c.  These are not in stabsread.c because
    they are only used by some stabs readers.  */
 

-- 
2.40.1


  reply	other threads:[~2023-08-01 16:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01 16:20 [PATCH 0/2] Remove psympriv.h and simplify includes Tom Tromey
2023-08-01 16:20 ` Tom Tromey [this message]
2023-08-01 16:20 ` [PATCH 2/2] Merge psympriv.h into psymtab.h Tom Tromey
2023-08-18 16:07 ` [PATCH 0/2] Remove psympriv.h and simplify includes Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230801-psym-incl-fixup-v1-1-53284d513561@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).