diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-05-13 11:05:57 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-05-21 17:49:15 +0200 |
commit | 09424cff8c26073312e0bdc342989a955c766e31 (patch) | |
tree | e219a564fa56a47ef17b5d75cc47373d9a8b64c4 /gdb/amd64-tdep.c | |
parent | 3ca7dae4ddfb3363458d866428e45fb5e9b6914b (diff) | |
download | gdb-09424cff8c26073312e0bdc342989a955c766e31.zip gdb-09424cff8c26073312e0bdc342989a955c766e31.tar.gz gdb-09424cff8c26073312e0bdc342989a955c766e31.tar.bz2 |
Remove 'arch' field from regset structure.
Removes the 'arch' field from the regset structure, since it
represents the only "dynamic" data in a regset. It was referenced in
some regset supply- and collect routines, to get access to the gdbarch
associated with the regset. Naturally, the affected routines always
have access to the regcache to be supplied to or collected from. Thus
the gdbarch associated with that regcache can be used instead.
Diffstat (limited to 'gdb/amd64-tdep.c')
-rw-r--r-- | gdb/amd64-tdep.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 035b460..1b9797a 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -2842,7 +2842,8 @@ static void amd64_supply_fpregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *fpregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); gdb_assert (len == tdep->sizeof_fpregset); amd64_supply_fxsave (regcache, regnum, fpregs); @@ -2858,7 +2859,8 @@ amd64_collect_fpregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *fpregs, size_t len) { - const struct gdbarch_tdep *tdep = gdbarch_tdep (regset->arch); + struct gdbarch *gdbarch = get_regcache_arch (regcache); + const struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); gdb_assert (len == tdep->sizeof_fpregset); amd64_collect_fxsave (regcache, regnum, fpregs); |