gdb: include gdbarch.h in all files extending gdbarch_tdep

Commit 345bd07cce ("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
This commit is contained in:
Simon Marchi 2021-11-17 12:13:47 -05:00
parent 557b4d7650
commit 76eb8ef1ce
24 changed files with 31 additions and 0 deletions

View file

@ -37,6 +37,7 @@
#include "dis-asm.h" #include "dis-asm.h"
#include "objfiles.h" #include "objfiles.h"
#include <algorithm> #include <algorithm>
#include "gdbarch.h"
/* AVR Background: /* AVR Background:

View file

@ -22,6 +22,8 @@
#ifndef BFIN_TDEP_H #ifndef BFIN_TDEP_H
#define BFIN_TDEP_H #define BFIN_TDEP_H
#include "gdbarch.h"
enum gdb_regnum { enum gdb_regnum {
/* Core Registers */ /* Core Registers */
BFIN_R0_REGNUM = 0, BFIN_R0_REGNUM = 0,

View file

@ -34,6 +34,7 @@
#include "osabi.h" #include "osabi.h"
#include "target-descriptions.h" #include "target-descriptions.h"
#include "remote.h" #include "remote.h"
#include "gdbarch.h"
/* eBPF registers. */ /* eBPF registers. */

View file

@ -23,6 +23,8 @@
#ifndef CRIS_TDEP_H #ifndef CRIS_TDEP_H
#define CRIS_TDEP_H #define CRIS_TDEP_H
#include "gdbarch.h"
/* CRIS architecture specific information. */ /* CRIS architecture specific information. */
struct cris_gdbarch_tdep : gdbarch_tdep struct cris_gdbarch_tdep : gdbarch_tdep
{ {

View file

@ -20,6 +20,8 @@
#ifndef CSKY_TDEP_H #ifndef CSKY_TDEP_H
#define CSKY_TDEP_H #define CSKY_TDEP_H
#include "gdbarch.h"
/* How to interpret the contents of the link register. */ /* How to interpret the contents of the link register. */
enum lr_type_t enum lr_type_t
{ {

View file

@ -38,6 +38,7 @@
#include "solib.h" #include "solib.h"
#include "frv-tdep.h" #include "frv-tdep.h"
#include "objfiles.h" #include "objfiles.h"
#include "gdbarch.h"
struct frv_unwind_cache /* was struct frame_extra_info */ struct frv_unwind_cache /* was struct frame_extra_info */
{ {

View file

@ -20,6 +20,8 @@
#ifndef FT32_TDEP_H #ifndef FT32_TDEP_H
#define FT32_TDEP_H #define FT32_TDEP_H
#include "gdbarch.h"
struct ft32_gdbarch_tdep : gdbarch_tdep struct ft32_gdbarch_tdep : gdbarch_tdep
{ {
/* Type for a pointer to a function. Used for the type of PC. */ /* Type for a pointer to a function. Used for the type of PC. */

View file

@ -34,6 +34,7 @@
#include "reggroups.h" #include "reggroups.h"
#include "opcodes/lm32-desc.h" #include "opcodes/lm32-desc.h"
#include <algorithm> #include <algorithm>
#include "gdbarch.h"
/* Macros to extract fields from an instruction. */ /* Macros to extract fields from an instruction. */
#define LM32_OPCODE(insn) ((insn >> 26) & 0x3f) #define LM32_OPCODE(insn) ((insn >> 26) & 0x3f)

View file

@ -30,6 +30,7 @@
#include "reggroups.h" #include "reggroups.h"
#include "prologue-value.h" #include "prologue-value.h"
#include "objfiles.h" #include "objfiles.h"
#include "gdbarch.h"
/* The m32c tdep structure. */ /* The m32c tdep structure. */

View file

@ -38,6 +38,7 @@
#include "arch-utils.h" #include "arch-utils.h"
#include "regcache.h" #include "regcache.h"
#include "reggroups.h" #include "reggroups.h"
#include "gdbarch.h"
#include "target.h" #include "target.h"
#include "opcode/m68hc11.h" #include "opcode/m68hc11.h"

View file

@ -20,6 +20,8 @@
#ifndef M68K_TDEP_H #ifndef M68K_TDEP_H
#define M68K_TDEP_H #define M68K_TDEP_H
#include "gdbarch.h"
struct frame_info; struct frame_info;
/* Register numbers of various important registers. */ /* Register numbers of various important registers. */

View file

@ -45,6 +45,7 @@
#include "prologue-value.h" #include "prologue-value.h"
#include "cgen/bitset.h" #include "cgen/bitset.h"
#include "infcall.h" #include "infcall.h"
#include "gdbarch.h"
/* Get the user's customized MeP coprocessor register names from /* Get the user's customized MeP coprocessor register names from
libopcodes. */ libopcodes. */

View file

@ -20,6 +20,7 @@
#ifndef MICROBLAZE_TDEP_H #ifndef MICROBLAZE_TDEP_H
#define MICROBLAZE_TDEP_H 1 #define MICROBLAZE_TDEP_H 1
#include "gdbarch.h"
/* Microblaze architecture-specific information. */ /* Microblaze architecture-specific information. */
struct microblaze_gdbarch_tdep : gdbarch_tdep struct microblaze_gdbarch_tdep : gdbarch_tdep

View file

@ -21,6 +21,7 @@
#define MIPS_TDEP_H #define MIPS_TDEP_H
#include "objfiles.h" #include "objfiles.h"
#include "gdbarch.h"
struct gdbarch; struct gdbarch;

View file

@ -20,6 +20,8 @@
#ifndef MOXIE_TDEP_H #ifndef MOXIE_TDEP_H
#define MOXIE_TDEP_H #define MOXIE_TDEP_H
#include "gdbarch.h"
struct moxie_gdbarch_tdep : gdbarch_tdep struct moxie_gdbarch_tdep : gdbarch_tdep
{ {
/* gdbarch target dependent data here. Currently unused for MOXIE. */ /* gdbarch target dependent data here. Currently unused for MOXIE. */

View file

@ -34,6 +34,7 @@
#include "gdbcore.h" #include "gdbcore.h"
#include "dwarf2/frame.h" #include "dwarf2/frame.h"
#include "reggroups.h" #include "reggroups.h"
#include "gdbarch.h"
#include "elf/msp430.h" #include "elf/msp430.h"
#include "opcode/msp430-decode.h" #include "opcode/msp430-decode.h"

View file

@ -21,6 +21,8 @@
#ifndef NDS32_TDEP_H #ifndef NDS32_TDEP_H
#define NDS32_TDEP_H #define NDS32_TDEP_H
#include "gdbarch.h"
enum nds32_regnum enum nds32_regnum
{ {
/* General purpose registers. */ /* General purpose registers. */

View file

@ -42,6 +42,7 @@
#include "target-descriptions.h" #include "target-descriptions.h"
#include <inttypes.h> #include <inttypes.h>
#include "dis-asm.h" #include "dis-asm.h"
#include "gdbarch.h"
/* OpenRISC specific includes. */ /* OpenRISC specific includes. */
#include "or1k-tdep.h" #include "or1k-tdep.h"

View file

@ -34,6 +34,7 @@
#include "gdbcore.h" #include "gdbcore.h"
#include "dwarf2/frame.h" #include "dwarf2/frame.h"
#include "reggroups.h" #include "reggroups.h"
#include "gdbarch.h"
#include "elf/rl78.h" #include "elf/rl78.h"
#include "elf-bfd.h" #include "elf-bfd.h"

View file

@ -35,6 +35,7 @@
#include "dwarf2/frame.h" #include "dwarf2/frame.h"
#include "remote.h" #include "remote.h"
#include "target-descriptions.h" #include "target-descriptions.h"
#include "gdbarch.h"
#include "elf/rx.h" #include "elf/rx.h"
#include "elf-bfd.h" #include "elf-bfd.h"

View file

@ -31,6 +31,7 @@
#include "trad-frame.h" #include "trad-frame.h"
#include "remote.h" #include "remote.h"
#include "opcodes/s12z-opc.h" #include "opcodes/s12z-opc.h"
#include "gdbarch.h"
/* Two of the registers included in S12Z_N_REGISTERS are /* Two of the registers included in S12Z_N_REGISTERS are
the CCH and CCL "registers" which are just views into the CCH and CCL "registers" which are just views into

View file

@ -21,6 +21,7 @@
#define S390_TDEP_H #define S390_TDEP_H
#include "prologue-value.h" #include "prologue-value.h"
#include "gdbarch.h"
enum s390_abi_kind enum s390_abi_kind
{ {

View file

@ -32,6 +32,7 @@
#include "osabi.h" #include "osabi.h"
#include "elf-bfd.h" #include "elf-bfd.h"
#include "elf/v850.h" #include "elf/v850.h"
#include "gdbarch.h"
enum enum
{ {

View file

@ -30,6 +30,7 @@
#include "inferior.h" #include "inferior.h"
#include "objfiles.h" #include "objfiles.h"
#include "symfile.h" #include "symfile.h"
#include "gdbarch.h"
#include "z80-tdep.h" #include "z80-tdep.h"
#include "features/z80.c" #include "features/z80.c"