aboutsummaryrefslogtreecommitdiff
path: root/gdb/aarch64-linux-nat.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-11-15 15:22:34 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-11-15 21:39:16 -0500
commitaa70a99eb03444f41f50e100c9b1e00e9a32cde9 (patch)
treeec0747ecf73c9e88e8ee3e5de86f129bf88dab64 /gdb/aarch64-linux-nat.c
parent39cdfdb2614ae5654f5aa77792085b37cb342929 (diff)
downloadgdb-aa70a99eb03444f41f50e100c9b1e00e9a32cde9.zip
gdb-aa70a99eb03444f41f50e100c9b1e00e9a32cde9.tar.gz
gdb-aa70a99eb03444f41f50e100c9b1e00e9a32cde9.tar.bz2
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
Diffstat (limited to 'gdb/aarch64-linux-nat.c')
-rw-r--r--gdb/aarch64-linux-nat.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c
index c7cbebb..aa42365 100644
--- a/gdb/aarch64-linux-nat.c
+++ b/gdb/aarch64-linux-nat.c
@@ -454,7 +454,8 @@ store_sveregs_to_thread (struct regcache *regcache)
static void
fetch_pauth_masks_from_thread (struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int ret;
struct iovec iovec;
uint64_t pauth_regset[2] = {0, 0};
@@ -479,7 +480,8 @@ fetch_pauth_masks_from_thread (struct regcache *regcache)
static void
fetch_mteregs_from_thread (struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int regno = tdep->mte_reg_base;
gdb_assert (regno != -1);
@@ -503,7 +505,8 @@ fetch_mteregs_from_thread (struct regcache *regcache)
static void
store_mteregs_to_thread (struct regcache *regcache)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
int regno = tdep->mte_reg_base;
gdb_assert (regno != -1);
@@ -531,7 +534,8 @@ void
aarch64_linux_nat_target::fetch_registers (struct regcache *regcache,
int regno)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
if (regno == -1)
{
@@ -573,7 +577,8 @@ void
aarch64_linux_nat_target::store_registers (struct regcache *regcache,
int regno)
{
- struct gdbarch_tdep *tdep = gdbarch_tdep (regcache->arch ());
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (regcache->arch ());
if (regno == -1)
{
@@ -1052,7 +1057,9 @@ aarch64_linux_nat_target::thread_architecture (ptid_t ptid)
return it if the current vector length matches the one in the tdep. */
inferior *inf = find_inferior_ptid (this, ptid);
gdb_assert (inf != NULL);
- if (vq == gdbarch_tdep (inf->gdbarch)->vq)
+ aarch64_gdbarch_tdep *tdep
+ = (aarch64_gdbarch_tdep *) gdbarch_tdep (inf->gdbarch);
+ if (vq == tdep->vq)
return inf->gdbarch;
/* We reach here if the vector length for the thread is different from its