summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-11-17 12:13:47 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-11-18 11:30:40 -0500
commit76eb8ef1ce470ca71b10fae721e32d49998d87b9 (patch)
tree3e575c9d62e7196d0162bc606a7aecd11ac2cec8 /gdb
parent557b4d7650ffa3cd6dbfb8a56c830a1d45562d19 (diff)
downloadbinutils-gdb-76eb8ef1ce470ca71b10fae721e32d49998d87b9.tar.gz
gdb: include gdbarch.h in all files extending gdbarch_tdep
Commit 345bd07cce33 ("gdb: fix gdbarch_tdep ODR violation") made a bunch of files define a *_gdbarch_tdep class that inherits from a gdbarch_tdep base. But some of these files don't include gdbarch.h, where gdbarch_tdep is defined. This may cause build errors if gdbarch.h isn't already included by chance by some other header file. Avoid this by making them include gdbarch.h. Change-Id: If433d302007e274daa4f656cfc94f769cf1aa68a
Diffstat (limited to 'gdb')
-rw-r--r--gdb/avr-tdep.c1
-rw-r--r--gdb/bfin-tdep.h2
-rw-r--r--gdb/bpf-tdep.c1
-rw-r--r--gdb/cris-tdep.h2
-rw-r--r--gdb/csky-tdep.h2
-rw-r--r--gdb/frv-tdep.c1
-rw-r--r--gdb/ft32-tdep.h2
-rw-r--r--gdb/lm32-tdep.c1
-rw-r--r--gdb/m32c-tdep.c1
-rw-r--r--gdb/m68hc11-tdep.c1
-rw-r--r--gdb/m68k-tdep.h2
-rw-r--r--gdb/mep-tdep.c1
-rw-r--r--gdb/microblaze-tdep.h1
-rw-r--r--gdb/mips-tdep.h1
-rw-r--r--gdb/moxie-tdep.h2
-rw-r--r--gdb/msp430-tdep.c1
-rw-r--r--gdb/nds32-tdep.h2
-rw-r--r--gdb/or1k-tdep.c1
-rw-r--r--gdb/rl78-tdep.c1
-rw-r--r--gdb/rx-tdep.c1
-rw-r--r--gdb/s12z-tdep.c1
-rw-r--r--gdb/s390-tdep.h1
-rw-r--r--gdb/v850-tdep.c1
-rw-r--r--gdb/z80-tdep.c1
24 files changed, 31 insertions, 0 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index 0db19865f31..a97c4450acb 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -37,6 +37,7 @@
#include "dis-asm.h"
#include "objfiles.h"
#include <algorithm>
+#include "gdbarch.h"
/* AVR Background:
diff --git a/gdb/bfin-tdep.h b/gdb/bfin-tdep.h
index 70a18547e6b..13f5c1ba624 100644
--- a/gdb/bfin-tdep.h
+++ b/gdb/bfin-tdep.h
@@ -22,6 +22,8 @@
#ifndef BFIN_TDEP_H
#define BFIN_TDEP_H
+#include "gdbarch.h"
+
enum gdb_regnum {
/* Core Registers */
BFIN_R0_REGNUM = 0,
diff --git a/gdb/bpf-tdep.c b/gdb/bpf-tdep.c
index b2cd913d9e1..6f07dce0bb6 100644
--- a/gdb/bpf-tdep.c
+++ b/gdb/bpf-tdep.c
@@ -34,6 +34,7 @@
#include "osabi.h"
#include "target-descriptions.h"
#include "remote.h"
+#include "gdbarch.h"
/* eBPF registers. */
diff --git a/gdb/cris-tdep.h b/gdb/cris-tdep.h
index 9b622942839..57a3aedcaee 100644
--- a/gdb/cris-tdep.h
+++ b/gdb/cris-tdep.h
@@ -23,6 +23,8 @@
#ifndef CRIS_TDEP_H
#define CRIS_TDEP_H
+#include "gdbarch.h"
+
/* CRIS architecture specific information. */
struct cris_gdbarch_tdep : gdbarch_tdep
{
diff --git a/gdb/csky-tdep.h b/gdb/csky-tdep.h
index d690e8f5191..dfbeefc2f2b 100644
--- a/gdb/csky-tdep.h
+++ b/gdb/csky-tdep.h
@@ -20,6 +20,8 @@
#ifndef CSKY_TDEP_H
#define CSKY_TDEP_H
+#include "gdbarch.h"
+
/* How to interpret the contents of the link register. */
enum lr_type_t
{
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index c5eac6b61b5..09274d54a0e 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -38,6 +38,7 @@
#include "solib.h"
#include "frv-tdep.h"
#include "objfiles.h"
+#include "gdbarch.h"
struct frv_unwind_cache /* was struct frame_extra_info */
{
diff --git a/gdb/ft32-tdep.h b/gdb/ft32-tdep.h
index c32f646a4a0..8ec1c5c104e 100644
--- a/gdb/ft32-tdep.h
+++ b/gdb/ft32-tdep.h
@@ -20,6 +20,8 @@
#ifndef FT32_TDEP_H
#define FT32_TDEP_H
+#include "gdbarch.h"
+
struct ft32_gdbarch_tdep : gdbarch_tdep
{
/* Type for a pointer to a function. Used for the type of PC. */
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 3f91c050b47..6fa19c8a412 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -34,6 +34,7 @@
#include "reggroups.h"
#include "opcodes/lm32-desc.h"
#include <algorithm>
+#include "gdbarch.h"
/* Macros to extract fields from an instruction. */
#define LM32_OPCODE(insn) ((insn >> 26) & 0x3f)
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 200d51a16b1..2afe0798549 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -30,6 +30,7 @@
#include "reggroups.h"
#include "prologue-value.h"
#include "objfiles.h"
+#include "gdbarch.h"
/* The m32c tdep structure. */
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index 6d41fe85f95..146b6bbaefc 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -38,6 +38,7 @@
#include "arch-utils.h"
#include "regcache.h"
#include "reggroups.h"
+#include "gdbarch.h"
#include "target.h"
#include "opcode/m68hc11.h"
diff --git a/gdb/m68k-tdep.h b/gdb/m68k-tdep.h
index c88e7f26da5..66c467b6ae7 100644
--- a/gdb/m68k-tdep.h
+++ b/gdb/m68k-tdep.h
@@ -20,6 +20,8 @@
#ifndef M68K_TDEP_H
#define M68K_TDEP_H
+#include "gdbarch.h"
+
struct frame_info;
/* Register numbers of various important registers. */
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index 6d1f04a2ab2..645fac56c38 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -45,6 +45,7 @@
#include "prologue-value.h"
#include "cgen/bitset.h"
#include "infcall.h"
+#include "gdbarch.h"
/* Get the user's customized MeP coprocessor register names from
libopcodes. */
diff --git a/gdb/microblaze-tdep.h b/gdb/microblaze-tdep.h
index 3143e92ac74..732c611911d 100644
--- a/gdb/microblaze-tdep.h
+++ b/gdb/microblaze-tdep.h
@@ -20,6 +20,7 @@
#ifndef MICROBLAZE_TDEP_H
#define MICROBLAZE_TDEP_H 1
+#include "gdbarch.h"
/* Microblaze architecture-specific information. */
struct microblaze_gdbarch_tdep : gdbarch_tdep
diff --git a/gdb/mips-tdep.h b/gdb/mips-tdep.h
index b899cfd9bdb..cc42e74e85d 100644
--- a/gdb/mips-tdep.h
+++ b/gdb/mips-tdep.h
@@ -21,6 +21,7 @@
#define MIPS_TDEP_H
#include "objfiles.h"
+#include "gdbarch.h"
struct gdbarch;
diff --git a/gdb/moxie-tdep.h b/gdb/moxie-tdep.h
index 4e6bcd1c1c9..bd9840f3e02 100644
--- a/gdb/moxie-tdep.h
+++ b/gdb/moxie-tdep.h
@@ -20,6 +20,8 @@
#ifndef MOXIE_TDEP_H
#define MOXIE_TDEP_H
+#include "gdbarch.h"
+
struct moxie_gdbarch_tdep : gdbarch_tdep
{
/* gdbarch target dependent data here. Currently unused for MOXIE. */
diff --git a/gdb/msp430-tdep.c b/gdb/msp430-tdep.c
index f3c44b71ba5..7458c784871 100644
--- a/gdb/msp430-tdep.c
+++ b/gdb/msp430-tdep.c
@@ -34,6 +34,7 @@
#include "gdbcore.h"
#include "dwarf2/frame.h"
#include "reggroups.h"
+#include "gdbarch.h"
#include "elf/msp430.h"
#include "opcode/msp430-decode.h"
diff --git a/gdb/nds32-tdep.h b/gdb/nds32-tdep.h
index e06512323f9..1446be861fe 100644
--- a/gdb/nds32-tdep.h
+++ b/gdb/nds32-tdep.h
@@ -21,6 +21,8 @@
#ifndef NDS32_TDEP_H
#define NDS32_TDEP_H
+#include "gdbarch.h"
+
enum nds32_regnum
{
/* General purpose registers. */
diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c
index 346ee97c49b..fb92929d176 100644
--- a/gdb/or1k-tdep.c
+++ b/gdb/or1k-tdep.c
@@ -42,6 +42,7 @@
#include "target-descriptions.h"
#include <inttypes.h>
#include "dis-asm.h"
+#include "gdbarch.h"
/* OpenRISC specific includes. */
#include "or1k-tdep.h"
diff --git a/gdb/rl78-tdep.c b/gdb/rl78-tdep.c
index 616dafb1721..8c5749fb9cc 100644
--- a/gdb/rl78-tdep.c
+++ b/gdb/rl78-tdep.c
@@ -34,6 +34,7 @@
#include "gdbcore.h"
#include "dwarf2/frame.h"
#include "reggroups.h"
+#include "gdbarch.h"
#include "elf/rl78.h"
#include "elf-bfd.h"
diff --git a/gdb/rx-tdep.c b/gdb/rx-tdep.c
index 73e708b6462..3f7d70d448f 100644
--- a/gdb/rx-tdep.c
+++ b/gdb/rx-tdep.c
@@ -35,6 +35,7 @@
#include "dwarf2/frame.h"
#include "remote.h"
#include "target-descriptions.h"
+#include "gdbarch.h"
#include "elf/rx.h"
#include "elf-bfd.h"
diff --git a/gdb/s12z-tdep.c b/gdb/s12z-tdep.c
index ca4fe0a3c71..97bcb8b3965 100644
--- a/gdb/s12z-tdep.c
+++ b/gdb/s12z-tdep.c
@@ -31,6 +31,7 @@
#include "trad-frame.h"
#include "remote.h"
#include "opcodes/s12z-opc.h"
+#include "gdbarch.h"
/* Two of the registers included in S12Z_N_REGISTERS are
the CCH and CCL "registers" which are just views into
diff --git a/gdb/s390-tdep.h b/gdb/s390-tdep.h
index 191977ecf50..6fd371095d7 100644
--- a/gdb/s390-tdep.h
+++ b/gdb/s390-tdep.h
@@ -21,6 +21,7 @@
#define S390_TDEP_H
#include "prologue-value.h"
+#include "gdbarch.h"
enum s390_abi_kind
{
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index 70f6d42a95b..087574876f6 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -32,6 +32,7 @@
#include "osabi.h"
#include "elf-bfd.h"
#include "elf/v850.h"
+#include "gdbarch.h"
enum
{
diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c
index 9d453cd32b9..303b5dabb8f 100644
--- a/gdb/z80-tdep.c
+++ b/gdb/z80-tdep.c
@@ -30,6 +30,7 @@
#include "inferior.h"
#include "objfiles.h"
#include "symfile.h"
+#include "gdbarch.h"
#include "z80-tdep.h"
#include "features/z80.c"