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/i386-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/i386-tdep.c')
-rw-r--r-- | gdb/i386-tdep.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index ecbf730..7d2363f 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -3724,7 +3724,8 @@ void i386_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, 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); const gdb_byte *regs = gregs; int i; @@ -3748,7 +3749,8 @@ i386_collect_gregset (const struct regset *regset, const struct regcache *regcache, int regnum, void *gregs, 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_byte *regs = gregs; int i; @@ -3770,7 +3772,8 @@ static void i386_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); if (len == I387_SIZEOF_FXSAVE) { @@ -3792,7 +3795,8 @@ i386_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); if (len == I387_SIZEOF_FXSAVE) { |