aboutsummaryrefslogtreecommitdiff
path: root/gdb/xtensa-linux-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/xtensa-linux-nat.c')
-rw-r--r--gdb/xtensa-linux-nat.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index 69c7eef..a4b001e 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -94,6 +94,20 @@ fill_gregset (const struct regcache *regcache,
gdbarch_tdep (gdbarch)->ar_base + i,
&regs->ar[i]);
}
+ if (regnum >= gdbarch_tdep (gdbarch)->a0_base
+ && regnum < gdbarch_tdep (gdbarch)->a0_base + C0_NREGS)
+ regcache_raw_collect (regcache, regnum,
+ &regs->ar[(4 * regs->windowbase + regnum
+ - gdbarch_tdep (gdbarch)->a0_base)
+ % gdbarch_tdep (gdbarch)->num_aregs]);
+ else if (regnum == -1)
+ {
+ for (i = 0; i < C0_NREGS; ++i)
+ regcache_raw_collect (regcache,
+ gdbarch_tdep (gdbarch)->a0_base + i,
+ &regs->ar[(4 * regs->windowbase + i)
+ % gdbarch_tdep (gdbarch)->num_aregs]);
+ }
}
static void
@@ -146,6 +160,20 @@ supply_gregset_reg (struct regcache *regcache,
gdbarch_tdep (gdbarch)->ar_base + i,
&regs->ar[i]);
}
+ if (regnum >= gdbarch_tdep (gdbarch)->a0_base
+ && regnum < gdbarch_tdep (gdbarch)->a0_base + C0_NREGS)
+ regcache_raw_supply (regcache, regnum,
+ &regs->ar[(4 * regs->windowbase + regnum
+ - gdbarch_tdep (gdbarch)->a0_base)
+ % gdbarch_tdep (gdbarch)->num_aregs]);
+ else if (regnum == -1)
+ {
+ for (i = 0; i < C0_NREGS; ++i)
+ regcache_raw_supply (regcache,
+ gdbarch_tdep (gdbarch)->a0_base + i,
+ &regs->ar[(4 * regs->windowbase + i)
+ % gdbarch_tdep (gdbarch)->num_aregs]);
+ }
}
void