aboutsummaryrefslogtreecommitdiff
path: root/gdb/xtensa-linux-nat.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-05-30 14:54:46 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2018-05-30 14:54:46 -0400
commit34a79281e4bd5d1a7f1d22a5a5be1ac2db56a3fc (patch)
tree4431b346a1c56a2485a09017620b9163a06529da /gdb/xtensa-linux-nat.c
parent73e1c03f93f0294b464dc2b67de1f9aaae84838d (diff)
downloadgdb-34a79281e4bd5d1a7f1d22a5a5be1ac2db56a3fc.zip
gdb-34a79281e4bd5d1a7f1d22a5a5be1ac2db56a3fc.tar.gz
gdb-34a79281e4bd5d1a7f1d22a5a5be1ac2db56a3fc.tar.bz2
Remove regcache_raw_collect
Remove regcache_raw_collect, update callers to use regcache::raw_collect. gdb/ChangeLog: * regcache.h (regcache_raw_collect): Remove, update callers to use regcache::raw_collect. * regcache.c (regcache_raw_collect): Remove.
Diffstat (limited to 'gdb/xtensa-linux-nat.c')
-rw-r--r--gdb/xtensa-linux-nat.c64
1 files changed, 27 insertions, 37 deletions
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index 8737a9a..5ac29ee 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -64,63 +64,54 @@ fill_gregset (const struct regcache *regcache,
struct gdbarch *gdbarch = regcache->arch ();
if (regnum == gdbarch_pc_regnum (gdbarch) || regnum == -1)
- regcache_raw_collect (regcache, gdbarch_pc_regnum (gdbarch), &regs->pc);
+ regcache->raw_collect (gdbarch_pc_regnum (gdbarch), &regs->pc);
if (regnum == gdbarch_ps_regnum (gdbarch) || regnum == -1)
- regcache_raw_collect (regcache, gdbarch_ps_regnum (gdbarch), &regs->ps);
+ regcache->raw_collect (gdbarch_ps_regnum (gdbarch), &regs->ps);
if (regnum == gdbarch_tdep (gdbarch)->wb_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->wb_regnum,
- &regs->windowbase);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->wb_regnum,
+ &regs->windowbase);
if (regnum == gdbarch_tdep (gdbarch)->ws_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->ws_regnum,
- &regs->windowstart);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->ws_regnum,
+ &regs->windowstart);
if (regnum == gdbarch_tdep (gdbarch)->lbeg_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lbeg_regnum,
- &regs->lbeg);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lbeg_regnum,
+ &regs->lbeg);
if (regnum == gdbarch_tdep (gdbarch)->lend_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lend_regnum,
- &regs->lend);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lend_regnum,
+ &regs->lend);
if (regnum == gdbarch_tdep (gdbarch)->lcount_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->lcount_regnum,
- &regs->lcount);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->lcount_regnum,
+ &regs->lcount);
if (regnum == gdbarch_tdep (gdbarch)->sar_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->sar_regnum,
- &regs->sar);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->sar_regnum,
+ &regs->sar);
if (regnum == gdbarch_tdep (gdbarch)->threadptr_regnum || regnum == -1)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->threadptr_regnum,
- &regs->threadptr);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->threadptr_regnum,
+ &regs->threadptr);
if (regnum >=gdbarch_tdep (gdbarch)->ar_base
&& regnum < gdbarch_tdep (gdbarch)->ar_base
+ gdbarch_tdep (gdbarch)->num_aregs)
- regcache_raw_collect (regcache,regnum,
- &regs->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
+ regcache->raw_collect (regnum,
+ &regs->ar[regnum - gdbarch_tdep (gdbarch)->ar_base]);
else if (regnum == -1)
{
for (i = 0; i < gdbarch_tdep (gdbarch)->num_aregs; ++i)
- regcache_raw_collect (regcache,
- gdbarch_tdep (gdbarch)->ar_base + i,
- &regs->ar[i]);
+ regcache->raw_collect (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)
+ regcache->raw_collect (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]);
+ regcache->raw_collect (gdbarch_tdep (gdbarch)->a0_base + i,
+ (&regs->ar[(4 * regs->windowbase + i)
+ % gdbarch_tdep (gdbarch)->num_aregs]));
}
}
@@ -282,8 +273,7 @@ store_xtregs (struct regcache *regcache, int regnum)
for (ptr = xtensa_regmap_table; ptr->name; ptr++)
if (regnum == ptr->gdb_regnum || regnum == -1)
- regcache_raw_collect (regcache, ptr->gdb_regnum,
- xtregs + ptr->ptrace_offset);
+ regcache->raw_collect (ptr->gdb_regnum, xtregs + ptr->ptrace_offset);
if (ptrace (PTRACE_SETXTREGS, tid, 0, (long)&xtregs) < 0)
perror_with_name (_("Couldn't write extended registers"));