From aa70a99eb03444f41f50e100c9b1e00e9a32cde9 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Mon, 15 Nov 2021 15:22:34 -0500 Subject: gdb: adjust gdbarch_tdep calls in nat files Commit 345bd07cce33 ("gdb: fix gdbarch_tdep ODR violation") forgot to update the gdbarch_tdep calls in the native files other than x86-64 Linux. This patch updates them all (to the best of my knowledge). These are the files I was able to build-test: aarch64-linux-nat.c amd64-bsd-nat.c arm-linux-nat.c ppc-linux-nat.c windows-nat.c xtensa-linux-nat.c And these are the ones I could not build-test: aix-thread.c arm-netbsd-nat.c ppc-fbsd-nat.c ppc-netbsd-nat.c ia64-tdep.c (the part that needs libunwind) ppc-obsd-nat.c rs6000-nat.c If there are still some build problems related to gdbarch_tdep in them, they should be pretty obvious to fix. Change-Id: Iaa3d791a850e4432973757598e634e3da6061428 --- gdb/ppc-netbsd-nat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gdb/ppc-netbsd-nat.c') diff --git a/gdb/ppc-netbsd-nat.c b/gdb/ppc-netbsd-nat.c index 316fc78..fa58fd7 100644 --- a/gdb/ppc-netbsd-nat.c +++ b/gdb/ppc-netbsd-nat.c @@ -52,7 +52,7 @@ static ppc_nbsd_nat_target the_ppc_nbsd_nat_target; static int getregs_supplies (struct gdbarch *gdbarch, int regnum) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch); return ((regnum >= tdep->ppc_gp0_regnum && regnum < tdep->ppc_gp0_regnum + ppc_num_gprs) @@ -68,7 +68,7 @@ getregs_supplies (struct gdbarch *gdbarch, int regnum) static int getfpregs_supplies (struct gdbarch *gdbarch, int regnum) { - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch); /* FIXME: jimb/2004-05-05: Some PPC variants don't have floating point registers. Traditionally, GDB's register set has still @@ -159,7 +159,7 @@ ppcnbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb) struct switchframe sf; struct callframe cf; struct gdbarch *gdbarch = regcache->arch (); - struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); + ppc_gdbarch_tdep *tdep = (ppc_gdbarch_tdep *) gdbarch_tdep (gdbarch); int i; /* The stack pointer shouldn't be zero. */ -- cgit v1.1