* regcache.c (get_regcache_arch): New function.
2003-09-27 Mark Kettenis <kettenis@gnu.org>
+ * regcache.h (get_regcache_arch): New prototype.
+ * regcache.c (get_regcache_arch): New function.
+
* x86-64-tdep.c (x86_64_store_return_value): Remove spurious
whitespace.
return make_cleanup (do_regcache_xfree, regcache);
}
+/* Return REGCACHE's architecture. */
+
+struct gdbarch *
+get_regcache_arch (const struct regcache *regcache)
+{
+ return regcache->descr->gdbarch;
+}
+
/* Return a pointer to register REGNUM's buffer cache. */
static char *
struct cleanup *make_cleanup_regcache_xfree (struct regcache *regcache);
struct regcache *regcache_xmalloc (struct gdbarch *gdbarch);
+/* Return REGCACHE's architecture. */
+
+extern struct gdbarch *get_regcache_arch (const struct regcache *regcache);
+
/* Transfer a raw register [0..NUM_REGS) between core-gdb and the
regcache. */