]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/frv-tdep.c
gdb: rename gdbarch_tdep struct to fix g++ 4.8 build
authorAndrew Burgess <aburgess@redhat.com>
Mon, 25 Jul 2022 11:07:11 +0000 (12:07 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 26 Jul 2022 11:04:07 +0000 (12:04 +0100)
commitab25d9bbe4a04aefb47d2514b4b02e6035ff769e
tree4ac73d86e7ca5fe334eab657a3b716b44730270f
parent27121f6740fa2051609b2d781d77c4cd23aa590b
gdb: rename gdbarch_tdep struct to fix g++ 4.8 build

After the commit:

  commit 08106042d9f5fdff60c129bf33190639f1a98b2a
  Date:   Thu May 19 13:20:17 2022 +0100

      gdb: move the type cast into gdbarch_tdep

GDB would no longer build using g++ 4.8.  The issue appears to be some
confusion caused by GDB having 'struct gdbarch_tdep', but also a
templated function called 'gdbarch_tdep'.  Prior to the above commit
the gdbarch_tdep function was not templated, and this compiled just
fine.  Note that the above commit compiles just fine with later
versions of g++, so this issue was clearly fixed at some point, though
I've not tried to track down exactly when.

In this commit I propose to fix the g++ 4.8 build problem by renaming
'struct gdbarch_tdep' to 'struct gdbarch_tdep_base'.  This rename
better represents that the struct is only ever used as a base class,
and removes the overloading of the name, which allows GDB to build
with g++ 4.8.

I've also updated the comment on 'struct gdbarch_tdep_base' to fix a
typo, and the comment on the 'gdbarch_tdep' function, to mention that
in maintainer mode a run-time type check is performed.
45 files changed:
gdb/aarch64-tdep.h
gdb/alpha-tdep.h
gdb/arc-tdep.h
gdb/arch-utils.c
gdb/arm-tdep.h
gdb/avr-tdep.c
gdb/bfin-tdep.h
gdb/bpf-tdep.c
gdb/cris-tdep.h
gdb/csky-tdep.h
gdb/frv-tdep.c
gdb/ft32-tdep.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.py
gdb/hppa-tdep.h
gdb/i386-tdep.h
gdb/ia64-tdep.h
gdb/lm32-tdep.c
gdb/loongarch-tdep.h
gdb/m32c-tdep.c
gdb/m32r-tdep.h
gdb/m68hc11-tdep.c
gdb/m68k-tdep.h
gdb/mep-tdep.c
gdb/microblaze-tdep.h
gdb/mips-tdep.h
gdb/mn10300-tdep.h
gdb/moxie-tdep.h
gdb/msp430-tdep.c
gdb/nds32-tdep.h
gdb/nios2-tdep.h
gdb/or1k-tdep.c
gdb/ppc-tdep.h
gdb/riscv-tdep.h
gdb/rl78-tdep.c
gdb/rx-tdep.c
gdb/s12z-tdep.c
gdb/s390-tdep.h
gdb/sh-tdep.h
gdb/sparc-tdep.h
gdb/tic6x-tdep.h
gdb/v850-tdep.c
gdb/xtensa-tdep.h
gdb/z80-tdep.c