aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386obsd-tdep.c
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2014-05-13 11:05:57 +0000
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>2014-05-21 17:49:15 +0200
commit09424cff8c26073312e0bdc342989a955c766e31 (patch)
treee219a564fa56a47ef17b5d75cc47373d9a8b64c4 /gdb/i386obsd-tdep.c
parent3ca7dae4ddfb3363458d866428e45fb5e9b6914b (diff)
downloadgdb-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/i386obsd-tdep.c')
-rw-r--r--gdb/i386obsd-tdep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index cf19c50..7d9ba93 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -142,7 +142,8 @@ i386obsd_aout_supply_regset (const struct regset *regset,
struct regcache *regcache, int regnum,
const void *regs, 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 *gregs = regs;
gdb_assert (len >= tdep->sizeof_gregset + I387_SIZEOF_FSAVE);