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
This commit is contained in:
Simon Marchi
2024-04-29 11:07:22 -04:00
committed by Simon Marchi
parent 6f69575237
commit 05d9d66d92
45 changed files with 45 additions and 6 deletions

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View File

@@ -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. */

View 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"

View 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.

View File

@@ -21,6 +21,7 @@
#include "dis-asm.h"
#include "disasm-flags.h"
#include "ui-out.h"
struct gdbarch;
struct ui_out;

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View 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"

View File

@@ -26,6 +26,7 @@
#include "command.h"
#include "cli/cli-cmds.h"
#include "linespec.h"
#include "ui-out.h"
/* The `macro' prefix command. */

View 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"

View 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"

View 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 {

View File

@@ -20,6 +20,7 @@
#include "mi-interp.h"
#include "exceptions.h"
#include "interps.h"
#include "event-top.h"
#include "gdbsupport/event-loop.h"

View File

@@ -20,6 +20,7 @@
#ifndef MI_MI_OUT_H
#define MI_MI_OUT_H
#include "ui-out.h"
#include <vector>
struct ui_out;

View 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"

View 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"

View 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);

View File

@@ -21,6 +21,7 @@
#include <ctype.h>
#include <fcntl.h>
#include "exceptions.h"
#include "inferior.h"
#include "infrun.h"
#include "bfd.h"

View 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"

View File

@@ -19,6 +19,7 @@
#include <fcntl.h>
#include "exceptions.h"
#include "extract-store-integer.h"
#include "symtab.h"
#include "bfd.h"

View 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"

View File

@@ -41,6 +41,7 @@
entry point. */
#include "exceptions.h"
#include "symtab.h"
#include "gdbcore.h"
#include "objfiles.h"

View 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"

View 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 "cli/cli-cmds.h"
#include "cli/cli-script.h"
#include "cli/cli-setshow.h"

View 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"

View 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"

View 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"

View File

@@ -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;

View 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"

View File

@@ -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;

View File

@@ -21,6 +21,7 @@
/* Originally by Steve Chamberlain, sac@cygnus.com */
#include "exceptions.h"
#include "frame.h"
#include "inferior.h"
#include "infrun.h"